Thanks to everyone that helped on the issue, I also had some more readings about it, but the problem I have is that the objects in the transparent bin are sorted by depth against each other but I need the vetices to be sorted.
I'm having a drawable which contains many vertices and is transparent, from some direction I see through the front of the object it's back correctly and from the other direction it doesn't look correct (even when disabling depth test, or setting depth mask to true/false), the problem is that the vertices aren't drawn in the correct order and so the source alpha and destination alpha are swapped. Is their a way to tell osg to sort the vertices of the drawable depending on the viewing angle? is it VERY slow? any ideas? thanks, Guy. ----- Original Message ----- From: Paul Martz To: 'osg users' Sent: Tuesday, June 19, 2007 7:22 PM Subject: RE: [osg-users] Blending for dummies :) Any geometries that blend against each other should be in separate Drawables, and their StateSet should have the render bin hint set to TRANSPARENT_BIN. OSG will then draw these Drawables after all opaque Drawables and in back to front order. There are other strategies too, but this is the simple common one. For more information, there are many OSG examples that demonstrate how to set up OSG for correct rendering of translucent objects. Also, check the archives, as this has been covered multiple times recently. Hope that helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ---------------------------------------------------------------------------- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 12:15 PM To: osg users Subject: [osg-users] Blending for dummies :) Hello, I'm trying to activate blending in some node. I set in the stateset GL_BLEND on, and added osg::BlendFunc but it seems to work only from backward views. I tried to disable GL_DEPTH and GL_CULL with no better results. any ideas? thanks, Guy. ------------------------------------------------------------------------------ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
