OSG is built on OpenGL and so you do transparency just as you would in OpenGL: Use the Blend StateAttribute to set the blend functions, and then you'll either have to cull backfaces on your box or draw two passes (first the back, then the front) to get a proper final appearance. The one OSG=specific concern is setting the rendering hint to TRANSPARENT_BIN to ensure the transparent objects render after the opaque objects. Advice: * Look through the examples for "Blend" or "setRenderingHint". * The OpenGL red book (Programming Guide" might be a useful reference for you. Hope that helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of nicolas peña Sent: Wednesday, April 16, 2008 5:24 AM To: OpenSceneGraph Users Subject: [osg-users] Box transparency. Hi all, I have and osg::Box that is drawn using a osg::ShapeDrawable and I want to make it transparent. I have tried using the setColor method of the osg::ShapeDrawable as I understand that the fourth value of the vector passed to it is used to set the alpha value, but it looks like I need to enable the transparency somewhere else has it is just use the RGB components of the passed vector and draw a solid Box. Where can I enable the transparency for the box? Or what I need to do? Thanks, Nicolas.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

