HI Dario, I would typically use a NodeMask combined with a TraversalMask on the CullVisitor (controlled via osg::Camera's CullSettings interface) that switches off traversal during the cull traversal.
Robert. On 20 August 2013 13:36, Dario Minieri <[email protected]> wrote: > Hi, > > Sorry for noob question, but I need to make an object totally transparent > (as invisible) but I have to maintain your "presence" in the world (the > object can't be masked). This means that the object isn't visible but all > collisions and others interactions in the world have to work. > > I can make the transparency using code like this, but the object isn't > never really "invisible": > > > Code: > > osg::Material* l_material = > (osg::Material*)p_Object->getStateSet()>getAttribute(osg::StateAttribute::MATERIAL); > l_material->setTransparency(p_face_mode, 1-p_transparency); > p_Object->getOrCreateStateSet()->setMode(GL_BLEND, > osg::StateAttribute::ON); > p_Object->getOrCreateStateSet()->setAttributeAndModes(l_material, > osg::StateAttribute::OVERRIDE); > > > > > Where p_face_mode is FRONT_AND_BACK for example. > > Thank you! > > Cheers, > Dario > Code: > > > > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=55902#55902 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

