[osg-users] Binding the Trackball Manipulator To Cameras
Robert Osfield
robert.osfield at gmail.com
Thu Nov 1 02:31:54 PDT 2007
Hi Kim,
Have a look at the way osgdistortion works, it renders the scene to a
texture that inherits the master cameras projection and view matrix.
Then a slave camera works as in HUD style, with an absolute projection
and view matrix to render the distorted mesh. You'll want to do
something quite similar.
You could also have a look at the src/osgViewer/View.cpp
implementations of the View::setUpViewFor3DSpehericalDisplay and
setUpViewForPanoramicSphericalDisplay as they use a combination of
relavative and absolute cameras to get the final result.
In the mid-long term I'd like to see stereo support/novel display in
the OSG all moved into osgViewer rather than osgUtil::SceneView as
this will make it much easier to implement techniques like you are
tackling in a coherent way to the way we enable other stereo modes.
Doing at the high level also provide performance benefits.
Robert.
On 10/31/07, Kim C Bale <K.Bale at hull.ac.uk> wrote:
> Hi all,
>
>
> I'm trying to output a stereo format for the Phillips 3Dwow display. Basically what I need to do is split the screen in half horizontally, rendering the scene on the left and the depth buffer on the right.
>
> That isn't a problem, but the phillips stereo format dictates that I must add a header to the images sent to the screen. Therefore I must first render the scene to a texture add the header and then display a texture mapped polygon as the screen output. I've done this using code from the osgprerender example in the 2.2 distribution.
>
> The problem that I'm having is that I would like to use the osgGA::TrackballManipulator to interact with the scene, however if I add this to the viewer, I can only interact with the main camera which in this case is the one viewing the texture mapped polygon. I would like to link it to the prerender camera which is looking at the scene rather than the texture.
>
> Is it possible to bind the matrixmanipulators to differant cameras? If so I'd be very grateful if someone could point me in the right direction.
>
>
> Thanks,
>
>
> Kim.
>
> *****************************************************************************************
> To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html
> *****************************************************************************************
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
More information about the osg-users
mailing list