NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: stereo displays

Hi Curtis-

Curtis Rueden wrote:
Hi everyone,

I put some code into VisBio a while ago to enable stereo displays for Java3D displays. I just copied the logic from TestStereo that gets a GraphicsConfiguration with stereo enabled, if one is available, and uses it when constructing a new DisplayImplJ3D.

Recently a user told me that the stereo looks wrong on his machine, like the image is way too close to the eye or something. I have no stereo setup of my own to debug this, but I did browse around the Java3D FAQ a little and found out that you're supposed to call Canvas3D.setStereoEnable(true) somewhere in order to toggle stereo on (http://java3d.j3d.org/faq/stereo.html). I noticed that nowhere in the VisAD source code is this call made. So, is it actually necessary? Could this be causing a problem like the user described? Anyone have experience enabling stereo for VisAD/Java3D?

The thing we found was that the default eye separation was not
correct.  In the IDV, we set the eye separation as follows:


    protected void setEyePosition(double position) {
        DisplayRendererJ3D rend
            (DisplayRendererJ3D) getDisplay().getDisplayRenderer();
        // From Dan Bramer
        PhysicalBody myBody = rend.getView().getPhysicalBody();
        myBody.setLeftEyePosition(new Point3d(-position, 0.0, 0.0));
        // default is(-0.033, 0.0, 0.0)
        myBody.setRightEyePosition(new Point3d(+position, 0.0, 0.0));
    }

and by default, call it as:

            setEyePosition(0.004);

Ideally, we should have a widget so the user can set it to whatever,
but this seems to work for most cases.  Like you, not having a stereo
display makes it difficult to implement and test such things.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
        "Time makes everyone interesting, even YOU!"
*************************************************************



  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: