Hi Nicholas, There isn't enough info about the nature of your model to really know what is up. Could it be that you are trying to rendering a single geometry that is hull that has near side to the camera and far side, that you are trying to render? If so then this is common problem with graphics hardware use of z buffer, the best you can do is break your object up in a more fine grained way so that depth sorting of the transparent bin can make sure things are drawn back to front.
Robert. On Tue, Aug 26, 2008 at 4:55 PM, Nicholas Bannister <[EMAIL PROTECTED]> wrote: > I have loaded a *.osg file and I am using and osg::StateSet and > setting a material to have an alpha value of 0.5 to set the > transparency. > The problem is that it comes out only transparent on one side and > completely Grey scale. > > I suspect that that the Materials set within the *.osg file are > overriding and/or interfering with my settings. > How do I go about setting the global transparency, and thus overriding > any local transparency settings, front and back faces, while still > maintaining all the the colors of all the child nodes from the osg > file. > > this is what i have > > node = osgDB::readNodeFile( qPrintable(fullPathCopy) ); > > > if (!node) > return false; > > osg::StateSet* state = node->getOrCreateStateSet(); > state->setMode(GL_BLEND,osg:: > StateAttribute::ON| > osg::StateAttribute::OVERRIDE); > osg::Material* mat = new osg::Material; > mat->setAlpha(osg::Material::FRONT_AND_BACK, 0.8); > state->setAttributeAndModes(mat,osg::StateAttribute::ON | > osg::StateAttribute::OVERRIDE); > osg::BlendFunc* bf = new osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, > osg::BlendFunc::ONE_MINUS_SRC_ALPHA ); > state->setAttributeAndModes(bf); > state->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); > state->setMode(GL_LIGHTING, osg::StateAttribute::ON); > node->setStateSet(state); > _______________________________________________ > 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

