Automatically Creating Layer Masks
YOU CAN AUTOMATICALLY CREATE LAYER MASKS BY MAKING A SIMPLE SELECTION
The title to this tutorial definitely doesn’t do it justice, but I couldn’t think of a better name. It’s a way to automatically create layer masks, and the amount of flexibility you get is really neat. So make sure you at least flip the page to see how cool an effect this is.
Step 1: Find a Photo with an Area in it that You’d Like to Replace
Open two photos that you’d like to combine in some way. In this example, I’d like to place the photo of the airplanes inside the man’s sunglasses. There’s a little secret to layer masks that makes this really simple.
Step 2: Switch to the Photo You want to Replace it with, Select all, and Copy the Photo
Start off with the photo that you want to use as the replacement area. In this example, we’re using the photo of the airplanes. Choose Select>All to select everything (or press Command-A [PC: Ctrl-A]), and then choose Edit>Copy (Command-C [PC: Ctrl-C]).
Step 3: Make a Selection of the Area You want to Replace
Now, switch over to the photo of the man with the sunglasses on. We need to first make a selection of the area we want to replace. Here, I used the Quick Selection tool (W) to click-and-drag across the lenses inside the sunglasses to select them. If the selections spill over onto the face or the sunglasses themselves, press-and-hold the Option (PC: Alt) key and click on those areas to subtract them from the selection. If you need to add to the selection, Shift-click on the area. Press Z to get the Zoom tool if you need a larger view.
Step 4: Choose Edit>Paste into to Paste the Airplanes into the Sunglasses
Now click on the Edit menu and choose Paste Into (remember we copied the airplane photo in Step 2). You’ve probably never used this one before, but it’s really cool. See, it pastes the photo you have copied (in this case, the airplanes) into the active selection. It makes sure that the photo only appears in the selection by creating a layer mask automatically. See how the name of this tutorial fits in? You’ve created a layer mask automatically just by using Edit>Paste Into.
Step 5: Use the Move Tool to Reposition the Photo to Better Fit into the Sunglasses
Here’s where it gets really cool, though: Select the Move tool from the Toolbox (or press V). Then click-and-drag the photo of the airplanes around. Photoshop lets you move the photo to reposition it, but still keeps it inside the original selection. That’s because the Paste Into command created that layer mask.
Step 6: Resize and Warp the Photo to Make it Appear More Realistic
Even better, you can resize the photo without changing anything, too. Click the Edit menu and choose Free Transform (or press Command-T [PC: Ctrl-T]). Press-and-hold the Shift key and drag one of the corner handles in to make the photo fit better. Click-and-drag inside the box to move it. Then, from the Edit menu, choose Transform>Warp. Choose Inflate from the Warp pop-up menu on the top left of the Options Bar, and bend the photo to match the distorted (bulged) perspective you’d probably see in the reflection of someone’s glasses. Press Return (PC: Enter) when you’re done to commit the transformation.
Step 7: Drop the Opacity of the Reflection Photo to Make it Blend in with the Glasses
One last finishing touch would be to drop the Opacity of the airplane photo layer. This will help it blend into the sunglasses under it better. Here, I’ve taken the Opacity setting down to around 80%.