Hi Robert, Looks like I only see it in my rbody files. I added this code to all submeshes: //TODO Should only do this if texture has alpha on it. submesh_state_set->setMode( GL_BLEND, osg::StateAttribute::ON ); submesh_state_set->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
This looks like it does the trick, but I'm not sure if it is optimized. This means that I'm rendering the whole model as blended. QUESTIONS 1) Do I need the AlphaFunc? 2) Is there a way to detect if a texture has transparency in it? This way I can only apply blending if transparency is detected. Thanks! Zach -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, November 27, 2006 04:00 To: osg users Subject: Re: [osg-users] Alpha not showing up in 1.2 Hi Zach, To help take advantage of early depth test I removed the default setting on of AlphaFunc for the opaque bin. AlphaFunc is still used for the transparent bin as before. If you have elements in your scene that need to use AlphaFunc and they are not part of the transparent bin then you'll need to attach an osg::AlphaFunc to those subgraphs, or if you wish just stick the AlphaFunc above your whole scene graph and get back the original behavior. Robert. On 11/27/06, Zach Deedler <[EMAIL PROTECTED]> wrote: > Hello, > > PROBLEM > I've recently updated from OSG 1.0 to 1.2, and now some of my models > are not showing up with the correct alpha properties. > > QUESTION > Were there any changes that may have caused this? > > > Zach Deedler > FAAC Incorporated > 1229 Oak Valley Dr. > Ann Arbor, Michigan 48108 > Phone: (734)761-5836 Ext.303 > Fax: (734)761-5368 > email: [EMAIL PROTECTED] > <http://www.faac.com> > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
