It appears you've answered your own question here, as all you need to do is set
slave camera view matrix "offsets" (rotations, actually).
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Yes, slave cameras inherit the master camera's view *and* projection matrices (with
optional offsets).
/ulrich
One thing to remember is to set the reference frame for the slave cameras to RELATIVE_RF
in order to use the master camera's matrices with offset.
- matrix::rotate uses radians (not degree) so use osg::DegreesToRadians()
- offsetting the projection matrix is a bit tricky (and I assume you didn't really want to do that). Probably you wanted something like this
addSlave( cam,
osg::Matrix::identity(),
osg::Matrix::rotate( osg::DegreesToRadians(xyz), 0,1,0 )
and set the master projection matrix such that it already fits.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33779#33779
The osgViewer::View::setUpViewFor3DSphericalDisplay(..) provides a
slave setup of 6 slave cameras that render to texture cube map and a
final slave camera that renders this cubmap to distortion correction
mesh. The cubemap rendering is for full 360 degree view, The source
code can be found at OpenSceneGraph/src/osgViewer/View.cpp. You can
also run osgviewer with the --3d-sd command line option and it'll run
with this view setup. The distortion correction is appropriate for
Pufferfish display that uses a single projector with a fish eye lens.
Robert.