Re: [osg-users] stereo mode for part of a scene graph?

2010-03-31 Thread Robert Osfield
Hi Cory,

On Tue, Mar 30, 2010 at 7:50 PM, Cory Riddell c...@codeware.com wrote:
 In my scene graph, I have a static image for the background (a
 white-blue gradient). When I turn on stereo mode, I get a red stripe on
 the right and a blue stripe on the left side of the window. I thought I
 was drawing my background the same way statistics are drawn, but
 apparently I'm not (btw, stats draw just fine - no red/blue).

 What controls if something is subject to stereo separation?

Depth into the scene, if an object is on the image plane that the left
and right image with be co-incident, if the objects is deeper than
this then it'll left image will be to the left and right image to the
right, if it's at infinity then the left and right images, for a
correctly setup stereo display) should be separated by the interocular
distance (the distance between the eyes), if the object is in front of
the image plane then the two images will be swapped.

In the case of the stats these are just drawn on the image plane,
controlled by an override of the projection and view matrix so it is
in effect not computed in stereo at all.   If the stats did not use
their own osg::Camera to override the projection and view matrix then
you'd need to carefully position the drawables in depth and
orientation to match the position of the image plane in scene.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] stereo mode for part of a scene graph?

2010-03-31 Thread Cory Riddell
Robert,

On 3/31/2010 3:34 AM, Robert Osfield wrote:
 In the case of the stats these are just drawn on the image plane,
 controlled by an override of the projection and view matrix so it is
 in effect not computed in stereo at all.   If the stats did not use
 their own osg::Camera to override the projection and view matrix then
 you'd need to carefully position the drawables in depth and
 orientation to match the position of the image plane in scene.
   

I'll take a look at this code and see if I can do something similar for
the background stuff that I draw. Thanks for the hints.

Cory
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] stereo mode for part of a scene graph?

2010-03-30 Thread Cory Riddell
In my scene graph, I have a static image for the background (a
white-blue gradient). When I turn on stereo mode, I get a red stripe on
the right and a blue stripe on the left side of the window. I thought I
was drawing my background the same way statistics are drawn, but
apparently I'm not (btw, stats draw just fine - no red/blue).

What controls if something is subject to stereo separation?

Thanks,
Cory
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org