Hi Franz-Josef,
The TrackballManipulator and the Drive/FlightManipulator manage the
inter-occular in difference ways to achieve different type of interactive
stereo experience.
The TrackballManipulator is meant to place the center of rotation of the
manipulator at the image plane, and as you zoom in/out from the centre of
rotation the effective interoccular distance is scaled relative to the
distance between the look point and the centre of rotation. This style of
management of inter-occular distance works well for dealing with scenes
where it's adventagous to scale the interoccular distance to fit what you
are focus on and the scale of the object you are focus on. For instance it
works just as well for a molecule visualization and a whole earth one, it
is however, not a real-world type of management of stereo - it's not how
eyes work in the real-world.
The Drive and FlightManipualtor by contrast are used in the context of real
worlds - you drive or fly around a real-world scene, and when you are in
stereo you want the scene in front of you to look correct in stereo as if
you were really looking at the scene in front of you in the real-world.
With this real-world scenario you want don't want to scale the interoccular
distance, instead you want it to map directly to the real-world size i.e.
around 6cm.
The mechanism by which the CameraManipulator inform the viewer how to scale
the interoccular distance is via the getFusionDistanceMode() and
FusionDistanceValue, see below extract from include/osgGA/CamareManipulator.
/** Get the FusionDistanceMode. Used by SceneView for setting up
stereo convergence.*/
virtual osgUtil::SceneView::FusionDistanceMode
getFusionDistanceMode() const { return
osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE; }
/** Get the FusionDistanceValue. Used by SceneView for setting up
stereo convergence.*/
virtual float getFusionDistanceValue() const { return 1.0f; }
I mention all this as it will go some way to explaining why you are seeing
a difference.
The next question has to be what is the appropriate behaviour for you
application. A single sphere doesn't really tell us what you are trying to
do with your application - is it virtual scene where it's appropriate to
scale the virtual interocular distance by the the distance between the look
point and the eye point or is a visual simulation of the real-world? If
you want to use a DriveManipulator and expect the same results as the
TrackballManipulator how would you intended the interocular distance to be
scaled? There isn't a center of rotation for the Drive and
FlightManipulator so there isn't any natural way of controlling this - your
application would have to control it in some way.
There is also the issue of scales, if you want to visualize a molecule in
stereo at it's correct real-world size then it's kinda pointless doing it
in stereo, also if you want to visualize a world with correct stereo for a
real-world view from space of that world then in effect everything in
stereo terms would be treated like it's at infinite with a gap between them
physically on the sceen in front of you of 6cm.
This all questions that I can't answer - it's down to you to decide what
effect you are after, perhaps the complexity of doing stereo has been
hidden from you too much by the OSG's ability to produce a good result for
most models out of the box.
Robert.
On 15 August 2014 14:37, Franz-Josef Schneider <
[email protected]> wrote:
> Hi,
> I used OSG since several years to demonstrate difficult geometrical
> problems in stereo mode to my students. I use a powerwall with horizontal
> split configuration. In general it works fine, but I have problems in the
> following cases:
> 1. When I switch in my viewer with help of an event from Camera
> TrackballManipulator to Camera DriveManipulator the stereo configuration is
> disturbed. The disparity of the two images is too large. You can see it in
> my attached image. (To create the images I used Anaglyphic stereo mode on
> my Laptop).
> 2. When I pick a single object and move it out of the screen near to
> myself or far away from myself the disparity will also be increasing. The
> two images are divided out more and more. For moving a single object I only
> change the matrix of a parent MatrixTransformnode. In contrast the "normal"
> viewerzoom of all objects works fine.
>
> In both cases I change nothing on viewer or camera settings. As a
> workaround I currently decrease the eye separation in the DisplaySettings,
> but that isn't be a good solution.
>
> I use OSG3.2 Version ! Have someone an idea for a solution.
>
> Thank you
>
> Cheers,
> Franz-Josef Schneider
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60672#60672
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/stereoproblems_247.jpg
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org