[osg-users] transparency with multiple geometries

2010-03-03 Thread Miguel Lokida
Hello,

In my scene, I have differents animated objects. Their size can change during 
animation and 

For example, I have 3 objects A,B and C.

C can be include in A and A can be include in B
After in the animation, B can be include in C and  C can be include in A

So, their order change and for the transparency I have some problems because 
depend of the order of the rendering sometimes objects desappears when they 
graws... 

I have this for each geometry:
stateset-setMode(GL_BLEND,osg::StateAttribute::ON);
stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
a le dessiner en dernier.


I have added : 
stateset-setRenderBinDetails(11, DepthSortedBin); 

for one object and it seems ok (until a bigger one include it).

So, is-there an automatic way to render multiple transparents objects thaht 
size change during time or should I compute their rendering order and   use 
stateset-setRenderBinDetails(order, DepthSortedBin); for each geometry ?


Thank you.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=25120#25120





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] transparency with multiple geometries

2010-03-03 Thread Jason Daly

Miguel Lokida wrote:

So, is-there an automatic way to render multiple transparents objects thaht size change 
during time or should I compute their rendering order and   use 
stateset-setRenderBinDetails(order, DepthSortedBin); for each geometry ?
  


This question has come up a few times recently.  The short answer is no, 
there's no automatic way to do this.  You might want to look at the 
osgdepthpeeling example for one possible solution, or you can manage it 
manually as you suggested.


--J

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org