Classically, so-called Single Image Random Dot Stereograms (SIRDS), or Single Image Stereograms (SIS), are edifying and instructional, if handled properly. The creation of these images involves principles ranging from parallax of vision geometry to techniques in perceptual input designed to trick the eye into seeing three-dimensional figures. Thus, having researched the theory and mathematics underlying the generation of SIRDS and SISes, our project has taken the form of a Random Dot Stereogram Ray-tracer, based in part upon the ray tracer model established in Assignment 6, and incorporating the algorithms and data structures necessary to render the ray tracer geometric primitives in proper stereographic form. We were then additionally able to synthesize several of the resulting images into a Random Dot Stereogram animation, using the tools provided in Assignment 7 along with special techniques specific to stereogram animations.
For assistance in seeing the 3d imagery contained in random dot stereograms, please visit the Magic Eye help page. There are also many fine samples on the Magic Eye web site to practice with. Note that these images are not random dot stereograms -- using distinctive images and patterns in place of random dots -- but they are created using and operate on the same principles.
A ray-tracer model is particularly effective in creating such images, since the only data necessary for the process are the visual depths of particular objects at all pixels. Thus, we modified our ray-tracer code from assignment 6 to first create a two-dimensional array of distances found by the initial casted rays from the "eye" through each pixel. Note that all color and lighting information, as well as all reflection and refraction rays, and recursion, are not useful in this context.
Having collected a two-dimensional depth field, we then applied a venerable random-dot stereogram creation algorithm, which, in essence, calculates the correct optical seperation such that when the eyes focus at the proper depth, pixels of the same (random) color converge in the scene. This creates a pleasing 3-dimensional representation of the ray-tracer input geometry.
One of the consequences of this algorithm and its inherent geometric representations is the pecular property that the depth resolution is some 1/7th that of the horizonal/vertical resolution, as shown in the following image. Note the "staircase" effect on the depth (z) axis:
One solution lies in expanding the x-axis scanline array by some superscale factor, and then proceeding to interpolate with respect to color in the final scanline array creation. The following image depicts the same scene, rendered with a superscale factor of 12. Note the severe reduction in "staircasing".
Due to the nature of the trickery we attempt to play on the eye, a stereogram that attempts to depict a depth greater than twice the distance from the viewer's eye to the screen is apt to provide seemingly ambiguous and confusing depth information. Therefore, we have scaled all objects detected by the raytracer with respect to a background positioned at a default of the equivalent of 700 pixels behind the viewscreen plane, which value we also use as the default eye-screen distance. This generally provides an image with enough depth to be visually convincing, while preventing disorienting sudden large changes in depth. We have disabled intersections for planes in the raytracing process, since they have the exasperating tendency to approach infinite depth, which baffles the viewer's sense of depth percetion and renders the scaled geometry as comparatively flat.
The archetypal method of creating an animation is, of course, to display frames in sequence, each frame having objects in a slightly different position, thus tricking the eye into observing motion. Unfortunately, this process has pitfalls when dealing with random dot stereograms, since by their very nature the color of the dots which correspond to a particular depth are generated randomly at run-time. The key to viewing the animations we have created is to first run the animation, find the proper focus on the last (frozen) frame, and then run the animation again, concentrating on the depths of the objects themselves rather than on the colors that seem to make up the object. The experience is somewhat analagous to watching a television that has a large dose of static in the reception. It is not analagous to Eggs Benedict. More's the pity.
Here's a robot floating around.
The following are the raytrace test cases provided with Assignment 6, rendered in random dot stereogram form. Clicking on an image will bring up the original ray-traced version, for reference. Each has been rendered with a supersample factor of 12. "test3.in" was omitted since it prominently features a plane (which does not get rendered), and not much else.
There is a fine line between genius and insanity. We have erased this line.
Copyright © 2001 / Last Updated 10 January 2001 / All Rights Reserved