Sub topic 7
Hide and Reveal with a Layer Mask
Assume you know how to open images, use the Layers panel, and make a basic selection. A layer mask controls which parts of a layer are visible without deleting pixels. This makes it safer than the Eraser tool because you can change the mask at any time.
In a mask:
- White reveals the layer.
- Black conceals the layer.
- Gray reveals the layer partially, creating transparency.
For a composite, use a mask to hide the unwanted background around a subject while keeping the original photo intact.
Add a mask from a selection
- Open the composite document and select the layer containing the subject.
- Use a selection tool to select the subject. Object Selection, Quick Selection, or Select Subject can provide a starting point.
- Check the selection edges. Marching ants show the current selection boundary.
- Click the Add Layer Mask button at the bottom of the Layers panel. It looks like a rectangle with a circle inside.
Photoshop converts the selection into a mask. The selected area remains visible, and the unselected area becomes hidden.
The Layers panel now shows two thumbnails:
- The image thumbnail contains the original pixels.
- The mask thumbnail shows the visibility information.
Click the mask thumbnail before editing it. A white border around the thumbnail indicates that the mask is active. If you paint while the image thumbnail is active, you change the photo instead of the mask.
Read and edit the mask
The mask is a grayscale image attached to the layer. You can edit it with the Brush tool.
- Select the mask thumbnail.
- Choose the Brush tool.
- Set the foreground color to black.
- Use a soft brush at a suitable size.
- Paint over areas that should disappear.
- Press
Xto swap the foreground and background colors. Paint with white to restore areas you hid.
Lower the brush opacity when you need a gradual transition. A soft brush creates a smoother blend than a hard brush, especially along a background that has no sharp boundary.
Use the bracket keys to resize the brush:
[makes the brush smaller.]makes the brush larger.
If you make a mistake, switch to white and paint over the mistake. You can also disable the mask temporarily by Shift-clicking its thumbnail. Shift-click it again to reactivate the mask.
> callout tip > Never paint directly on the image when you only want to change visibility. Select the mask thumbnail first. This preserves the original pixels and keeps the composite editable.
Understand mask behavior
| Mask color | Effect on the layer | Typical use |
|---|---|---|
| White | Fully visible | Keep the subject |
| Black | Fully hidden | Remove the background |
| Gray | Partially visible | Create a soft blend |
If the wrong part of the image is visible, the mask may be inverted. Select the mask thumbnail and choose Image > Adjustments > Invert, or press Ctrl+I on Windows or Command+I on macOS. This swaps black and white without changing the image layer.
A mask does not permanently remove anything. You can replace it, refine it, or delete it later. This is why masks are preferred for composites that may need revisions.
Exercise
You created a mask, but the subject disappeared and the background remained visible. What should you try first?
Show answer
Select the mask thumbnail and invert the mask with Ctrl+I on Windows or Command+I on macOS.