Producing a stereo pair is a relatively simple process; rather than simply rendering a single image, one creates two related images which may then be viewed on a stereo monitor, in a stereo slide viewer, or by using colored glasses and an appropriate display filter.
Rayshade facilitates the rendering of stereo pairs by allowing you to specify the distance between the camera positions used in creating the two images. The camera position given in the rayshade input file defines the midpoint between the two camera positions used to generate the images. Generally, the remainder of the viewing parameters are kept constant.
There are several things to keep in mind when generating stereo pairs. Firstly, those objects that lie in front of the focal plane will appear to protrude from the screen when viewed in stereo, while objects farther than the focal plane will recede into the screen. As it is usually easier to look at stereo images that recede into the screen, you will usually want to place the look point closer to the camera than the object of primary interest.
The degree of stereo effect is a function of the camera separation and the distance from the camera to the look point. Too large a separation will result in a hyperstereo effect that will be hard to resolve, while too little a value will result in no stereo effect at all. A separation equal to one tenth the distance from the camera to the look point is often a good choice.
If you want to generate stereo pairs with parallel optical axes this option will not work, because it only affects the camera position. Instead, you must explicitly change both the camera position (eyep) and the look point (lookp). One way to do this is to invoke the C preprocessor in the source file, and use the -P command line option, e.g.:
#ifndef X #define X 0 #endif lookp X 0 0 eyep X -8 0
rayshade -P -DX=.5 rayshade -P -DX=-.5
If you want to quantify the distance to objects in the scene, refer to the information about generating Range Maps (Z buffer output).