Hello,
I have a scene in which a set of 3D models sit on top of a floor. Under
each object is a quad polygon around the model's bounding box, showing
the space it takes on floor. I'd like to highlight areas were these
quads intersect, by drawing them in red.
In order to accomplish this effect, I'd like to do the following.
First, I'd like to draw the scene normally. Next, I'd like to clear the
stencil buffer. Finally, I'd like to draw the plates such that they
increment the stencil buffer, and are only drawn to the color buffer
when the stencil value is equal to 1.
The set of quads are spread out through the scene graph, and are not
under one specific node. If necessary (or helpful), I could set the
nodemask to signify whether a node needs this kind of rendering.
How should I accomplish this? Should I simply attach StateSet's setting
the stencil values to the quad geometry? Should I modify the
renderbin? How would I ensure the stencil buffer is cleared properly?
Should I consider using osgFX?
Thanks
- Eron
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/