Depth sorting for transparency happens at a course level in osg.
I think it uses the center of the bounding box of the geometry object.

For your specific example you'll need to place the 6 cube faces into
separate geometries to get
the result you expect.

If you want to make a complex model transparent have a look at the
depth peeling example.

2009/7/11 Gotthard, Petr <[email protected]>:
> Hello,
>
>
>
> I have troubles visualizing a 3D model (e.g. an aircraft) loaded using the
> readNodeFile() function when this model is inside a semi-transparent box.
>
>
>
> I create the semi-transparent box, set alpha value and enable blending by
>
> state-->setMode(GL_BLEND, osg::StateAttribute::ON);
>
> state-->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
>
>
>
> When I load some model using readNodeFile and put it into the box, some
> parts of the model disappear (get culled) when seen from outside the box,
> while other don’t. For example, aircraft body disappear so that pilot seats
> that were inside the aircraft are visible.
>
> If I move camera inside the box, I see the whole model inside the box is
> visualized correctly.
>
>
>
>
>
> Do you have any idea what should I do to have the model-in-a-box displayed
> correctly?
>
>
>
> I guess I should probably call some setMode or setRenderingHint function
> also for the model. Do I have to walk through all nodes in the subgraph
> loaded by readNodeFile, or is there a function that should be called on the
> subgraph root only?
>
>
>
> Best Regards,
>
> Petr
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



-- 
http://www.ssTk.co.uk
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to