A layer mask allows you to hide and reveal parts of a single layer. Layer masks, like Quick Masks, can be edited. One advantage of working with a layer mask is that, if you don't like the result, you simply discard the mask, and your image is left untouched. If you like what you see, apply the mask to make the changes.
To make a layer mask, select an area of the image to mask and click the Add Layer Mask button (the second button from the left at the bottom of the Layers palette). When you do, you see a layer mask thumbnail next to the layer's image thumbnail. Figure 12.6 shows an example. Black indicates the portions of the layer that are covered and white shows the parts that are revealed. If the mask were made to be semitransparent, the partially masked areas would be shown in gray.
Notice the links between the two thumbnails, indicating that the mask is linked to the layer. After you create the mask, you can edit it simply by making the layer containing the mask the active layer and clicking the mask icon. The foreground and background colors revert to the defaults. You can then apply black to add to the mask or white to remove parts of it.
If you create your mask using the Layer menu, you have the choice of whether the selected area will be shown (and the rest of the image masked) or masked (and the rest of the image shown). Choose Layer→Layer Mask, and choose either Hide Selection or Reveal Selection, depending on whether you're masking the area around the selected piece of image or the image itself. Figure 12.7 shows the menu for this.
Hide Selection hides the area that you have selected, so you can work on the rest of the image. With this mask, you can protect part of the picture while you work on the rest. Reveal Selection obviously does just the opposite of Hide Selection. This command hides everything on a layer except that area within the Marquee selection. The other commands, Hide All and Reveal All, work a little differently. These, as the names suggest, are based on the entire layer.
In Figure 12.8, I've masked the beach and water and then scribbled across the entire picture. The scribbles are visible only on the unmasked area.
Only One to a Customer
|
Try it YourselfAdding a Mask to a Layer The business of making masks can seem very confusing, so it's best to try the process step-by-step.
|
Take some time now to open a picture and practice applying masks. Try Quick Mask first, and then make a selection and turn it into a layer mask. If you practice these skills while they're fresh in your mind, you'll remember them later when you need to do a quick color change or preserve an object while changing its background.
If you click the layer mask thumbnail in the Layers palette to make it active, you will see the thumbnail outline move to the mask thumbnail from the layer thumbnail. This indicates that the mask is able to be edited. Press Option+click (Mac) or Alt+click (Windows) on the thumbnail of the mask to display the mask in the image window. Select a painting tool and paint the mask with black to add to it. Paint with white to subtract from the mask, or paint with gray to make the layer partially visible, and the mask thumbnail displays your changes. Figure 12.9 shows a mask being edited. I switched the Layers palette to the larger thumbnail to make it a little easier to see what was going on. Just as a reminder, you can do this in the Layers palette options dialog box, which you access from the Layers palette pull-down menu. Remember that you can use any of the painting tools to edit your mask. Using a soft-edged brush will give you a feathered mask.
To edit the layer instead, click its thumbnail. You can turn the layer mask off by going to the Layer menu and choosing Disable Layer Mask, or Shift+clicking the mask's thumbnail in the Layers palette. This option puts a large X through the mask thumbnail so that you know it's inactive (see Figure 12.10). You can still paint on it while it's inactive, though, so be careful!
Now You See It, Now You Don't
|
There are two ways to get rid of the layer mask when you are done with it or you want to start over. The first way, possibly the easiest, is simply to drag the layer mask's thumbnail onto the small trash can button at the bottom of the Layers palette. You also can get rid of a layer mask by choosing Layer→Layer Mask→Delete or Layer→Layer Mask→Apply (see Figure 12.11). If you drag the mask to the trash, you are presented with the dialog box, shown in Figure 12.12, in which you are also prompted to apply the effects of the mask or discard the mask without applying it.
A Quick Look at Channels
Channel thumbnails can be viewed in the Channels palette, which shares a position with the Layers palette. Click the Channels tab to display it. The composite is listed first, and then the color channels, and finally the masks or alpha channels show up at the bottom of the list. If you have made several layer masks, you will probably need to use the scroll bars or resize the palette to see them all. As with the Layers palette thumbnails, you can increase the size of the Channels palette thumbnails to see them more easily. You can also click the eye icons in the Channels palette to hide or show single channels in the image window. This is the function of the Channels palette you will use most. By default, individual channels display in grayscale, but you can change this to see them in their own color by opening Edit→Preferences→Display & Cursors (Win) or Photoshop→Preferences→Display & Cursors (Mac) and checking Color Channels in Color. |
Masks appear both on the screen where you create them and also on the Channels palette, where you can see them as a silhouette of the selection. The mask that you add to an image creates a new channel in your image, called an alpha channel.
Channels are Photoshop's way of storing color and mask information. (See the preceding “By the Way” for more information about channels.) If you add a mask to a layer and choose Window→Channels, you will see something like the example in Figure 12.13.
Click the eye icon to the left of the mask in the Channels palette and the mask appears as red, representing a transparent red plastic called rubylith (a carryover from the old days when this stuff was done in the real, and not the cyber-, world). You can also edit the mask as a channel mask. More importantly, you can save it by choosing Duplicate Channel from the palette menu. You'll get a dialog box like the one in Figure 12.14, letting you save the mask either as part of the document, or as its own document. To turn a selection into an alpha channel, use the menu command Select→Save Selection. It's another quick and easy way to make a mask.