robertosfield wrote:
>
> The only thing I'd add it's conceptually useful to not try and mix
> Camera's in the scene graph and Camera's attached to the View(er).
> Camera's in the scene graph should be seen as being specific to that
> scene i.e. a reflection effect, and overlay a shadow etc. While
> Camera (a master or slave) is about render the view of the scene,
> being in stereo, on a powerwall, with distortion correction or just a
> plain single window.
>
I'm still a bit confused about what happens when you have a Camera inside a
scene graph, how a Camera node behaves graph transformation wise, and the
rendering story of both Cameras - the top level one, and the one inside the
graph.
osg::Camera's computeLocalToWorld/computeWorldToLocal implement osg::Transform
by using their view matrix, exactly like a MatrixTransform node.
Imagine I have the following situation:
Code:
Viewer
+- ViewerView
+- View
+- Camera1 (view matrix = identity)
+- Geode representing a cow
+- Camera2 (view matrix = identity, RELATIVE_RF)
+- Geode representing a teapot
When I call viewer->frame() here, will Camera1 render the teapot, or will
Camera1 stop rendering the graph when meeting Camera2?
Similarily, when viewer->frame() is called, will Camera2 do its rendering, for
instance, if it is configured to render to a texture?
If Camera2 is configured to render to the main frame buffer, just like Camera1,
what will happen?
Now imagine Camera2 has a different, non-identity view matrix. When I call
viewer->frame() this time, the teapot will be positioned differently relatively
to Camera1, exactly as if Camera2 was a MatrixTransform (not Group) node, right?
So Camera2 did its rendering with the teapot in front of it, and Camera1
rendered the teapot taking into account the transformation defined by the view
matrix of Camera2. Right?
Cheers,
Fred
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32373#32373
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org