As long as your shape is convex then you should always be able to draw
the inside first... even with the camera inside.
-Paul
Andrew Thompson wrote:
Hi Paul,
Cheers for your response, ok I missed that first time around, so it is possible, that's good, just not 100% sure on how you implemented it.
One special case is in my system the transparent box is sort of a zone that the
camera may move inside or outside. I need it to render properly in both cases.
Also the box may be irregular (Imaging a polygon for top and bottom with 3-N
points and a fixed height. Top/bottom polygons are the same shape).
So to clarify, should I:
1. Create each face (inner and outer) as well as top/bottom as individual
Geodes, with one Geometry per Geode, one Quad per Geometry
2. Create a stateset on each geode, and set render bin details as follows:
Code:
// Where lower values are the inner faces, higher are outer
ss->setRenderBinDetails(1, "DepthSortedBin");
ss->setRenderBinDetails(2, "DepthSortedBin");
...
ss->setRenderBinDetails(10, "DepthSortedBin");
ss->setRenderBinDetails(11, "DepthSortedBin");
3. Then depending on whether the camera is inside or outside, swap the order of
the inner/outer faces
4. Do the above in the Update pass
Does this sound about right?
Thank you!
Andrew
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16387#16387
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org