Hi Whu,

The TrackballManipulator operates in a mode where the virtual eye
separation is scaled relative to the distance between the eye point and
center of rotation.  This approach allows one to move around objects of
completely different scales i.e. whole earth or a single molecule and they
will sit centered on screen and with a comfortable eye separation.  While
this approach can be convenient and feel natural it's artificial, in the
real world our eyes don't actually work this this.  However, even with it
being an artificial way to manage eye separation it works really nicely for
a wide range of tasks.  However, it isn't a solution that can work in all
situations all the time.

In the case when you zoom in right in close to the center of rotation the
TrackballManipulator has to contend with another problem that is specific
to manipulators that more around a central point.  If you keep zooming in
so the look distance is close to zero and if you do nothing about this
basically for all intents and purposes the eye point stops and the
manipulator then becomes very unnatural to use as the end user isn't aware
that the look distance is now near zero.  A work around to this problem is
to change the zoom in behaviour when you get really close to the central
point, so rather then keeping on reducing the look distance you maintain
the look distance and push the central point away from the eye.  This
workaround is a bit crude but it prevents the worst of artefacts associated
with the look distance tending to zero.  When this work around is applied
the virtual eye separation will stop reducing further so this will be a
small discontinuity in behaviour.

>From your description it sounds like the mouse wheel modification of the
look distances doesn't have this workaround in place, which itself could
lead to problems if one then tries to pan, or rotate around the very close
central point, the stereo offsets would also differ to how the mouse button
drive zoom in behaves.

Is there a solution to this problem?  Well basically you shouldn't keep
zooming in as you simply can't keep a trackball working seamlessly with
very small look distances, it's not a case of bugs, it's a case of a
fundamental limitation with using trackballs when you zoom in too far
towards the central point things start going wrong and you have to come up
with workarounds not matter what you do.

In your own application you might be want it behave in a way that makes
sense for you application, what this might be I cannot say as I have
absolutely no clue about your usage model.  You are completely free to
implement your own camera manipulation and management of eye separation and
if the off the shelf functionality doesn't do exactly what you want then go
ahead a roll your own.

Robert.





On 24 September 2014 15:12, whu <[email protected]> wrote:

>   Dear all,
>
>   I used the stereo mode in my osg program, and the trackball camera
> manipulator.
>
>   But when I try to zoom nearer to the object, the mouse wheel and the
> right-key operation get  different results.
>
>   Using the right key (mouse) to zoom, it seemed that the eye separation
> changed bigger, and this make Physical discomfort.
>
>   Using the mouse wheel to zoom,  the result is right.
>
>   I just want to find the reason, because the "eye separation" problem
> lead to some other trouble.
>
>   Can someone give me some suggestions.
>
>   Thanks.
>
>   whu
>
>
>
> _______________________________________________
> 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

Reply via email to