Layer masks help you combine image layers in realistic ways. You use them to control how much of they layer they are applied to is visible. You can do this by simply erasing parts of a layer, of course, but with a layer mask you don't have to erase anything, and you can modify the mask later if it's not quite right. The other point about layer masks is that they enable you to fine-tune selections after you've made them - our walkthrough shows how this works.
This is Glastonbury Tor in Somerset. It's a place of mystery and legend, so that while our photograph is pleasant enough as a landscape shot it lacks the drama that the subject demands.
So this is what we've done with it, adding a dramatic and stormy sky photographed on a different occasion (it's always useful to have a few good 'skies' in your photo collection for situations like these). The two photos blend very effectively, and that's because we've used a layer mask to control the 'join' carefully.
This is our starting point. We've already combined the two images by opening both in Photoshop and then dragging the 'Tor' image on to the 'sky' photo so that the Tor is on top.
We've used the Magic Wand tool to select the sky. (Here's a tip - hold down the Shift key to add areas the tool missed the first time around, and reduce the Tolerance value of the tool is selecting areas you don't want it to.)
We've selected the sky now, but bear in mind that it's the Tor and the hill it's standing on that we want to see, so we need to use the Select > Inverse command..
Next, check the Foreground/ Background colours on the Toolbar. These should be set to black and white, the default.
Now look for the 'Add layer mask' button at the bottom of the Layers palette (it's the grey square with the white circle inside it). When you click it, the selection you made is converted into a layer mask.
We can see the effect on the image. Because the sky is now masked we can see the other 'sky' beneath showing through. But our original sky is still there in the top layer, it's just hidden.
But if we zoom in to 100% we can see that the edges of the tower are too sharp - they don't look natural. This is characteristic of selection tools in general and the Magic Wand in particular.
This is easy to fix with our layer mask. We simply need to make sure the mask is selected (click its thumbnail in the Layers palette) and apply the Gaussian Blur filter. A value of 1 pixel is usually perfect for adding a natural' softness to the edges without making them look too soft.
But we have a different problem in the bottom left-hand corner of our photo. Our original selection didn't pick up the hazy hills in the distance, and these are still visible - together with an ugly and artificial-looking 'join' with the new sky.
With the layer mask still selected in the Layers palette, we switch to the Brush tool. Here, you need to pick a brush size and hardness that matches the detail in the edge you're trying to follow...
We've used the brush to 'paint out' the unwanted areas on the layer mask. Remember, they're still there in the original image - we've simply hidden (masked) them. If you make a mistake, you can switch the brush colour from black to white and 'paint' the lost areas back in. On a layer mask, black means 'hide' and white means 'show'.
And here's the finished image. The original sky has not been deleted, but simply hidden by a layer mask. We can get it back or blend it in differently any time we like. Layer masks are examples of 'non-destructive editing'. They are also extremely useful ways of modifying selections.
End.