su hu wrote:
Hi
All transparent nodes should be found out and set to TRANSPARENT_BIN
one bye one. Nodes should be small enough.
But there are lots of transparent nodes in scene. How to find out
those transparent nodes quickly? Thanks for your help.
I can't think of a reason why you'd need to find nodes to be put in the
transparent bin. If you load your scene from files, the plugin that
loaded them should take care of this for you. If you are creating scene
elements dynamically, then you should set the bin as they are created.
Finding transparency in an existing scene is possible. You'd have to
write a custom NodeVisitor to traverse the scene. At each Node, you'd
check for state sets with transparent Materials (alpha set to less than
1) and Textures with transparent texels. At each Geometry, you'd look
for values in the color arrays with alpha less than 1.
As I said before, though, this shouldn't be necessary in most cases.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org