Sub topic 1
Why Mask Instead of Erase
Prerequisites
This chapter assumes you can:
- Open a document, use the Layers panel, and select a layer.
- Use the Brush tool and switch between foreground and background colors.
- Make a basic selection with the Marquee, Lasso, or Quick Selection tool.
Why mask instead of erase
Erasing deletes pixels from a layer. Once you save and close the file, those pixels are gone unless you undo far back in history. A layer mask hides pixels without deleting them. The layer keeps its full image, and the mask controls which parts show. You can change or remove the mask at any time, so the edit stays reversible.
White reveals, black conceals, gray blends
A layer mask is a grayscale image attached to a layer. Its values control visibility:
- White shows the layer fully.
- Black hides the layer fully, so the layer below shows through.
- Gray shows the layer partially. Darker gray hides more, and lighter gray reveals more.
Creating a layer mask
- Select the layer you want to mask.
- Click the Add layer mask button at the bottom of the Layers panel. The mask appears as a white thumbnail next to the layer, so the whole layer is visible.
- To start with everything hidden, Alt-click (Option-click on macOS) the same button. The mask turns black.
If you made a selection first, clicking the button creates a mask that reveals only the selected area.
Painting on a mask
- Click the layer mask thumbnail so it is active. A border appears around it.
- Select the Brush tool (B).
- Press D to set black as the foreground color and white as the background color.
- Paint with black to hide part of the layer. Press X to swap colors, then paint with white to bring it back.
- Lower the brush Opacity to paint soft gray transitions.
Painting with a low-opacity brush builds up gray gradually. Each stroke changes the mask, but the original pixels stay untouched.
Exercise
Q: You paint over part of a photo on a layer mask with black, then later decide you want that part back. What do you do, and why does it work?
A: Paint over the same area with white, or press X to swap colors and paint white. The original pixels were never deleted, so white on the mask shows them again.