Using Photoshop Layer Masks on Superimposed Photographs for Contrast Control

The situation we're trying to deal with is a scene with one area that is much brighter (or dimmer) than the rest of the image.

Here's our scene: And here's where we're going:

The problem is that the camera cannot capture the full range of contrast from the bright sunlight outside and the dim light inside.

One solution would be to use diffused artificial light inside, increasing the overall light level to approximately that of the exterior. A simple flash will not do the job, though, because it would generate noticable shadows. In the situation photographed, I didn't have lights and umbrellas. In fact, I didn't even have a tripod.


The first step is to recognize that you have a contrast problem. The next step is to determine what the exposures must be. You can use a separate light meter or the meter in your camera. I'll describe how to do it with the camera.

If your camera has a spot meter you can aim the camera at the window and take your light reading there. If it does not have a spot meter, walk up to the window and point the camera outside and take your reading there. You will want the exterior to be a bit lighter than the middle value that the meter calculates, so adjust the camera to make the scene about one stop brighter (e.g. set the exposure compensation to +1).

Next frame your shot. Ideally, use a tripod. As I mentioned, I didn't have one with me, but your Photoshop work will be much simpler if you use one. Make the exposure for the background. Here's my exterior exposure:

Remember: all you care about in that exposure is the exterior.

Then recalculate your exposure for the interior shot (remembering to change your exposure compensation) and take it. My interior shot is shown above.

When you get home, open both images in Photoshop and, holding down the shift key, drag the interior image onto the exterior one. That will place the interior exposure on a separate layer in the exterior image file. The shift key centered the new image in the canvas. (You may now close the interior image, as you no longer need that file. Click the eyeball next to "layer 1" in the Layers Pallet to make the interior exposure invisible. If you used a tripod and didn't bump it between shots, the window will line up exactly. This is good.

My photos didn't align, because I didn't use a tripod. I had to move the interior exposure around till it came as close as I could get it to aligning with the other one. (Temporarily making the interior exposure semi-transparent while moving it makes alignment easier.)

Using the exterior exposure, make a selection of just the outside area. You may try a variety of selection tools, but I'll tell you: if you want it to be really accurate, zoom way in and use the Lasso. It takes time, but it's the best. I usually work a little bit at a time, building the selection using the "Add to Selection" function on the Tool Options Bar.

Here's roughly what it looks like in quickmask:

Save that selection. (Select / Save Selection / OK) It will be called "Alpha 1" unless you give it a name.

We have a special situation here, because the stones within the window are too light in the interior exposure and too dark in the exterior exposure. We could have made a third exposure, but I will do a partial mask so that the exterior exposure is partially visible on them. Confused? Hang in there and maybe it'll become clear later.

Deselect (Select / Deselect), then do a new selection. I did this one on the interior exposure. This selction doesn't have to be super-accurate. It goes around the rocks that make up the depth of the window, like this:

Next, you want to soften the left edge of this selection. here's an easy way to do it: Go into Quickmask (Q) then make a selection around the left side of the pink area. Then Gaussian Blur it (Filter / Blur / Gaussian Blur). Play with the amount till you get a nice blend:

Switch back from Quckmask to a selection (Q) and save the selection (Select / Save Selection / OK). This selection is called Alpha 2, unless you gave it a name.

Deselect (Select / Deselect).

With the interior exposure active, make a layer mask. (On the bottom of the Layers Pallet, click the second button from the left. It looks like a dark rectangle with a white circle in it.) Now load your saved Alpha 2 selection (Select / Load Selection / Channel / Alpha 2 / OK).

Make your foreground color a nice medium grey then fill the selection with it (PC:Alt-Backspace Mac:Option-Backspace). Note that you are painting to the mask, not to the layer itslef. Using grey makes the area partially transparent. You can experiment with different shades of grey for different levels of opacity.

Deselect (Select / Deselect).

Load your Alpha 1 selection (Select / Load Selection / Channel / Alpha 1 / OK). Make your foreground color black, and fill the selection (PC:Alt-Backspace Mac:Option-Backspace). Your mask looks something like this:

A layer mask hides the layer to which it is attached wherever the mask is black and reveals the layer wherever the mask is white. Greys areas are partially revealed. What we've done so far you could have done by simply erasing parts of one or the other image, but now comes the place where a layer mask really shines.

Your image may look something like this now:

The transitions need some work. You can see some black or white areas around some of the rocks.

By painting on the layer mask with black, you'll hide that area. Paint with white and you'll make it visible. Paint with grey and you'll make it partially visible.

To make your foreground color exactly the shade of grey you used on the mask, PC:alt-click Mac:option-click on the layer mask in the Layers Pallet. You'll see the mask by itself. Then use the Eyedropper tool to sample the grey. Repeat the PC:alt-click Mac:option-click to return to the layer view.

You can use the Smudge and Blur tools, as well as many other functions on your layer mask.

So, here are the two original exposures and the final image:

Note that I've also done some color correcting, cloning, burning and a pinch of cropping to finish the image.

As with all things in Photoshop, there are many ways this effect can be achieved. A similar result could be achieved using the eraser and history brush tools, but Layer Masks allow far greater control, especially in blending the two images. They also are preserved when you save and reopen the file, allowing continued work at a later time. (The history brush does not have this flexibility.) Layer masks also have the virtue of allowing an enormous amount of manipulation without actually altering the original image. This is known as non-destructive editing. Another invaluable tool for non-destructive editing is Adjustment Layers. They're available in the Layers menu. Take a look, and happy editing!

This tutorial brought to you by Aesthetic Endeavors.

Photographs copyright © R.L. Geyer 2003

Aesthetic Endeavors home