I'm guessing that this is an old computer graphics problem to do with depth 
sorting the drawing sequence of transparent objects, but I'm a bit puzzled why 
OSG is having a problem with this little example. 

Basically, in some views of a this example scene, the transparency is not 
working properly. See attached JPG screen grab and OSG model.

I suspect the root cause that in some views, the depthsort is causing a door to 
be drawn before a shelf even though the door is nearer. Is the depthsort 
ordered by depth of the midpoint of geometries? That would certainly explain 
the issue because the midpoint of a shelf could certainly be infront of the 
midpoint of a door even though ALL of the door polys are infront of ALL the 
shelf polys. (yes, read that last sentence again! lol.) 

I was wondering if the depthsorting algorithm could be improved to fix this 
problem, maybe by sorting by deepest geometry vertex rather than geometry 
midpoint (if that's what it's doing) ? Is there way to override render bin 
depthsort to provide it with different depth values for each geometry/drawable?

I know I can also tweak things for special cases e.g. by putting the door and 
shelf in different render bins but that's not a general or practical solution.

How are others solving this problem?

Regards.

Chris D.

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




Attachments: 
http://forum.openscenegraph.org//files/glassproblem_994.osg
http://forum.openscenegraph.org//files/glassproblem_137.jpg


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to