It worked! Thank you so much!
What I am trying to achieve is the following:
I have a mesh with multiple submeshes and I have a clipping plane cutting them 
in random place. I want to place a cap on every submesh cut, so they will look 
solid. In order to do this I do the following:

* Draw geometry backfaces to the stencil buffer and INCR stencil values
* Draw geometry frontfaces to the stancil buffer and DECR stencil values
 -- This way I get a mask which is the pixels of the cap I have to draw. Then:
* Draw a plane parallel to the clipping plane with a selected texture ONLY 
where I have a non-zero value at the stencil buffer. 
* Draw the final submesh with lighting enabled.

I could do this without multiple cameras, BUT each submesh has different cap 
texture. So I have to repeat the above procedure for all my submeshes. (or at 
least as many times as the difference cap textures).

I will continue working on this now. Thanks again for solving my problem!


Cheers,
George

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34768#34768





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to