Sub topic 4
Painting on a Mask
Assume you can navigate the Layers panel, select a layer mask, and use the Brush tool. A layer mask is a grayscale image attached to a layer. Painting on the mask changes which parts of the layer are visible. Painting on the layer itself changes pixels, so always check which thumbnail is active before painting.
Control visibility with brush color
A mask uses three value ranges:
| Mask color | Effect on the attached layer |
|---|---|
| White | Reveals the layer completely |
| Black | Hides the layer completely |
| Gray | Reveals the layer partially |
Select the mask thumbnail in the Layers panel. Press D to reset the foreground and background colors to black and white. Press X to swap them. With a soft brush selected, paint black where the layer should disappear. Paint white to restore an area. Paint gray, or use reduced brush opacity, to create a partial transition.
Set up the Brush tool
Choose the Brush tool with B. Use a soft round brush when you need a gradual edge and a hard round brush when you need a clean, defined boundary. Adjust brush size with the bracket keys:
[makes the brush smaller.]makes the brush larger.Shift + [makes the brush softer.Shift + ]makes the brush harder.
Lower the brush opacity in the options bar when you want to build the mask gradually. A low opacity creates less change with each stroke. Brush flow controls how quickly paint builds as you keep the pointer moving. For careful transitions, use a soft brush with low opacity and several short strokes.
Paint with a controlled workflow
- Select the mask thumbnail, not the layer thumbnail.
- Press
D, thenXif you want black as the foreground color. - Set a large, soft brush and lower its opacity.
- Paint across the area that should recede.
- Press
Xand paint white to restore details. - Zoom in and reduce the brush size near the subject's edge.
- Zoom out to check whether the transition looks natural.
Use short strokes rather than one long stroke around a complex subject. This makes mistakes easier to undo. Press Ctrl+Z on Windows or Command+Z on macOS to undo the latest stroke.
Avoid common edge problems
A hard brush can create a noticeable halo or a jagged edge. A very soft brush can remove too much of the subject and create a hazy boundary. Change brush hardness and size as the edge changes. Keep the mask at full resolution while you work, and inspect the result at both high zoom and normal viewing size.
Do not paint directly on the image when your goal is to hide it. If you do, undo the pixel change, select the mask, and continue there.
Exercise
You want to hide a person’s background while keeping the person visible. Which color should you paint on the mask, and what should you do if you remove part of the person by mistake?
Show answer
Paint black over the background. Press X to switch to white, then paint over the person to reveal that part of the layer again.