How to Make 3D Anaglyph Images in Photoshop

How to Make 3D Anaglyph Images in Photoshop

I have the notion that should I ever have children, I will be one of the coolest (read: “geekiest”) dads ever. I will teach my children things like how wine and beer are made, what makes an airplane fly, and why the sky is blue. And even if they should ever precociously ask where babies come from, I will explain it to them in full detail: the same place where beer comes from… “a kit that your mother and I bought at a store.”

Needless to say, I want to foster the spirit of learning and building things. And when we at UPT got a hold of red-and-cyan 3D glasses, I wanted to try making 3D anaglyph images. I can see in my mind’s eye, a child’s voice asking me: “Daddy, where does 3D come from?” It’s very likely that there are already mobile phone apps out there that will generate a 3D anaglyph image for you automatically. But I’d rather not my children learn 3D from the streets, or the media. I rue for the days when sex and violence was all the gimmick that was needed to hook an audience. Now 3D is so ubiquitous, children will be exposed to it at a much earlier age.

We see the world as flat images. Depth is only inferred through context and stereoscopic vision. We merge the slightly dissimilar images from both eyes and in a way, triangulate depth. Try touching the tip of your index fingers with only one eye open. It’s more difficult than with both eyes

With only one image for reference, depth can be very difficult to assess– an illusion that filmmakers can exploit. To create the illusion of depth in films, two images are simultaneously projected onto the screen. Special glasses filter the image so that each eye will see ofsetted images. The brain merges the two images and the illusion of depth is created. Currently, a lot of home theatre set-ups will use an active shutter system, where the lens of the eye piece will quickly alternate on and off in synch with alternating images on the tv set. Movie theaters generally use a passive system where the lens will filter out light.

For the purpose of this tutorial, we’ll be doing it old school with a pair of red-and-cyan anaglyph glasses.

Generate the Images
To create a 3D anaglyph, you will need two images of the same scene taken from slightly offset positions. This will mimic the offset of the human eye. I used my phone camera to take these pictures.

Side by side, the differences are subtle. An animated gif will make their differences apparent. Using two cameras placed side by side with a special mount will minimize errors. I used a single camera, and this requires some manual correction to fix the alignment.

Align the Images
The images need to be aligned. In photoshop, bring both images onto separate layers. Create groups labelled left and right, and place images into their respective group. Change the transparency of the top layer to 50%. This will enable you to see both images and align them.

The image needs to be on the same vertical plane. Find reference lines and use them to align the image vertically. I used the top of Mickey’s ears. This may require rotating or slight resizing the top image.

Pick a focal point and use that to align the image horizontally. The focal point will be relatively aligned, but you will notice that the other elements will be offset. Crop the image to frame it.

An animated gif shows how the newly aligned image will look in 3D. Compare it to the previous animated gif. Alternating blinking your right eye and left eye may also produce an effect like the animated gif.

Create the Image for the Left Eye
Temporarily hide the right image, we’ll be working with the left image first. To create an image that is only visible for the left eye, it must be filtered out by the right lens. The right lens is cyan, therefore a cyan image will be invisible in the right eye, but visible in the left.

The photo above demonstrates how the different lens filter out different colors. To do this, create a gradient map on top of the left eye image. Its color will be from cyan to white. I found it helpful to wear the 3D glasses when selecting the correct shade; it will generally be very close to #00FFFF.

Create the Image for the Right Eye
Unhide the right image. Change its transparency level back to 100%. Create a gradient map for right image, this time from red to white. Again, wearing the glasses will be helpful. It will probably be close to #FF0000. An image that is red will be filtered out by a red lens, and therefore be invisible.

Combine the Image
The final step requires merging the red image with the cyan image. Select the top group, and change its blend option to multiply. It’s important to select the group and not the image itself, since the blend option needs to apply to both the gradient map and the image.

This will produce the final image.

3D Anaglyph of Mickey Mouse

Why the Multiply
For those who are curious about the math involved… Consider the three RGB channels. The red image will range from WHITE, #FFFFFF, (1.0, 1.0, 1.0) to RED, #FF0000, (1.0, 0, 0). Note that the color triplet is expressed as a normalized value instead of an integer. The normalized value can be calculated as VALUE/255. The cyan image will range from WHITE to CYAN (0, 1.0, 1.0).

The multiplication of two color values (R1, G1, B1) and (R2, G2, B2) will equal (R1xR2, G1xG2, B1xB2). RED x CYAN = BLACK. (1.0, 0.0, 0.0) x (0.0, 1.0, 1.0) = (0, 0, 0) or BLACK. Grays are achieved through the multiplication of different intensities of red and cyan. YELLOW (#FFFF00) and BLUE (#0000FF) would also work because they complement each other on the RGB color system the way that RED complements CYAN.

Color Anaglyph
Colors anaglyphs are just as simple to produce. The difference in procedure would be to remove the red output from the left image and the green and blue output from the right image. And instead of multiplying the two images together, you would do an add (or a screen). This preserves the color values from the channels. The math, which is obvious enough if the explanation about color multiply was of interest to you.

Black and white was just how I learned first. And it is a simpler story to tell. And that, children is where 3D comes from. Next time, I’ll tell you how I met your mother.

Posted by Tate Srey. You can also talk at him on Facebook.

** Update
I’m glad so many of you have found this tutorial useful. Thank you for reaching out!

…and no, I’m not related to Tate’s Comics.

Tate Srey

Tate Srey - Tate Srey is an artist and an engineer. He is a nerd who likes to lift heavy things and put them back down again. He loves to run and swim and build things. He makes his own wine and beer, and dies a little inside when he has to pay more than $5 for draft. He has a natural affection for people with a teacher's spirit-- those who will share their knowledge and experience with others. Some men just want to watch the world learn. Tate can be found on Facebook, Twitter and LinkedIn.


  1. […] is a sense of space and form. Here’s a link that I followed to create your own 3d image: click! To see these types of images, classic 3d glasses are needed. I researched the material used to […]

  2. Hello Tate 🙂

    My name is Mike. I am from Cape Town South Africa and im having no success finding anyone who can advise me on 3D film tips in my country. Your posts are most helpful. Thank you for sharing. May out line what i’m trying to achieve with a concept I have for my business and if you can let me know if it is possible and maybe how so I would be so impressed and extremely grateful for your help.

    I have the idea of providing stimulating visual effects that pop off 3d smart TVs at parties.

    Is it possible to add the images created by this method you have described above to videos so that the images appear popping out the screen and most importantly how do I go about gaining the maximum distance off the screen. I am looking to try get 2 meters off the screen.

    Thanks Mike

    • Tate Srey - 07/02/2013 reply

      Yes, this method can be applied to video as well. Depending on the type of 3D tv you have, the specific method may be different. Some tv’s may be active shutter. Some will have the left and right images displayed side by side or top and bottom and the tv merges the pictures together for you. And the glasses will sync with the left right display.

      But the principle is exactly the same: the left eye needs to see a slightly different image than the right eye.

      But if you are looking to use a regular TV, and have the video post processed, and assuming everyone has the red/cyan glasses it can be done this way too. But you’d be using video processing software like final cut or premier or after effects instead of photoshop. All those software will have all the features to do exactly everything outlined in the tutorial to a video. The only caveat would be that you would need two cameras filming at once.

      You would import the left video and the right video and apply the filters as outlined above.

      As far as how much the object “pops out” depends on the offset relative to a reference point.

  3. With GIMP you only need? 1 image>> http:\\\15iTdCQ is the original image; while the 3D Anaglyph? image is at http:\\\11aBrBN <<to create a 3D image!

  4. Very nice tutorial to make actual 3d anaglyph from one 2d image.
    You can convert any 2d image into 3d anaglyph by referring the following tutorial:

    You can convert text or logo also by referring this simple tutorial. It shows from basic to advanced level 3d anaglyph conversion.

    Try it!

  5. Shmeergla - 03/03/2013 reply

    You forgot to mention in this tutorial that you need to tilt/move one of the grouped layers to the left or the right side to get an desired effect. By tilting more or less you get the desired effect. Cheers.

  6. do you know how to make a simple graphic like text or a logo into a 3d anaglyph for printing and viewing with 3d glasses?

    • Tate Srey - 01/30/2013 reply

      Hi Jen,

      It’ll be pretty much the same process that I outlined above. You’d still need two images of the text or logo, with slight offsets. Its important to note that you would need to offset the elements of the text or logo so that there will be different layers, to create depth. You wouldn’t simply move the entire logo/text in one direction uniformly.

      When you print the image, you’d need to make sure the colors on your printer is calibrated so that it matches you monitor. This is important so that the red and cyan will be filtered out correctly when you’re viewing with the glasses. The idea here is that the left eye sees a different image than the right eye.

Leave a Reply