Why anaglyphs? - How anaglyphs work - Recommended Further Reading
How we make anaglyphs (tutorial)

Why anaglyphs?

There are a number of ways to use a two-dimensional medium like a computer screen to display three-dimensional information. However, all of the methods used have limitations of one form or another since any method of "projection" of 3D into 2D space must accept the limitations of the medium being used (the various projections used to render maps of the round Earth onto flat spaces are perhaps the most famous example of limitations of 2D/3D translation.) The anaglyph format also has the advantage of being inexpensive to print and display, and viewers are easily available (for example, 3D glasses often come as a free bonus to 3D comic books, films, and software - one such anaglyph-enabled application, shipped with several pairs of red/cyan glasses, is in the "Further Reading" section below). Many suppliers are offering low-cost or free 3D glasses due to the surge in interest in anaglyphs since that's the format being used to display Mars imagery from Spirit and Opportunity, NASA's two rovers which were exploring Mars when this page was written.

Different major methods of viewing 3D imagery on a 2D display
Technique Advantages Disadvantages
Anaglyph Processing is simple and can be performed in commonly-available image editing software; required viewing glasses are inexpensive and easily obtained; processing costs per image are relatively minimal; can be cheaply reprinted in magazines or newspapers as well as displayed on screens Does not yield true color when viewed through glasses; some images (with high red, blue, or green content) not well-suited to anaglyph process; in some cases, "ghosting" can occur which interferes with 'good' 3D
LCD shutter glasses Can be installed on various computer systems ranging from high-end professional systems (e.g. NASA crew training systems or specially-outfitted movie theaters) to home-based computers for use in entertainment software); capable of displaying full-color 3D imagery; technology is fairly mature More expensive to implement than anaglyphs; special software required for processing and viewing; viewing equipment is expensive (approx. $1,000 for home-use glasses); cannot be used with LCD displays found on many modern computers and on all laptop computers; cannot be used for print media
Cross-polarized screen Can display color data in true color; does not require viewer to wear special glasses; polarized print media can be produced Special software required to produce 3D imagery; available on few systems; viewer must sit at a certain point in front of screen to properly see stereo effect; expensive in electronic form; expensive to print
Stereo pair Can display 3D in full color; no special viewing equipment required; can be used for print or digital media Not everyone can "see" the 3D effect in stereo pairs; optional special viewers not widely available; not easily usable for animated 3D imagery


How 3D anaglyphs work

Binocular vision, or the ability to view a scene through two points of view simultaneously (three would be trinocular), is the evolutionary gift that allows us to see things in three dimensions. Our forward-facing eyes set close together in the front of our skulls trade the ability to see beside or behind us for the ability to judge the distance and size of objects in front of us. Each eye sees a slightly different scene -- you can test this by holding a finger in front of your nose and alternately closing your eyes; the finger will seem to move from side to side. This effect is called parallax and is the principle behind the brain's ability to visualize a scene in front of you in three dimensions. For depth perception to occur as intended, each eye must see the image that was intended for it to see and nothing else; all methods for displaying three-dimensional scenes on a two-dimensional surface must find a way to ensure that the two scenes are properly presented to the correct eye and that the other eye only sees its own scene.

[Image showing a typical color wheel]Anaglyphs achieve this important step by using principles of color to separate the two images from one another. The anaglyph itself is a single image, generally appearing grey (red/cyan), yellow (red/green) or purple (red/blue) to a viewer who is not wearing the special glasses. However, when viewed through the glasses, the image suddenly becomes three-dimensional. This is because the anaglyph glasses have separated the images so that each eye sees the one it is meant to. But how does this work?

To the right is a color wheel of the type shown in one of the default Macintosh color pickers (so many readers will probably be familiar with it). The colors typically used in anaglyph-format images are widely spaced on the color wheel (red/green, red/cyan, and red/blue). Viewing the color wheel through anaglyph glasses will show that the red side of the color wheel appears bright through the red (left) lens and dim through the green, cyan, or blue (right) lens. The reverse is true of the opposite side of the color wheel viewed through the other lens of the glasses. Also note that the "neutral" color of each form of anaglyph is located between the two colors; the following table shows examples of all three types of anaglyph.

Section of Spirit Mars Exploration Rover anaglyph in all three formats
Red/Cyan Red/Green Red/Blue

Notice that the red/green anaglyph (center) has an overall yellow cast, while the red/blue anaglyph has a purple cast. Only the red/cyan anaglyph appears to have no tint. Now look at the color wheel, or specifically, at its periphery: yellow is midway between red and green and purple is midway between red and blue. Because red and cyan are on opposite sides of the color wheel, their "combination color" is dead center -- white.

All three will yield a good three-dimensional effect through typical 3D glasses, but the red/blue anaglyph will look darker than the same scene rendered in either of the other two methods. In addition, only the red/cyan anaglyph resembles a typical black-and-white photograph, so many viewers find red/cyan anaglyphs to be the most aesthetically pleasing. However, in the past we have published anaglyph imagery using the red/green format to make it apparent to readers that images in the articles were in fact 3-D and would yield depth if viewed through the glasses which accompanied the journal.

Producing anaglyphs

Anaglyphs are created from stereo pairs, which can be created from color or black and white film. (The latter will, in fact, create a better illusion of relief; please see our tutorial for more information this will produce red/cyan anaglyphs). Stereo pairs, in turn, are created by photographing the same object from multiple viewpoints.

Say cheese! (MER Pancam)

One way to do this is by rotating the object being photographed while holding the camera steady. This is how our EM anaglyphs are created - the camera is part of the electron microscope itself and cannot be moved, so the specimen stage is tilted between exposures to create two different viewpoints. Another way is to build a rig that holds two identical cameras, set parallel to one another and using the same sensors and lenses to ensure that the only difference between the images is the location from which they were taken. It is this method that was used to create anaglyphic imagery from the Mars Exploration Rover mission - this diagram of the rover shows the main Pancam mast (pictured above), topped with two identical cameras and the hazard avoidance cameras, mounted in pairs on the front and back of each rover. Each pair of cameras, when triggered, generates a stereo pair. (The rover's Microscopic Imager, however, is a single-camera system and does not produce image pairs.) The same method was used by Sports Illustrated magazine when it hired photographer David Klutho to cover the Sydney Olympics -- in 3D! His cameras were custom-made to be fitted with two identical lenses and mounted on a special tripod head.

Recommended (Further Reading, Applications, 3D Glasses Sources)