Sub topic 7
Viewing the mask itself
A layer mask is a grayscale image attached to a layer. In normal work you only see its effect, never the mask. This chapter covers the ways to look at the mask directly, so you can find stray marks, soft edges, and gaps that the composite hides.
This chapter assumes you can find the Layers, Channels, and Properties panels, can paint on a mask with the Brush tool, and know the rule that white reveals, black conceals, and gray is partial.
Why you need to see the mask
The canvas shows the result of the mask, not the mask. Three problems are easy to miss this way:
- A faint gray patch (say 5% gray) hides almost nothing, but it can show up later as a halo when you change the background.
- A hard edge looks fine at 50% zoom but shows a jagged line at 100%.
- A small hole left by a missed brush stroke is invisible when the layer beneath is similar in color.
Viewing the mask turns these into obvious shapes.
The Layers panel thumbnail
Each masked layer shows two thumbnails: the layer content on the left and the mask on the right. A white border around one of them shows which one is active. Click the mask thumbnail before you paint, or your strokes go onto the pixels instead.
The thumbnail is tiny, but it gives a quick check. To make it larger, open the Layers panel menu, choose Panel Options, and pick a bigger thumbnail size. A larger thumbnail helps most when you work with several masks in one document.
Viewing the mask in the main window
You have three ways to display the mask on the canvas. Each answers a different question.
| View | How to turn it on | What you see | Best for |
|---|---|---|---|
| Mask alone | Alt-click (Windows) or Option-click (Mac) the mask thumbnail | The mask as a grayscale image. The picture is hidden. | Finding stray gray, checking edge softness |
| Mask as overlay | Backslash (`\`) key, or Shift+Alt-click (Windows) / Shift+Option-click (Mac) the thumbnail | A translucent red layer over the picture. Red covers the concealed areas. | Painting accurately while seeing the picture |
| Layer and mask removed from view | Shift-click the thumbnail | Temporarily disables the mask. The thumbnail gets a red X. | Comparing before and after |
Repeat the same action to go back to the normal view. The last row is covered again in the chapter on managing masks. It is listed here because it is a quick way to judge what the mask is actually doing.
Mask alone
With Alt/Option-click, the canvas shows only the mask. Pure white areas are fully revealed, pure black areas are fully concealed, and everything between is partial.
Use this view to look for:
- Gray where you expect pure white or pure black. Brush with 100% hardness and 100% opacity should leave only black and white. Anything else came from lower opacity, a soft brush, or a gradient.
- Edge quality. Zoom to 100% and check the border between white and black. A hard edge means a sharp cutout. A soft edge means a gradual blend.
- Tiny specks. Single white or black pixels show up clearly against the opposite tone.
You can still paint while in this view. This is useful for cleaning specks, because you see them and fix them in the same place. When you finish, Alt/Option-click the thumbnail again.
Mask as an overlay
The overlay view shows the picture with a red tint where the mask conceals. The default is red at 50% opacity, the same style used by Quick Mask. You can see the picture and the mask boundary together, so you can place an edge exactly on the subject's outline.
To change the color or opacity, double-click the mask thumbnail to open the Properties panel, and use the mask display options in the panel menu. Switch the color if the picture is already red, for example when you mask a red car. Red over red is hard to read, so choose a contrasting color such as green or blue.
Viewing a mask in the Channels panel
When a layer has a mask, the Channels panel shows a temporary channel named after the layer, for example "Sky Mask". Select the layer first, or the channel won't appear.
This channel is the mask. Clicking its eye icon displays it over the composite, and clicking the eye icons of the other channels hides them. The Channels panel is also where you:
- Load the mask as a selection: Ctrl-click (Windows) or Cmd-click (Mac) the channel thumbnail.
- Save the mask permanently by dragging the temporary channel onto the New Channel button. It becomes an ordinary alpha channel that stays when the layer is deleted.
- Apply tools to the mask as if it were a normal grayscale image, such as Levels or Curves.
Loading a mask as a selection is the fastest way to reuse it on another layer. Ctrl/Cmd-click the mask thumbnail in the Layers panel does the same thing.
Inspecting a mask with adjustments
You can check how clean a mask is by pushing its contrast. With the mask displayed alone, press Ctrl+L (Windows) or Cmd+L (Mac) to open Levels. Drag the black and white input sliders close together. Nearly invisible gray becomes obvious. Then cancel the dialog, or undo, if you only wanted to inspect.
This changes the mask. If you want to keep the original, do the inspection on a duplicate channel instead:
- Open the Channels panel.
- Drag the temporary mask channel onto the New Channel button to make a copy.
- Apply Levels to the copy and look at it.
- Delete the copy when you are done.
The original mask is untouched.
The workflow in order
Common problems
- Nothing changes when you Alt/Option-click. On some Mac systems, Option-click is captured by other software, or the click lands on the layer thumbnail. Click exactly on the mask thumbnail on the right.
- The overlay does not appear. The backslash key acts on the active mask. Click the mask thumbnail first. On some non-US keyboards the key is in a different place, so use Shift+Alt/Option-click on the thumbnail instead.
- You see a gray canvas instead of a black-and-white image. The mask holds a lot of partial values. This is normal for soft masks and gradients. Raise the contrast with a temporary Levels copy as described above.
- The mask thumbnail is missing. The layer has no mask, or the layer is a Background layer. Convert it with Layer > New > Layer from Background, then add a mask.
- You left the mask view on. If the canvas shows only black and white after you finish, you are still in the mask-alone view. Alt/Option-click the thumbnail again.
Using the views together
A short routine for each masked layer:
- Paint with the overlay on, so you see the picture while you work.
- Switch to the mask-alone view for the final check of specks and edges.
- Toggle the mask off with Shift-click to compare with the unmasked layer.
- Return to the normal view.
The overlay is best for deciding where to paint. The mask-alone view is best for checking what you painted. Using both takes seconds and finds problems that a single view misses.
Exercise
You painted a mask with a soft brush to hide the background behind a portrait. At normal zoom the result looks clean, but when you place a dark background underneath, a light halo appears around the hair. Which view do you use to find the cause, what do you look for, and how do you fix it without changing the picture?
Show answer
Alt/Option-click the mask thumbnail to display the mask alone. Zoom to 100% and look at the area around the hair for light gray values where the mask should be pure black. These partially revealed pixels let the old background show through as a halo. Fix it by clicking the mask thumbnail (so the strokes go onto the mask, not the pixels) and painting black over the gray areas with a brush, or by applying Levels to the mask to push the near-black grays to black. Then Alt/Option-click the thumbnail to return to the normal view.
Exercise
You want to reuse the mask from one layer on another layer, and also keep a copy that stays if the layer is deleted. Which panel do you use for each task, and what is the action?
Show answer
For reuse, Ctrl/Cmd-click the mask thumbnail in the Layers panel (or the mask channel in the Channels panel) to load it as a selection, then select the other layer and click the Add Layer Mask button. For a permanent copy, open the Channels panel and drag the temporary mask channel onto the New Channel button, which creates an ordinary alpha channel.