[osg-users] Transparency problem

Christophe Medard christophe.medard at oktal.fr
Thu Sep 27 01:40:22 PDT 2007


I think I have the very same problem with three textures.

No assignation to a particular rendering bin seems to correct the problem.
(However, it would automatically be done since that database is a 3dsMax 
OSGExp export, who handle transparency issues properly in the exported scene 
graph : in the .osg file my geode containg transparent faces are associated 
to the TRANSPARENT_BIN...)

To me it's not a sorting problem for the quads my three textures are mapped 
upon are transparent, it's just the a small outline in the texture that is 
blended on the clear color not the OPAQUE_BIN affecter database...

I'm still looking for a way to solve this issue... (For information, I'm 
still using OSG 2.0.0.)

-- 
Christophe Médard
Société OKTAL (http://www.oktal.fr)
2 impasse Boudeville
31100 Toulouse (France)
Tél. : (+33) 5 62 11 50 10
Fax : (+33) 5 62 11 50 29



----- Original Message ----- 
From: "Panagiotis Papadakos" <papadako at csd.uoc.gr>
To: <osg-users at lists.openscenegraph.org>
Sent: Wednesday, September 26, 2007 6:56 PM
Subject: [osg-users] Transparency problem


> Hello everybody.
>
> I have a transparency problem which you can see in the attached
> image. As you can see the strings rendered on the orange window, which is
> in front of another blue window, have a blue outline from the blue window
> behind. The strings are in front of a semi-transparent rectangle in front
> of the semi-transparent window. What might be happening?
>
> I use the following statesets for the windows
>
>         stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF | 
> osg::StateAttribute::OVERRIDE);
>         stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON | 
> osg::StateAttribute::OVERRIDE);
>         stateSet->setMode(GL_BLEND, osg::StateAttribute::ON | 
> osg::StateAttribute::OVERRIDE);
>
>         osg::ref_ptr <osg::Depth> depth = new osg::Depth;
>         depth->setFunction(osg::Depth::LESS);
>         stateSet->setAttribute(depth.get());
>
>         osg::ref_ptr<osg::BlendFunc> blendFunction = new osg::BlendFunc;
> 
> blendFunction->setFunction(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
>         stateSet->setAttributeAndModes(blendFunction.get());
>
>         stateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
>
>  stateSet->setRenderBinMode(osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
>
>
> Thank in advance!
>
>  Panagiotis Papadakos


--------------------------------------------------------------------------------


> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TransparencyIssue.PNG
Type: image/png
Size: 794801 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070927/d5f889d4/attachment-0003.png>


More information about the osg-users mailing list