Accessibility

Putting the mask in play

fpo

Deke McClelland

www.deke.com

Created:
01 November 2004

Excerpted from “Adobe Photoshop CS One-on-One” by Deke McClelland.

In this tutorial, I’ll show you how to place a portrait of a young woman against a background of my blurry backyard. I’ll adjust the woman’s fleshtones in Adobe® Photoshop® to match her new background and modify the ambient color in her hair. The result is about as perfect a composite as computer imaging affords.

1. Open the photographs.

Open two photographs: one containing a masked object you want to place in the foreground and the other containing the background you want to use. I chose a portrait of a young woman and a background of my blurry backyard. I previously created a mask for the young woman’s face, so I’m all ready to combine the two images in the next few steps.

2. Load the final mask as a selection.

Inside the Channels palette, press the Ctrl key (Command on the Mac) and click the mask for the foreground object.

3. Switch to the RGB image.

You may already be there. If not, click on the RGB item at the top of the Channels palette. The image name in the title bar should end with the parenthetical RGB/8.

4. Drag the foreground object into the background image.

Press the Ctrl key (Command on the Mac) and drag the masked selection into the background image window. Once inside the background image, Ctrl-drag (or Command-drag) the foreground object to move it into position.

phs8kbmaskplay_1_int

5. Match the foreground to the new background.

It’s one thing to have independent foreground lighting; strobes create it all the time. But it’s another to have a purple color cast against an amber backdrop as I have in my new image.

To match colors in the new composite images, choose Image > Adjustments > Match Color. Then make the following changes:

  • Set the Source option to the background image (in my case, Backyard blur.jpg) and the Layer option to Background. This tells Photoshop to gather the source colors from the backdrop.

  • Increase the Fade value to create the ideal mix of foreground and background colors. For my image, 60 percent seems to be ideal.

Click the OK button to apply your changes.

phs8kbmaskplay_2_int

6. Inspect the edges of the masked image.

Zoom in on your image and scroll around to see the transitions between the foreground and background components. In my image, with the exception of the occasional blue reflection, the shoulders look pretty good. But the hair suffers some unacceptably harsh transitions, as the image below attests.

phs8kbmaskplay_3_int

Known as edge artifacts, such transitions are virtually impossible to avoid in the masking mode. Even if you were bound and determined to do so, it would likely require painting individual hairs—such a waste when easier solutions are available to you in the compositing phase.

7. Apply the Multiply blend mode to the layer.

Press F7 to switch to the Layers palette. Press the 3 key to reduce the Opacity value to 30 percent. Then select Multiply from the upper-left pop-up menu. This burns the details from the top layer into the background, as shown below.

phs8kbmaskplay_4_int

Although this step may fix the edges, it also does wonders to mess up the image. To reinstate the foreground, you’ll need another layer.

8. Create a copy of the layer.

Choose Layer > New > Layer via Copy.

9. Reinstate the Normal blend mode.

Press 0 to return to 100 percent Opacity. Then choose Normal from the pop-up menu at the top of the Layers palette.

My image looks like it did at the end of Step 6. The difference is that I now have two layers—one to blend the edges and another to represent the detail. The trick is making them interact. The remaining steps explain how to use the Contract and Feather commands to mask away the perimeter pixels from the top layer to reveal the multiplied pixels in the layer below.

10. Load the selection outline for the layer.

Press the Ctrl key (Command on the Mac) and click on the top layer in the Layers palette, presumably Layer 1 Copy. This traces the edges of the layers with a highly accurate selection outline.

11. Choose the Contract command.

Choose Select > Modify > Contract, enter a value of 4 pixels, and click OK. This shrinks the size of the selection outline by an even increment all the way around the perimeter of the layer.

12. Choose the Feather command.

Choose Select > Feather, enter a Feather Radius value of 2 pixels, and click OK. This blurs the selection outline by half the previous Contract amount, which will soften the transitions between the pixels in Layer 1 Copy and Layer 1 below.

13. Click the layer mask icon.

Click the second-to-left icon along the bottom of the Layers palette, to convert the selection into a layer mask. The upshot is that everything outside the selection is masked away.

phs8kbmaskplay_5_int

14. Inspect the revised edges.

Again, zoom in on the image and scrutinize the transitions between the foreground pixels and those in the background. As shown below, I can make out individual strands of hair in my image. Plus, the hair merges evenly and organically with its new environment. This is an image that whispers, “I was born here. This is where I live.”

phs8kbmaskplay_6_int

Excerpted from “Adobe Photoshop CS One-on-One” by Deke McClelland. Copyright ©2004 by Type & Graphics, Inc. Published by Deke Press in association with O’Reilly Media, Inc. Used with permission of Deke Press and O’Reilly Media, Inc. To buy this book, visit www.oreilly.com.

About the author

In 1985, Deke McClelland oversaw the implementation of the first personal computer-based production department in Boulder, Colorado. In 1986, he became the artistic director for Publishing Resources, one of the earliest all-PostScript service bureaus in the United States. Deke McClelland is a well-known expert and lecturer on Adobe Photoshop, Illustrator, InDesign, and the broader realm of computer graphics and design. To date, he has written 85 books that have been translated into 24 languages, with more than 4 million copies in print.