Join Jan Kabili for an in-depth discussion in this video Adding a layer mask, part of Photoshop CS4: Layer Masks in Depth.
The first step in creating a layer mask is to add a layer mask to a layer. Here I have an image that has two layers. On the top layer, there is this photograph of a brush, including the white pixels around the artist's hand and around the brush. I'm going to make that layer temporarily invisible by clicking the Eye icon to the left of the brush layer in the Layers panel, so you can see the content of the layer below the photo layer, which contains this large green and white wave. I'm going to turn the brush layer back on by clicking its Eye icon again in the Layers panel, and now I'm going to add a layer mask to the brush layer.
To do that I have to select the Brush layer by clicking on a blank area of the Brush layer in the Layers panel. There are several different ways that I can add a layer mask to the selected layer. The way I normally do it, since I'm working in the Layers panel anyway, is just to go to the bottom of the Layers panel and click the Add Layer Mask icon, which is this icon that looks like a gray square with a white circle in the middle. That adds a second thumbnail to the brush layer, this thumbnail represents the layer mask, and as you can see from the thumbnail, when the layer mask comes in by default, it's completely filled with white pixels, and that's why you see no effect of this layer mask on the document in the document window.
Because as you know from earlier movies, white pixels on a layer mask reveal or show all of the content on the layer to which the mask is attached. So in this case all of the content on the brush layer is being revealed through this white layer mask. In a later movie in this Chapter, I'll show you how to add black or gray pixels to a white mask to hide parts of the associated layer. Now that's not the only way to add a layer mask to a layer. There are two other ways that I'll show you, and you are welcome to use any way that you prefer. I'm going to press Command+Z on the Mac or Ctrl+Z on the PC to undo the layer mask that I just added, and with the brush layers still selected, I'll show you another way to add a layer mask, which is to go up to the Masks panel and there to click on the Add Pixel Mask icon, which is the icon here that's a red square with a white center.
When I click that icon, again, I get a second thumbnail on the brush layer representing a new layer mask that's completely filled with white pixels, and therefore is revealing everything on the brush layer. Keep in mind that you can only add one layer mask to a layer. There is another icon here in the Masks panel, but if I click that icon I'll get not another layer mask on the brush layer, but a second mask that's a vector mask, a subject that I'll be covering in later movies, but don't be fooled by that second icon. So far I have shown you how to add a default layer mask that's filled with white pixels, but sometimes you may find it more efficient to add a black layer mask that completely hides the content of a layer, and then you can paint parts of that layer back in by painting with white on the black layer mask.
So let me show you how to add a layer mask that's filled with black pixels. I'll undo this layer mask by pressing Command+Z on the Mac or Ctrl+Z on the PC. I still have the Brush layer selected, and this time I'm going to go down to the bottom of the Layers panel, and I'm going to hold down the options key on the Mac or the Alt key on the PC, as I click on the Add Layer Mask icon. As you can see, the layer mask thumbnail that's been added to the brush layer is black, because the layer mask has come in completely filled with black pixels, all of the content on the Brush layer is hidden from view, as you can see in the document window where you can see down to all of the photo on the photo layer below.
In later movies, I'll show you how you can start with a black layer mask like this and then paint in areas using white or gray paint. There's one more way that you can add either a white or a black layer mask to a photo, to show you that I'm going to undo one more time by pressing Command+Z on the Mac, Ctrl+Z on the PC, and with the Brush layer still selected, I'm going to go up to the Layer menu, and down to layer mask. Notice that there are two commands that are available right now. Reveal All and Hide All.
Reveal All adds a white layer mask. Hide All adds a black layer mask. So, if I choose Reveal All, I get the same white layer mask that I got using either of the other two methods that I have shown you. So as you can see, adding a layer mask isn't very complicated. You simply choose the method that you prefer, and use that method. There is one situation where you may have trouble adding a layer mask, and that's if you happen to be working with a special kind of a layer called a Background layer. I'm going to show you how to deal with that situation in the next movie.
- 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