Hi Aurelien, Oh, that's an interesting idea that not intrude the scene graph but with a special renderbin mode. I have never tried but know there is a Camera::setRenderingCache() method that would provide RenderStage instance corresponding with each camera node. It is used in osgUtil/CullVisitor, which has an internal RenderingCache class. Maybe you could do something here to replace the RenderingCache to your own one.
W.r.t the creation of RenderBin instances, it is done in CullVisitor::pushStateSet() and can hardly be re-implemented unless you rewrite some source code of OSG itself, I think. Hope it helps, Wang Rui 2013/1/2 Aurelien Albert <[email protected]> > Hi Wang, > > Thanks for your quick answer ! > > I'm already doing pre and post-processing of various king : tone-mapping, > DOF, motion blur... using multiple cameras, slave or childs. > > Now I'm trying to create custom renderstages, without multiple cameras, > but using a RenderBin prototype. This could be very usefull in some > situations, for example : > > - having a graph with a parent group and 3 childs : "A", "B" and "C" > - render node "A" and node "C" using a custom pre-renderstage > - render node "B" as usual > > To do so with multiple cameras, the graph need to be manipulated to create > a new camera and move "A" and "C" under this camera. > > Using a custom RenderStage registered as a RenderBin prototype, there is > no need to edit the scene graph, but just edit the "RenderBin" of A and C > statesets. > > In this situation, culling and events traversal are also done as described > in the "main graph" : > > - parent > ---> A > ---> B > ---> C > > But whith multiple cameras it leads to something like : > > - parent > ---> child camera > ------> A > ------> C > ---> B > > > > Cheers, > Aurelien > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51748#51748 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

