[osg-users] Fine-grained render ordering

Robert Osfield robert.osfield at gmail.com
Tue Apr 26 03:01:30 PDT 2011

Hi Craig,

The best way to manage render bin is vis State::setRenderBinDetails(),
and in the 2.9.x dev series you can now select a render bin that sorts
on traversal order of a subgrpah which makes some techniques easier -
use the RenderBin string "TraversalOrderBin" to select this bin.

If you want to create and chain RenderStages then using an osg::Camera
in the scene graph is often one of the best ways to do this, and use
the Camera::setRenderOrder(..) to control the order.  You can also use
a custom cull traversal callback to create RenderStage/RenderBin and
assign these to the rendering backend, but this does require a greater
knowledge of the internals of the rendering backend.


On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma <craig.bosma at gmail.com> wrote:
> Hi,
> I'm working on a shader-driven graphics pipeline for an OSG-based app, and I
> want to better understand how I can better control the rendering order. I
> want to render my initial scene to several texture targets, with opaque and
> transparent objects handled separately. Currently I do this using node
> masks, but from this thread
> (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it
> would be better to use renderbin/renderstages. I have several more
> post-processing stages to follow, so I'm convinced that's the way to go for
> me to have full control over the pipeline.
> I've dug into the source for SceneView, RenderBin, RenderStage, etc. but
> it's not obvious to me how to shift objects from one bin to another (aside
> from setRenderBinDetails), or how to add stages that form a dependency
> chain. If anyone has examples or general advice on where to look, I'd be
> glad to hear it.
> Thanks,
> Craig
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list