Sections

History

j3d.org

PC Stereo

  • Paul Szawlowski from the University Of Vienna, Department of Medical Computer Sciences has sent us this interesting piece of code that shows an alternative tactic to rendering stereo on PC systems without using Java3D's inbuilt system. Here is his explanation of how it all works:

    Beside generating stereoscopic pictures with the help of a Quadbuffer, which is the native way that Java3D supports stereo, there exists also other stereo formats. One of them is called is called "Above-and-Below Format" and can be used with any graphics card (your monitor should support at least 120 khz). Only a small device coupled with shutter glasses from Stereographics is needed.

    In this format the screen is split and the images for the left and right eye are vertically squeezed and put in the top half of the screen and the bottom half of the screen respectively. The device from Stereographics is between the connection of monitor with the graphics card and doubles the vertical frequency of the monitor without altering the graphics card frequency. Now the following happens: Only half of the graphics card buffer is read when the ray of the monitor ran over the whole screen (since the monitor frequency is doubled). In this way the image of one eye is stretched to fit the whole screen. Then the ray of the monitor starts again and the other half of the graphics buffer is read and stretched again to the whole screen. This is synchronized with the shutter glasses to generate the stereoscopic effect. In reality there must be a little gap between the left/right eye images since moving the ray to the beginning of the screen needs some time. To use these technique you need the equipment from Stereographics and you must render the scene according to the "Above-and-Below" format.

    This demo shows the principle how one can do this. Right know I use two Viewplatforms coupled together to get a seperate image for the right and left eye. The graph looks like this:

            TG1
             |
        +----+----+
        |         |
       TG2       TG3
        |         |
      VPleft   VPright
    
    
    TransformGroup TG1 is used for moving the "head" and TransfromGroups TG2 and TG3 are used to alter the focus point. Use the <,> keys to change the focus point. Use the constant EyeWindow.BLANK_INTERVAL to adjust the gap between the images for the left and right eye.

    The following improvements are planned (not too soon):

    • Remove compatibility mode
    • It would be better to set the images of the left and right eye in one window instead of using 2 windows. Since there is a gap between, there might be artefacts from the desktop surface, which can be seen. Full screen mode, if available, is the preferred configuration.
    • I want to use the monoscopic view policy to get the left and right eye view. But I'll have to find out how to set the focal point in this case. Some experimenting work has to be done to find a solution for that.

    Download the code (A zip file):

    To run the demo, type
        java StereoTest.StereoTestMain
    
    The zip file also includes the source.

    A lot more details and good hints what one should pay attention to when generating stereoscopic images can be found in the following documents:

  •