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.

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


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


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.
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.


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.


Ethan A Merritt.
Back to top Raster3D homepage