Hi Michael, On Thu, Nov 18, 2010 at 6:41 PM, Michael Platings <[email protected]> wrote: > The scenes are rendered to FBOs so they're not tied to any particular > window/context or display method. The scenario is that a user will set one > scene to be rendered and sent to an external display system at 60fps. Once > the first scene is rendering the user can request a preview of a second > scene. When the preview is ready the user can seamlessly switch the system > to rendering and sending the second scene at 60fps. > As far as I can see to implement a solution I'll have to duplicate a lot of > code from RenderStage/RenderBin, unless you can see a more elegant solution?
I think it'd be rather awkward to implement as you'd need to traverse the RenderStage/RenderBin's till a desired point then store the position that you'd go to, then on the next frame start at the same point. You can subclass from RenderBin so I guess you could probably implement it, but it wouldn't be straight forward. The way I'd be inclined to go would be to pre-process the original scene graph analysising it for how it might be rendered in sections. This partitioning could be done volumetrically, or just on number of and sizes of objects. Once you've got the leaves of the scene graph partitioned you could then build a series of scene graphs that will be able to render that part of the scene. If you do just do the partitioning volumetrically then you could probably cut a lot of the faff and just use multiple Camera's with different view frustum to cull the scene. For instance you could just render the scene in a series of depth partitioned chunks from back to front. This approach would certainly be the easiest to implement as you wouldn't need to modify the scene graph, just the projection matrix settings of the RTT Camera. You'd need to make sure you enabled culling on the near and far planes, and disabled the compute of near/far, but this is all pretty simple. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

