Sub topic 8
Controlling filter area with the smart filter mask
This chapter assumes you know the Layers panel, how layer masks work (white reveals, black hides, gray partly reveals), and how to apply a filter from the Filter menu. It also assumes you have already converted a layer to a smart object and applied at least one smart filter.
What the smart filter mask is
When you apply a filter to a smart object, Photoshop adds a Smart Filters entry under the layer. Next to it is a white thumbnail. That thumbnail is the smart filter mask. It works like a layer mask, but it controls the filters instead of the layer's pixels.
The mask is one mask for the whole filter stack. Every smart filter on the layer is limited by the same mask. You cannot give Gaussian Blur one mask and Unsharp Mask another on the same layer.
The mask is also separate from any regular layer mask on the smart object. The two do different jobs:
| Mask | Controls | Where it appears |
|---|---|---|
| Layer mask | Whether the layer's pixels are visible at all | Thumbnail beside the layer |
| Smart filter mask | Where the filters are applied to the layer | Thumbnail beside the Smart Filters entry |
If you hide an area with the layer mask, the layer is simply not visible there. If you hide an area with the smart filter mask, the layer is still visible there, but unfiltered.
How the mask behaves
The mask follows the same grayscale rule as other masks:
- White: the filter is fully applied.
- Black: the filter is hidden, so the original smart object shows through.
- Gray: the filter is applied partially, in proportion to the gray value.
New smart filters start fully applied because the mask is white. The mask is also stored with the layer, so you can come back later and repaint it.
Painting the mask
Select the mask thumbnail first. A white frame appears around it when it is active. If the frame is around the layer thumbnail instead, your brush strokes edit the layer, and on a smart object Photoshop will refuse or prompt you to rasterize.
To limit a filter to part of the image:
- Click the smart filter mask thumbnail.
- Choose the Brush tool (B) and set the foreground color to black.
- Paint over the areas that should stay unfiltered.
- Press X to swap to white and paint back where the filter should return.
- Lower the brush opacity or use a soft edge for gradual transitions.
Because the mask is just grayscale pixels, other mask tools work too:
- The Gradient tool gives a smooth falloff, such as a blur that fades from the edge of the frame toward the center.
- Selections filled with black or white give hard-edged control. Make a selection first, then fill the mask with Edit > Fill.
- Invert the mask with Ctrl+I (Cmd+I on macOS) to swap filtered and unfiltered areas.
Making a mask from an existing selection
If a selection is active when you apply your first filter, Photoshop does not limit the filter to it. Instead, it creates the smart filter mask from the selection, with the selected area white and the rest black. This is a quick way to start with a hard-edged mask. Be aware that the selection's edge is what you get, so feather the selection before filtering if you want a soft transition.
A worked example: selective sharpening
Suppose a portrait needs sharper eyes and hair, but sharpening the skin would exaggerate texture.
- Convert the portrait layer to a smart object with Layer > Smart Objects > Convert to Smart Object.
- Choose Filter > Sharpen > Smart Sharpen and apply it. The filter appears under the layer, and the whole image is sharpened.
- Click the smart filter mask thumbnail.
- Press Ctrl+I (Cmd+I) to invert the mask to black. The sharpening disappears everywhere.
- Set the foreground color to white and paint over the eyes and hair with a soft brush at around 50% opacity.
- Build up gradually. Where you paint twice, the sharpening gets stronger.
Later you can double-click Smart Sharpen to change its amount. The mask stays in place, so the painted areas keep their shape while the strength changes.
Mask edits and the filter stack
Because one mask serves all filters, changing it affects each filter at once. This leads to a common decision: should two filters share a mask, or should they be separated?
If you need different regions for different filters, you have these options:
- Convert the layer to a smart object again. This nests the first smart object inside a new one, and the new outer layer gets its own smart filter mask. This keeps everything editable, at the cost of a larger file and an extra level to open.
- Duplicate the smart object and apply each filter on a different copy. Mask each copy through its own mask.
- Use a layer mask or a clipping group in addition, to constrain the result at the layer level.
Mask controls in the Properties panel
Selecting the smart filter mask thumbnail shows its options in the Properties panel, just as for a layer mask. You can adjust:
- Density: the mask's overall strength. Lowering it lets some filter show through the black areas.
- Feather: blurs the mask edge without altering the pixels. This is a nondestructive softening that you can change later.
- Select and Mask / Invert: refine or flip the mask.
Feather is useful for selections-based masks. A hard-edged mask often looks obvious. Raising Feather gives a more natural blend without repainting.
Enabling, disabling, and moving the mask
You can control the mask itself in a few ways:
- Disable: Shift-click the mask thumbnail. A red X appears and the filters apply everywhere, as if the mask were white. Shift-click again to restore it.
- View: Alt-click (Option-click on macOS) the thumbnail to see the mask as a grayscale image. This is helpful for spotting stray gray marks.
- Delete: Layer > Smart Filter > Delete Filter Mask removes it. Choose Add Filter Mask to bring a new white one back.
- Copy: Alt-drag (Option-drag) the mask thumbnail onto another smart object's Smart Filters entry to copy it.
Common errors
- Painting on the wrong thumbnail. Always check which thumbnail has the frame before you paint.
- Expecting different masks per filter. One mask applies to all filters on that layer.
- Hard edges from a selection. The mask inherits the selection edge. Feather the selection or use the Feather slider.
- Forgetting the mask is there. If a filter seems to do nothing in part of the image, view the mask with Alt-click. A black area is the likely cause.
- Rasterizing and losing the mask. Rasterizing a smart object applies the filters and discards the mask, so keep a copy if you may need to change it.
Exercise
You applied Gaussian Blur and Unsharp Mask to a smart object layer, and you want the blur on the background only but the sharpening on the whole image. Can one smart filter mask do this? What would you do instead?
Show answer
No. The smart filter mask is shared by every filter on the layer, so both filters would be limited to the same area. Convert the smart object to a smart object again to nest it. Apply the blur to the inner object and mask it to the background, then apply Unsharp Mask on the outer object with its own white mask. You could also duplicate the layer and mask each copy separately.
Exercise
Part of your smart object shows no filter effect even though the filter is listed and its eye icon is on. What are two quick ways to find out whether the smart filter mask is the cause?
Show answer
Alt-click (Option-click on macOS) the mask thumbnail to view it as grayscale and look for black or gray areas over the missing effect. Alternatively, Shift-click the thumbnail to disable the mask. If the effect appears everywhere, the mask was hiding it.