Hey guys,

I'm trying to make a system where I can render part of my scene with two
passes: 1 for stencil mask, the other for stencil test. I have the passes
working by putting things in consecutive renderbins. I set some stencil
stuff in bin 11, then put the mask geometry in bin 12, then some more
stencil related state changes in bin 13, then the final rendered geometry
in bin 14 followed by some default state restoring stuff in bin 15.

The reason why I do it this way is because of the way the geometry get
added to the scene. I've made an image to help explain it:
[url]http://frongo.net/post_img/scene_bin_structure.jpg[/url]

Figure 1 shows how the nodes are laid out that should be rendered with this
system. Figure 2 shows how they should be sorted in the bins.

Basically I need to have them sorted by depth according to the transform
node at LEVEL 2, then drawn in the order that they were added to the LEVEL
3 group node. I don't want to sort by depth according to LEVEL 4.

By fiddling with setRenderBinDetails and setNestRenderBins for some reason
I can only get the whole thing to sort by depth, or the whole thing to sort
by traversal. My understanding of the renderbins isn't great especially
where setNestRenderBins comes in.

Is there some magical combination of bin settings I can set that will make
everything sort properly? Am I doing this completely the wrong way?

Any help is appreciated!

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

Reply via email to