Re: Stereo in VisAD

Hi Mike,

> It looks like the Geowall group (http://www.geowall.org) could be interested 
> in using VisAD for a new, OpenGL stereo compatible version of the
> Geowall display. I tried the VisAD "TestStereo" example with the Geowall (and 
> with other stereo display systems both Windows and Unix), and
> found that there was too much "eye separation" to get a good stereo image. I 
> found the same problem with standard Java/j3d examples.
> 
> So I am looking for a way to control the eye separation in the stereo 
> display. I tried changing things like "setLeftManualEyeInImagePlate" and
> "setRightManualEyeInImagePlate" to the same position with the j3d examples, 
> but still had too much eye separation (no change). Can someone
> point me to the correct method to use and property to change in a "Canvas3D" 
> (or elsewhere) that will allow me to adjust eye separation?

I don't know much about controlling stereo viewing in Java3D.
But once you know how to do it, VisAD offers two ways to
implement your controls:

1. By Extending visad/java3d/VisADCanvasJ3D.java. Note that
there are DisplayImplJ3D constructor signatures that accept
an argument of Class VisADCanvasJ3D, allowing you to pass in
an instance of your extension of VisADCanvasJ3D. Extending
VisADCanvasJ3D gives you all sorts of control over Java3D
set up.

2. By passing a Java3D GraphicsConfiguration instance to a
constructor signature of the standard VisADCanvasJ3D. If you
can control stereo via GraphicsConfiguration, then this is
the way to go.

> Also...
> Bill...Would you be willing to create a version of the VisAD spreadsheet that 
> allows enabling of stereo? It could be a separate stereo-only
> version, or one that is enabled by an external command line parameter like:
> 
> "-Dj3d.stereo=PREFERRED"
> 
> or through a option in a preference/pull-down menu.

The SpreadSheet is designed to allow you to extend its
classes to achieve this sort of thing. Specifically:

Extend visad/ss/SpreadSheet.java, and in constructor call
setSSCellClass(Class c) where c is the Class of your
extension of visad/ss/FancySSCell.java.

In your extension of FancySSCell, override the constructDisplay()
method of BasicSSCell.java, to change the line:

  if (Dim == JAVA3D_3D) newDisplay = new DisplayImplJ3D(Name);

to construct a DisplayImplJ3D with stereo.

Your users would then invoke the SpreadSheet via the command:

  java MikesExtensionOfSpreadSheet

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html