HI Fred,

On Sun, Oct 3, 2010 at 5:46 PM, Fred Smith <[email protected]> wrote:
> 1) In the following message:
>...
>
> So why would I want to define a custom scene graph for a slave camera, and 
> how do I do that anyway?

For HUD's and render to texture techniques like distortion correction
are great uses of slave Camera that has it's own scene graph, in both
these cases you also change the ReferenceFrame to be ABSOLUTE_RF so
that the slave also ignores the parents projection and view matrix
settings as well as the the view's scene graph.  Have a look at the
osghud and osgdistortion examples to see this in action.

> 2) I am not used to doing this (usually I just create a Camera and add it to 
> a View, the Camera is never referenced anywhere else), but I understand that, 
> as per their osg::Node object model inheritance, Cameras can be added to 
> scene graphs, I guess to position them physically in the 3D space.
> When physically present in the scene graph, how are they being rendered, are 
> they just processed as a regular osg::Group, or is there something else I am 
> missing?

Paul has answered this so I won't dive in.

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.


> 3) osg::Camera indirectly derives from osg::Group. This means I can add child 
> nodes to a Camera. I might sound stupid here but I've never done that. Could 
> you describe to me a usage scenario? If my camera is moving in a car, my car 
> is most likely going to have a top-level group, and my camera will be 
> declared as a leaf node in there... but won't have child nodes. When would a 
> camera have child nodes? Spectacles in front of the field of view? Just want 
> to know if I'm missing something here too.

Paul's already tackled this.

> 4) Following up on question #3. I am a bit confused about the ReferenceFrame 
> member of osg::Camera, which is a member inherited from osg::Transform.
> I read somewhere that it is possible to make the Slave camera independent 
> from its master camera by setting its ReferenceFrame (inherited from 
> osg::Transform) to ABSOLUTE_RF. Right?

I believe I've already answered this above :-)

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to