On Tue, 2007-06-12 at 16:36 +0200, [EMAIL PROTECTED] wrote: > Dear All > I have a questions about transparency. > I set the transparency of some nodes by these commands: > > osg::StateSet* state = MyNode->getOrCreateStateSet(); > osg::ref_ptr<osg::Material> mat = new osg::Material; > mat->setAlpha( osg::Material::FRONT_AND_BACK, trasparence );//Potrei > risparmiarlo(tanto ci pensa il trasformer) > state->setMode( GL_BLEND, osg::StateAttribute::OVERRIDE | > osg::StateAttribute::ON ); > state->setMode( GL_CULL_FACE, osg::StateAttribute::OVERRIDE | > osg::StateAttribute::ON ); > state->setAttribute( mat.get() ); > > What happen is that I can see the transparency if I overlap the drawable with > some objects...but overlapping the same drawable with other objects it > doesn’t work...it seems that there is an order...does it depend by the Bin > concept?...how can avoid it?
I'm not sure if this will help, but I've always had a call to: stat->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); ...when I use transparency in any form. I'm still a bit of a new, so I can't say exactly even what it does, but it certainly may help get the results you want; at least worth a try. :) > > ------------------------------------------------------ > Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom > http://click.libero.it/infostrada > > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/