I'm not 100% sure what you are after, my best guess is that you want to renderer a transparent object that is a has front and back faces w.r.t the viewer, but depending on the view the front face sometimes occludes the back face preventing transparency from working correctly.
I answered a question on transparent sorting yesterday so look this up. An extra trick you can apply for single geometries like spheres/cubes is enforce the required draw order for transparent objects (you must first draw the furthest faces and then the nearest), is to use cull face to cull back faces, and then use two sets of primitives within this geometry, the first set have their orientations pointing inwards, then the second have them pointing outwards. The src/osg/ShapeDrawable.cpp uses this trick. Robert. On 8/22/07, blinkeye <[EMAIL PROTECTED]> wrote: > Hello fellow osg users > > I've been trying for days to implement what I thought of as a simple thing: > > A translucent figure like a dome, a cubus or a triangle where faces behind > don't shine through and which inside faces are rendered when the camera is > inside the figure. > > I've managed that by using GL_CULL_FACE > > osg::StateSet* states = new osg::StateSet(); > states->setRenderingHint( osg::StateSet::TRANSPARENT_BIN ); > states->setRenderBinDetails( 2, "RenderBin" ); > states->setMode( GL_CULL_FACE, osg::StateAttribute::OVERRIDE | > osg::StateAttribute::ON ); > states->setMode( GL_BLEND, osg::StateAttribute::OVERRIDE | > osg::StateAttribute::ON ); > states->setMode( GL_DEPTH_TEST, osg::StateAttribute::OVERRIDE | > osg::StateAttribute::ON ); > > So far so good, but now the problem: If the camera is inside the > translucent figure I don't see the inside faces. > > Is there something I'm doing wrong or shouldn't now the inside faces be > drawn (but not the outside faces)? > > I know this is more an OpenGL issue but I can't seem to find the answer > anywhere. > > > > > > _______________________________________________ > 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

