Hi Paul P. and JP,
SHORT FORM of my original question: If I can have a shared scene
graph attached to multiple camera, how do I update my scene graph
(i.e. change a MatrixTransform) such that different scenes are drawn
for each camera?
I don't think you can easily do this in a single OSG frame, because you
actually want multiple OSG frames (modified scenes) to contribute to
your final "frame". That is why I suggested you do the updates in
multiple OSG frames and only make every 16th one visible to the screen.
It might be a bit hard to manage, but you could probably set up the
scene so that each time an object needs to move, you actually copy the
MatrixTransform 15 times with 15 different node masks where each one has
the next position for the object. Then you could have 15 RTT cameras,
each one having the cull mask set as one of the 15 masks you used for
the transforms. Then the main viewer's camera would just render to a
fullscreen quad using the previous 15 textures from the 15 RTT cameras.
RTT passes will not wait on vsync, so you'd get what you want - 15
images at 15 points in time, all 15 rendered as fast as possible, and
the last one using those results and waiting for vsync.
As I said, the part that will be hard to manage is the 15
MatrixTransforms for each object that might move, but you could possibly
encapsulate that in a class derived from MatrixTransform - actually it
might even be easier to derive from MatrixTransform, override the
traverse() method and check which camera you're rendering before setting
the position instead of using node masks... But anyways, I'd try one of
those ways.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org