Hello Mathieu,

It works, the geode becomes transparent.

But is there a way to see objects behind this geode ?

Juan gave you a good answer, but the short version is add:

Geode->getStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

Just to be clear, the canonical way of enabling transparency after setting the alpha in a material or a texture or a geometry color (with GL_COLOR_MATERIAL) is:

Geode->getStateSet()->setMode( GL_BLEND, osg::StateAttribute::ON );
Geode->getStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

Juan spoke about adding an osg::BlendFunc, this is only necessary if you want to override the default blending function, which is set to what he said by default (it will give the results you likely want).

And his info about when this type of transparency works is spot on, you will get good results if two objects are disjoint and manifold, otherwise you will get artifacts but we generally ignore those kinds of artifacts for the sake of real-time performance.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to