Join Jan Kabili for an in-depth discussion in this video What are layer masks used for?, part of Photoshop CS4: Layer Masks in Depth.
Layer masks really are among the most powerful features in Photoshop. They really expand the range of designs and special effects that you can create in this program. Before we get started learning all about layer masks, I wanted to show you some examples of the kinds of things that you can accomplish using layer masks, and you are going to learn how to do all of these things during this course. One area in which layer masks shine is when you are trying to put together multiple images to create an image composite. Layer masks are often used to hide content on one layer so that content on another layer shows through.
So for example in this case, there is a layer mask on a photograph of a geisha. Let me show you the original photograph my making the layer mask temporarily inactive, by holding the Shift key as I click on the thumbnail that represents the layer mask in the Layers panel. So there is the original photograph, and with the layer mask I'm hiding part of the original photograph, so that part of the content on the incense layer below is showing through. Another use for layer masks in compositing is to create a gradual blend between the content of one layer and another.
So here I'll show you the original photograph on the carnival layer by making the layer mask that I have added to that layer temporarily invisible by holding the Shift key as I click on the layer mask thumbnail. So there is the content of the carnival layer, and with the layer mask we can see down through part of that content gradually blending the carnival layer with the photograph on the canal layer below it in the layer stack. Another way to use layer masks when you are compositing images is to make the content of one layer appear to be inside of a pot or some other kind of container on another layer.
So here I'm going to turn off a couple of layers by clicking their Eye icons to show you the photograph on the background layer. Then I added a couple of copies of a photograph of a garden, which I'll show you now by making the layer mask that I added to the garden temporarily invisible. So there is the content that's on the center layer. I'll make the layer mask visible again by clicking on the layer thumbnail to show you how I was able to mask that content, so it appears to be growing out of this pot. I did the same thing again on this top layer, using a layer mask to make the content of a garden photograph appear to be growing out of a pot.
Moving away from image compositing for a second, another area in which layer masks are really important is enhancing photographs. You can use a layer mask to combine two different exposures of the same scene, taking the best part of each photograph. Here for example, I have two photographs, this dark photograph on one layer, and I'll make the layer mask invisible to show you the light version of the photograph on the top layer. Then I'll make the layer mask visible again so that you can see that I use that mask to combine parts of the light and the dark exposure.
Perhaps the most frequent use of layer masking is to limit the areas of a photo to which an adjustment layer applies. You can use adjustment layers to fix the exposure, the contrast, the color, and more in your photographs, and often, you don't want an adjustment to affect all parts of an image. So you can use the layer mask that comes with every adjustment layer, like this layer mask here on this Levels adjustment layer, to limit the areas affected by the adjustment. I will show you this mask by holding the Option key on the Mac or the Alt key on the PC and clicking on the layer mask thumbnail on the Levels layer.
This mask is hiding a Levels adjustment from all areas where there are black pixels on the mask, and it's allowing the Levels adjustment to be revealed or to show only where there are white and light gray pixels on this Levels adjustment layer. I'm going to Option or Alt click again on that layer mask thumbnail to go back to the original photograph. Similarly, if you add a fill layer, which acts much like an adjustment layer to an image, you can use a layer mask to limit the areas affected by that fill layer.
In this case, I have a blue fill layer that I added above the photograph, and then I added a layer mask to limit the area where that blue fill appears to adjust the tabletop around the objects. I will show you that layer mask by holding down the Option key on the Mac or the Alt key on the PC, and as you can see where there is black on this layer mask, that blue color fill is hidden when I go back to the original photograph. Layer masking is also important when you are doing portrait retouching.
Here I have applied a couple of adjustment layers, a Levels adjustment layer, and a Hue Saturation layer above the background photograph to try to reduce the amount of red and brighten the white of this subject's eye. If I make the layer masks inactive on these two adjustment layers, you can see how the image would look if these adjustments affected the entire image. But I have used these masks to limit the effect of both the Levels and the Hue Saturation adjustment to just the eye, with no effect on the rest of the image.
Adjustment layers and fill layers aren't the only Photoshop features that come with their own layer masks. If you apply filters as Smart Filters, you also get a layer mask automatically on the Smart Filter sublayer and you can add pixels to that layer mask to limit the areas to which the filter applies. In this case, I have applied a Blur filter. Without the layer mask, that blur would affect the entire image like this. But the black and gray pixels that I have added to this Smart Filter layer mask limit this blur to the area around the model, simulating a shallow depth of field effect.
Also of interest to photographers is the fact that you can use layer masks to creatively frame your images. For example, here I have added a layer mask to a photograph, filled that layer mask with black to hide most of the photograph, and then painted in with white paint the areas where I want the photograph to appear, resulting in this rather creative framing effect. So that's just a taste of the kinds of things that you can make using layer masks. I hope you are looking forward to learning how to make all of these effects and more as you work with me through the rest of this course.
- Adding grayscale pixels to layer masks to hide and show layer content
- Refining the edges of layer masks in the Refine Mask dialog box
- Using filters and adjustments to manipulate layer masks
- Blending photographs into composites by applying gradients to layer masks
- Using layer masks with Smart Objects and Adobe Camera Raw to combine different adjustments of the same photo
- Simulating shallow depth of field and targeting sharpening with Smart Filter masks