# STEREO3D

#### SYNOPSIS

stereo3d is a shell script that renders a single Raster3D input file as a side-by-side stereo pair.

    stereo3d [options] [-png] [outfile.png ]  < infile.r3d > outfile.png
    stereo3d [options]  -tiff [outfile.tiff]  < infile.r3d > outfile.tiff

stereo3d uses the Raster3D utilities normal3d and render, and the ImageMagick image processing package.

Input is from stdin, output is to stdout unless explicitly given on the command line. Default output format is PNG, but TIFF output can be chosen instead. Intermediate files are created in directory $TMPDIR, if defined, otherwise in /usr/tmp.

- By default stereo3d generates stereo separation by applying a shear operator to the left and right images. The -angsep option allows you to instead generate stereo separation by rotation rather than shear. Neither method is perfect, so you can't win. Below is a summary of the weak points of the two methods.

                                    shear           rotation
                                    -----           --------
         Bounding planes            always bad      OK
         shadows                    often bad     	OK
         Z-clipping                 OK              serious problem
         specular highlights        OK              minor problem

#### EXAMPLES

If the following line would render single image:

    	render -png single.png < input.r3d

then the following line would render the same scene as a stereo pair instead:

    	stereo3d -png stereo.png < input.r3d

#### OPTIONS

-angsep
  By default the stereo effect is created by applying a shear operator to the left and right views. The -angset option instead creates stereo by offsetting the two views by an angular separation of +/- 2.5° from the original setting.
-border
  By default the left and right images are placed next to each other with no intervening space and no frame around them. The -border option requests a 4 pixel wide black border separating and surrounding the component images.
-size HHHxVVV
  Force the size of the left and right images to HHHxVVV pixels, overriding whatever values are given in the input file.

#### ENVIRONMENT

This script requires the ImageMagick image processing package. By default stereo3d invokes render with the option -labels so that labels are processed in stereo also.

#### AUTHORS

Ethan A Merritt.

Back to top Raster3D homepage