[osg-users] Recommended way to render a scene from multiple independent viewpoints

Hannes Naude naude.jj at gmail.com
Tue Apr 11 04:08:55 PDT 2017


Hi all

I am trying to render a single scene from multiple viewpoints. I initially
implemented this with a compositeviewer as per the osgthirdpersonview
example. This worked fine except that my update callbacks appeared to be
getting called more than once per render cycle. I assumed that the update
traversal was being done for each view separately and therefore nodes that
are present in multiple views will have their update callbacks called
multiple times. So, at this point I tried to do the same thing but with a
single View, somewhat similar to the osgCamera example. But, I do not want
to add my cameras with viewer.addSlave as I want them to move independently
of one another. So I tried adding them into the scene graph and giving each
their own GraphicsContext, but even though the windows corresponding to
these GraphicsContexts get created, it appears as if all rendering is done
in a single window with multiple viewpoints being rendered over one another.

Obviously there are many ways to skin this cat, but I would appreciate some
guidance on the recommended approach. To recap my requirements are :
 - Multiple cameras viewing the same scene.
 - Camera positions and orientations must be independently controlled.
 - Node update callbacks should be called only once per Node per render
cycle.

Any help will be appreciated

Regards
Hannes Naude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170411/7493da29/attachment-0001.htm>


More information about the osg-users mailing list