Layer Mask Basics
LAYER MASKS LET YOU NON-DESTRUCTIVELY ERASE AWAY AREAS FROM ONE LAYER TO REVEAL THE LAYERS BELOW
Step 1: Open Two Photos that You'd Like to Combine
In order to really take advantage of layer masks, you need to have at least two layers. So go ahead and open two images that you'd like to combine.
Step 2: Drag One of the Images onto the other so they're in the Same Document
Use the Move tool (V) to drag one photo from its document onto the other one. In this example, I'm going to drag the photo of the barrel onto the image of the James Bond-looking guy with the gun. Now that photo's document has two layers. Once you've got the photo moved, you can close the original so you're left with only the document with two layers. (See image right)
Step 3: Add a Layer Mask to the Top Layer
Remember ... whenever you add an adjustment layer it automatically added a layer mask (that little white thumbnail) to the layer it was on? Well, ordinary layers don't work like that. They don't automatically get a layer mask with them. However, adding one is really simple. First, select the layer you want to add the mask on. In this case, it's the top layer. Then click on the Add Layer Mask icon at the bottom of the Layers panel. It's the third one from the left.
Step 4: Notice How a Layer Mask on a Regular Layer Looks Just Like the Adjustment Layer One
When you click on the Add Layer Mask icon, you'll see that Photoshop adds a little white thumbnail next to the layer thumbnail in your Layers panel. This is a layer mask.
Step 5: Make a Selection of the Area on the Top Layer that You Want to Hide
Right now, we can only see the barrel photo because that layer covers the one below it. Let's combine the two photos by hiding part of the top layer so we can see the layer below it. Choose the Elliptical Marquee tool from the Toolbox (or press Shift-M until you have it). Click-and-drag out a circular selection in the middle of the canvas.
You can press-and-hold the Shift key when you're making a selection with the Elliptical Marquee tool to constrain the selection to a perfect circle. Press-and-hold the Spacebar while you're dragging to move the circle.
Step 6: Fill the Selection with Black
When we were working with adjustment layers, we made a selection and filled it with black to hide part of the adjustment to reveal the layer below it. The same thing works here with a regular layer mask. Go to the Edit menu and choose Fill. Then, choose Black for the Use setting and click OK. Finally, choose Select>Deselect to clear your selection.
When working on a layer mask, you can press the letter D and then the letter X to set your Foreground color to black. Then press Option-Delete (PC: Alt-Backspace) to fill any selections or layers with the Foreground color (which is black).
Step 7: White on the Layer Mask Shows the Top Layer; Black Reveals the Background
To see how things are working here, take a look at the layer mask thumbnail. Wherever it's white, we can see the barrel layer (the layer that holds the layer mask). Where you see black on the layer mask, you see through the barrel layer to whatever is underneath it in the Layers panel
(in this case, that's the James Bond-looking guy).
That's probably the most important thing to understand about layer masks: black and white. White shows you the effects of the layer that the layer mask is on. Black hides the layer and shows you whatever is below it in the layer stacking order. ((See image right)
Step 8: Fill the Layer Mask with White again to Get Things Back to Normal
So, even though it looks like we erased away the pixels from the top barrel layer, we didn't. Instead they're just hidden from view. In real life, you'd probably save this file, then reopen it at a later time and possibly decide you want to change something. If you had erased or deleted the circular selection from the image, you'd have to go back to the original and start over. With a layer mask, though, you can always change your mind without starting over. Try it. Click on the layer mask and fill it with white this time. As you can see, all of the barrel photo is still there and the layer mask is all white again - nothing was permanently erased or deleted. (See image right).