3D imagery has recently become popular again, thanks mainly to a recent spate of Hollywood movies. We show you how to turn a normal photo into a 3D image
The principle behind 3D images is related to our binocular vision.
Each eye sees the world from a slightly different angle and the brain assembles these two views to create an image with depth. The same effect can be achieved with digital photographs.
Wearing coloured glasses to view a composition of two slightly different images of the same subject creates the illusion of depth. The first step, then, is to prepare two photos.
The best subjects are scenes with lots of depth, with something prominently in the foreground, and without any movement. Using a tripod, a flat surface, or a steady hand, take the first photograph of the scene.
Now move the camera about 5 to 7cm to the left or right and take a second shot of the same scene. Don’t re-centre the subject when moving the camera, and ensure the camera doesn’t move vertically: the two photos should be virtually identical, save for the slight horizontal movement that represents the distance between a person’s eyes.
Transfer the photographs to your computer and check that they are appropriate for use
The lighting should be the same in each (for best results, avoid using the camera’s flash) and the subject should be in focus.
Everything should almost line up, though one photograph should be slightly to the left of the scene and the other should be slightly to the right.
For clarity in our screenshots, we’ve picked a simple subject but don’t be afraid of choosing a more complex scene – so long as it is still. Rename the photos, adding ‘left’ and ‘right’ to the file names, as this will minimise confusion later.
Next, open an image-editing program. Any modern program should do, though for this workshop we’ll use Gimp, which can be downloaded free.
Open both the left and right images as ‘layers’, using the Open as Layers option in the File menu in Gimp. Treat the left-hand photo as the background image. (If the Layers menu doesn’t automatically appear in Gimp, press Control and L to open it.)
Colour images may look odd when viewed through anaglyphic (coloured) glasses, and too much red or blue in a photo image can distort the 3D effect.
For these reasons, it’s best to convert the images to black and white before going any further. In Gimp, open the Image menu, point to Mode and then choose Greyscale.
This will convert the image into shades of grey. However, we now need to apply red and blue colours to create the 3D effect, so convert the image back to RGB mode by opening the same menu again and choosing RGB (it will still look grey but colours can now be added).
There’s an optional shortcut for Gimp users at this point. Download the 3D anaglyph plug-in for Gimp and copy it into the program’s Scripts folder. After restarting Gimp, an extra menu option (Stereo) will appear.
Click on it, select Make Anaglyph, and use the dialogue box that opens to assign colours to each layer.
Then click OK and the plug-in will create the 3D image
Save it and you are finished. To create a 3D image without using the plug-in, or in different image-editing program, follow the remainder of this workshop.
The next stage is to colourise each image – red for the left-hand photo and blue for the right. In Gimp, click on the left-hand image in the Layers menu, open the Colours menu and select Colourify. Select the red button and click OK.
In the Layers menu, notice that the layer is now coloured red. Don’t worry if it looks a bit dark at this stage. We’ll brighten it up later.
Next, follow the same procedure to apply a cyan (bright blue) colour wash to the right-hand image. Open the Colours menu, click on Colourify, then choose the cyan colour from the selection shown.
Click OK. If the 3D glasses you intend to use have lenses of different hues – some are coloured pink and green, for example – just select the colours that match your glasses from the options shown.
The colours can also be fine-tuned: click the Custom colour box and then either choose from the array of colours shown, use the colour sliders, or type a specific HTML value for the required colour.
Now the two layers need to be merged together, to create a single, anaglyphic image. Click to select the right-hand layer then open the Mode dropdown menu in the Layers panel and choose Addition.
This will place the cyan image layer on the top of the red layer, creating a composite image with blue and red ‘halos’ around the objects in the photograph. Using the Addition mode also brightens the overall image.
Now pop on a pair of anaglyphic 3D glasses and look at the image
(These can be bought cheaply online from the Play.com website.) Does it look 3D? If the image seems to recede rather than pop out, the layers may be reversed.
To fix this, just swap the colours around using the Colourify process outlined in Steps 6 and 7. To adjust the depth of the image, select the Move tool from Gimp’s Toolbox panel and move one of the layers across slightly.
Once you are happy with the 3D effect produced by the image, crop out any edges where the layers don’t overlap. Draw a rectangle around the part you want to keep using the Rectangle Select tool from the Toolbox panel, then open the Image menu and click Crop to Selection.
Now ‘flatten’ the layers into a single picture by opening the Image menu once more and choosing Flatten Image. Now save the finished 3D picture – and print it out if you want to impress friends (the effect will also work well on paper).