Create a 3D Photo Effect With the GIMP

Here's a different take on "stepping out of the box" that would make a nifty photo effect for scrapbooks, greeting cards, newsletters, and brochures. You'll take a digital photograph, give it a white border as if it were a printed photo, and make the subject appear to climb out of the printed photograph.

The primary tools and/or skills needed to accomplish this effect are:

If you need a refresher on these tasks, see the tutorial links from Graphics Software accompanying this step-by-step tutorial.

Although the instructions in this step-by-step tutorial are for the GIMP for Windows, you can accomplish this same effect in other image editing software.

Select a Photograph

© J. Howard Bear
Select an appropriate photograph to work with.

Screenshot by J. Howard Bear

The first step is to select an appropriate photograph. It works best with a photograph where the main subject that will be popping out of the background has good, clean lines. A solid or fairly uncluttered background works well, especially the first time you try this technique.

There's no need to crop the photo at this point. You'll remove unwanted portions of the image during the course of the transformation.

Make a note of the dimensions of the selected photograph.

Set up Your Layers

© J. Howard Bear
Create a 3 layer image with a background, photo, and transparent top layer.

Screenshot by  J. Howard Bear

Create a new blank image of the same size as the photo you plan to work with and open your original photograph as a new layer in your new blank image. You'll now have two layers.

Add another new layer with transparency, which will hold the frame for your 3D photo.

You'll now have three layers:

  1. Background (bottom layer)
  2. Photograph (middle layer)
  3. Frame (transparent top layer)

Create a Frame

© J. Howard Bear
Create your photo frame on the transparent top layer.

Screenshot by  J. Howard Bear

On the newest transparent layer create the frame for your new 3D photograph. This frame is the equivalent of the white border around a printed photograph.

In the GIMP:

  1. Select a portion the main subject of your photo and as much background as you wish to include.
  2. Fill the selection with white.
  3. Reduce the selection Select > Shrink by 20-50 pixels. Experiment to get a frame width you like.
  4. Cut out the center of the frame by pressing Ctrl+X in Windows.

Add Perspective

© J. Howard Bear
Change the perspective of the frame.

Screenshot by  J. Howard Bear

With the frame layer still selected, use the perspective tool and simply push and pull the corners of the bounding box around to change the perspective. In the GIMP you'll see both the original and the new perspective until you click Transform in the Perspective Toolbox.

Add a Mask

Add a mask to the layer with your main image.

Screenshot by J. Howard Bear

Select the middle layer of your image (the original photo image) and add a new mask to the layer.

Before you start removing the background on your image you may want to doublecheck or set a few other options in the GIMP. When you draw or paint on your mask you'll want to draw or paint with the foreground color set to black.

Your background is probably white at this point. Since your frame is also white, you may find it helpful to switch to the background layer and fill the background with another solid color that constrasts with both your frame and the main subject of your photo. Gray, red, blue — it doesn't matter as long as it is solid. You can change the background later. When you begin the next step, the background color is going to show through and it's helpful if it is not a color that blends with your frame and photo subject.

Remove the Background

© J. Howard Bear
Carefully remove the background parts you don't want showing.

Screensot by J. Howard Bear

If you changed the background in the previous step, be sure you now have the middle layer (original photo image) with its mask layer now selected.

Begin removing all the unwanted portions of the photograph by masking them (covering them with a mask). You can draw with the pencil or with the paintbrush tool (be sure you are drawing or painting with black).

As you draw or paint over the unwanted portions, the background color will show through. In this example, the background is a grayish rose color. Zoom in close to aid in removing the unwanted portions carefully around the parts of the image you want to remain.

Once you have the mask like you want it, right-click on the photograph layer and choose Apply layer mask.

Edit the Frame

© J. Howard Bear
Remove the part of the frame that crosses in front of your 3D subject.

Screenshot by J. Howard Bear

The 3D effect is almost complete but you need to put part of that frame behind instead of cutting across your subject.

Now select the frame layer. It can be helpful to set the opacity of the frame layer to 50-60% or so to make it easier to see exactly where to edit the edges of the frame as it crosses in front of the subject of your photo. Zoom in if necessary.

Using the eraser tool, simply erase the part of the frame that is cutting in front of your subject. Since the frame is the only thing on this layer you don't have to worry about staying within the lines. You won't be damaging the underlying layers when you erase the frame.

Reset the opacity of the layer back to 100% when you're done.

Change the Background

© J. Howard Bear
You can change the background color, including inserting a pattern or another photography.

Screenshot by  J. Howard Bear

Select your background and fill it with whatever color, pattern, or texture you desire. You can even fill it with another photograph. You now have a picture of a person or object stepping out of a photograph.

For more details, see the original Instructables tutorial by Andrew546 which inspired this one.

Finetune Your 3D Photo

© J. Howard Bear
Build upon the basic 3D effect.

Screenshot by J. Howard Bear

You could improve on or adapt this 3D photo effect in a number of ways.

  1. For additional realism, add appropriate cast shadows.
  2. Give the photograph a less flat appearance by slightly curling the photo edge or giving it a wavy appearance (experiment with image filters).
  3. Have your subject stepping out of a mirror or other reflective surface instead of a photograph.
  4. Have your subject stepping from one photograph into another.
  5. Have your subject stepping out of a polaroid picture.
  6. Add a person or object (perhaps isolated and photographed using a simple lightbox) into an entirely different scene made to look like a photograph.