Hi Atilla, On Thu, Oct 20, 2011 at 6:55 AM, Atilla Selem <[email protected]> wrote: > How can i use stencil buffer for that purpose? i haven't done anything > special with stencil buffer before. Should i change stencil buffer settings > only for myTerrain.ive node? How will i set stencil buffer for rendering a > round area on my terrain node? > > Could you please give some tips?
I haven't ever done specifically what you want with the stencil buffer before, but it does sound like something that could be done with a stencil buffer. The shadow technique "Shadow Volumes" use stencil buffers in ways that seem to be kinda similar to what you want, it's a long while since I've done in this area so it's a big foggy to me now. It would be worth you doing some background reading on this technique. You wouldn't need to modify the terrain at all, the stenciling approach can be done at a high level in the scene graph where you decorate the subgraphs you want to work on. My expectation is that you'd need to render a cylinder geometry into the stencil buffer and then render your terrain with stencil test on. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

