Masks

Masks are grayscale images whose grays control visibility of a layer, group, or Smart Object.

A Metaphor and Example

Although Photoshop thinks of masks as alpha channels, that’s not so easy for humans.

Slides

Some users who find the concept of masking challenging find this metaphor useful—if they’re familiar with slides (photographic transparencies). Images recording onto slide film are most opaque where they’re darkest. Whites in a scene (snow, clouds, etc.) are rendered as clear film. So, the dark parts of a slide hold back the projector’s light while the more transparent parts that represent the lighter part of the image allow the light to reach the screen.

Now imagine sandwiching two slides together and projecting the result onto a screen. One slide is just a photo. The other slide is completely clear in parts (as white would make it) and black elsewhere. The black prevents the light from reaching the screen, thus hiding parts of the photo.

That’s the metaphor. In Photoshop, we access the image or its mask primarily through the Layers panel.

The link icon between the thumbnails indicates that if you transform (scale, rotate, etc.) either the mask or the image, the other transforms too. When either thumbnail is clicked, it is given a small border (easily missed) that indicates that it’s the thing being edited. There are also indications of which is under examination in the Properties panel and the tab identifying the document (just under the Options Bar). If you click on the link icon, it will disappear, indicating that edits to either the mask image or the layer image won’t affect the other. Clicking between the thumbnails reestablishes the link.

Interestingly, not all edits flow through that link in both directions like transformations do. Filters applied to the mask affect only the mask, whether the chain is present or not. When some filters (those that blur or distort) are applied to the layer image, both layer and mask are affected. Filters that change only the appearance of the layer image will not affect the mask. This inconsistency sounds confusing, but works well in practice.

Creation

There are two primary ways masks are made: from selections or by painting. The vast majority of masks are made from selections, then undergo painted refinements. Masks can also be made via the Select and Mask workspace or the Focus Area selection dialog box, by choosing Layer Mask in the Output menu of either. Select and Mask combines methods by offering ways to refine and make selections as well as paint them, and then output them to a mask.

Masks from Selection

With an active selection of the area you’d like to keep visible, highlight the appropriate layer, group, or Smart Object, then either click the Add layer mask button () at the bottom of the Layers panel or choose Layer > Layer Mask > Reveal Selection. If your selection was actually of the area that you’d like to hide, you could choose Hide Selection from the Layer Mask menu or option/Alt-click the Add layer mask button.

If your selection is precise, your mask will be too.

Luminosity Masks

As mentioned earlier, by /Ctrl-clicking the RGB composite channel, you are making a selection proportional to the luminosity in the image. That is, the lighter an area is, the more selected it will be. When you create a layer mask with such a selection active, it will be a grayscale version of the image, “hiding” the darkest parts of the image. Want it the other way? Click Invert in the Properties panel.

Painting Masks

Sometimes you want to hide (or show) very arbitrary areas of a layer, group, or Smart Object. With one of those items highlighted in the Layers panel, click the Add layer mask button () at the bottom of the Layers panel to make a white-filled mask (which hides nothing), or option/Alt-click the Add layer mask button to hide everything initially. You can also use the Layer > Layer Mask menu and choose Reveal All or Hide All.

With the mask targeted (look for the little border around its thumbnail), use the Brush tool or the Gradient tool to apply white, black, or shades of gray. You can apply filters to the mask you’ve painted (e.g., apply the Gaussian Blur filter to create fades from visible to invisible). When I use gradients, I configure them to transition from black (or white) to transparent, so they hide (or reveal) what I want, without overwriting other parts of the mask.

Masks from Transparency

Sometimes I’d like to mask a file I’ve received as a PNG that already has transparent regions in it. I could create a mask and simply paint with white or black. However, there are times when I’d like the mask to become the cause of the transparency so I can finesse its edges.

By choosing Layer > Layer Mask > From Transparency, a mask is made with white where the original layer was fully opaque, black where it was fully transparent, and grays for translucent areas. The layer image itself will no longer have any transparency, but the areas that are hidden will be black (for dark subjects), white (for light ones), or image pixels that had been masked previously. See “Applying Masks” on the following page.

Properties

There are properties and tasks that we often need to access. Look to the Properties panel.

Density

Density is a slider that allows us to nondestructively alter how dark a mask’s blacks are. Densities less that 100% permit hidden areas to be partially visible.

Feather

Feather is a slider that allows us to nondestructively blur a mask to create zones of transition from visible to hidden. The result is similar to using the Gaussian Blur filter with values up to 1000 pixels.

Refine

There are three “refinements” we can apply to masks from the Properties panel.

Select and Mask

This is the same workspace discussed earlier; see “Select and Mask: Make or Refine Selections” (page 274). The only difference is that the default Output is a new, improved mask.

Color Range

Clicking the Color Range button opens the same dialog box discussed earlier in this chapter; see “Color Range” (page 272). It will behave as if the masked area is selected and the color range you create will intersect with it. That is, you’ll end up with less visible than before.

Invert

The Invert button reverses white and black. Hidden areas become visible, and visible areas are hidden.

Applying Masks

This action, accessed by right-clicking a mask thumbnail, or by choosing Layer > Layer Mask > Apply, deletes areas of the layer hidden by the mask and removes the mask itself, leaving transparent areas on the layer. It is rare to ever need this function. Unexpectedly, the areas that are deleted (or at least those close to what had been visible) are retained invisibly in the document data. So if you subsequently use the command Layer > Layer Mask > From Transparency, much of what was deleted may return!

Selections from Masks

There will be times when you need a selection from an existing mask. If the layer with the mask is highlighted, you can use the Select > Load Selection… command. The mask will appear in the list of channels from which a selection can be made.

It is usually faster to hold down the /Ctrl key and click the mask’s thumbnail.

Masks on Groups

Masks can be applied to layer groups as readily as to individual layers. Layers in the group can have their own masks too. This implies a workaround to the limitation in Photoshop that a layer can have only one mask. If that layer is the sole occupant of a group, you can mask the group, and two masks will be active on that layer. Want more? Groups can contain groups!

Masks on Smart Objects or within Them?

Among the many advantages of a Smart Object are that it can be transformed repeatedly and filters can be applied without the S.O.’s contents being adversely affected. Those contents can include layers with masks, of course.

But a mask applied to a Smart Object isn’t protected from harm. If the S.O. and its mask are subjected to filters or repeated transformations, the mask will be a bit battered. The one advantage to a mask applied to the S.O. rather than its content is that you can more easily see it in the Layers panel. If that is unnecessary, I prefer to make a group inside the S.O. and mask it.

Vector Masks

If you’ve created a vector shape using one of the pen or shape tools, you can use it as a mask on any selected layer, group, or Smart Object. The tools we use to create such shapes are the same ones we use to create vector shape layers. See “Vector Shape Layers” (page 140) for more on those tools. There is one key difference, however: in the Options Bar choose Path as the tool mode, otherwise you’ll be making shape layers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset