Sub topic 12
Outputting to a layer mask and keeping the edit non-destructive
This chapter covers the last panel of Select and Mask: the Output Settings. It assumes you can open Select and Mask, that you know a layer mask uses white to reveal and black to hide, and that you have already refined an edge with Edge Detection, the Refine Edge Brush, and Decontaminate Colors. If any of those are new, return to the earlier chapters first.
Why the output choice matters
Everything you did in Select and Mask is a preview until you press OK. The Output To menu decides what Photoshop produces from that work. Some options keep your original pixels and store the cutout as a mask you can edit later. Others bake the result into pixels and cannot be undone once you save and close the file.
For hair and fur this matters more than usual. A cutout that looks right on a white test background often shows halos or missing strands on a dark one. If the cutout is a mask, you can repaint it. If it is baked pixels, you have to start over.
The Output To options
The Output To menu in the Output Settings section offers six results.
| Option | What you get | Editable later? | Works with Decontaminate Colors? |
|---|---|---|---|
| Selection | A live selection (marching ants) on the current layer | The selection only, until you deselect | No |
| Layer Mask | A mask on the current layer, original pixels intact | Yes | No |
| New Layer | A new layer with the cutout pixels | Pixels only | Yes |
| New Layer with Layer Mask | A duplicate layer with a mask attached | Yes | Yes |
| New Document | A separate file with the cutout pixels | Pixels only | Yes |
| New Document with Layer Mask | A separate file with a masked layer | Yes | Yes |
Decontaminate Colors changes the color of edge pixels, so Photoshop cannot do it on a mask alone. When you tick the Decontaminate Colors checkbox, the options that only write a mask (Selection and Layer Mask) become unavailable, because a mask holds no color. That is why the menu changes when you turn the checkbox on.
For most hair and fur work, choose New Layer with Layer Mask. It duplicates your layer, applies the decontaminated colors to the duplicate, and attaches the refined mask. The original layer stays untouched underneath.
The decontamination trade-off
Decontaminate Colors replaces the original edge colors with colors sampled from nearby, more solid areas of the subject. This removes the bright or colored fringe left over from the old background. It also means the pixels on the new layer are no longer your original pixels.
That is why Photoshop outputs to a new layer in this case. Your original is preserved as a separate layer, and the decontaminated copy sits above it. Keep the original even if it looks redundant. You may need it later to re-run the refinement with different settings.
The Amount slider controls how strongly the colors are replaced. It is only active when Decontaminate Colors is checked.
- At 100%, edge colors are fully replaced. This usually works best for strong fringes, such as a bright sky behind dark hair.
- At lower values, part of the original color is kept. This helps when full replacement makes strands look flat or smeared.
Start at 100% and lower it only if the strands look painted or unnaturally uniform.
What the layer structure looks like
After you choose New Layer with Layer Mask and press OK, the Layers panel shows two layers. The top layer holds a mask thumbnail beside its pixel thumbnail. The bottom layer is your original.
The copy sits above the original. Hide the original's visibility icon (the eye) when you want to see the cutout alone, and show it again if you need to compare.
Editing the mask afterward
The mask is an ordinary layer mask, so you can fix problems with normal tools. A few habits make this safer.
- Click the mask thumbnail, not the pixel thumbnail. A white border around the mask thumbnail shows it is the active target. Painting while the pixel thumbnail is active changes the image instead of the mask.
- Use a soft, low-opacity brush (for example 20 to 30% opacity). Paint white to reveal more of the layer, and black to hide more.
- Press X to swap foreground and background colors, so you can flip between revealing and hiding without opening the Color panel.
- Hold \ (backslash) to display the mask as a red overlay. This helps you see where partial transparency exists.
- Hold Alt (Windows) or Option (Mac) and click the mask thumbnail to view the mask itself in grayscale. Gray areas are partial transparency, which is where your hair strands live.
You can also reopen Select and Mask on an existing mask. Select the mask thumbnail and choose Select > Select and Mask, or right-click the mask and choose Select and Mask. Photoshop loads the mask for further refinement. This is useful when a background test reveals a problem, but be careful about running Decontaminate Colors twice, because each pass changes the pixels on that layer.
Selection and Layer Mask: when to use them
Two of the options skip the new layer. They are worth knowing, though they suit different situations.
- Selection is useful when you want to use the refined edge for another job, such as adjusting a region or saving it as a channel. It is not durable, since closing the file or pressing Deselect loses it unless you save it. Save it with Select > Save Selection.
- Layer Mask applies the mask directly to the current layer. It is non-destructive in that the pixels remain, but you do not get decontaminated colors. Use it when your subject has little fringing, for example when the background was already close to neutral.
A Smart Object gives you another route. If you convert the layer to a Smart Object before opening Select and Mask, the filters you apply stay editable, but the Output To step still creates a normal layer or mask. Select and Mask itself is not a Smart Filter, so you cannot reopen its exact settings later. What you can reopen is the resulting mask.
Saving your settings with a file that stays editable
Keep the working file as a layered format. A PSD or TIFF with layers preserves the mask and both layers. A flattened JPEG or PNG does not.
Two other settings in the Output Settings panel are worth checking before you press OK.
- Remember Settings stores the current slider values so Select and Mask opens with them next time. This is helpful for a batch of similar photos. It is a poor choice when images differ in lighting or background, since values tuned for one photo can damage another.
- Reset Workspace (the circular arrow at the bottom, or the Reset button when you hold Alt/Option) returns the sliders to defaults.
Common errors
- The mask looks right, but the edges are tinted. You probably output to Layer Mask without Decontaminate Colors. Redo the step with New Layer with Layer Mask and decontamination on.
- Output To is grayed out for some options. Decontaminate Colors is ticked. This is expected, since those options cannot store color.
- You painted on the wrong thumbnail. Undo with Ctrl+Z (Cmd+Z on Mac) and select the mask thumbnail before painting again.
- Strands vanish when you move the layer onto another document. Drag the layer with its mask attached. If you drag only the pixels, the mask stays behind. Dragging the layer in the Layers panel keeps both.
- The result is perfect on gray but wrong on black. The mask is fine, and the edge colors are the problem. Rerun with Decontaminate Colors, or lower the Amount.
A short workflow to follow
- Finish refinements in Select and Mask, including Decontaminate Colors at a sensible Amount.
- Set Output To to New Layer with Layer Mask.
- Press OK and confirm that two layers appear, with a mask on the upper one.
- Hide the original and view the cutout alone.
- Save as a layered PSD or TIFF.
- Move on to testing on other backgrounds, which the next chapter covers.
Exercise
You refined a photo of a dog against a bright blue sky. The edge shows a blue tint, and you want to keep the ability to repaint missing fur later. Which Output To option do you choose, and why can't you use Layer Mask here?
Show answer
Choose New Layer with Layer Mask with Decontaminate Colors turned on. Decontaminate Colors rewrites edge pixel colors to remove the blue fringe, and a mask alone holds no color, so Layer Mask is unavailable once the checkbox is ticked. The new layer carries the cleaned colors, the attached mask can be repainted later, and the original layer stays untouched below it.
Exercise
After output you click the mask thumbnail, hold Alt or Option, and see mostly white and black with a band of gray around the head. What do the gray areas represent, and which brush settings would you use to repair a gap in them?
Show answer
Gray areas are partial transparency, which is where fine hair strands blend into the background. To repair a gap, make sure the mask thumbnail is active, then paint with a soft, low-opacity brush (about 20 to 30%), using white to reveal more and black to hide more. Press X to swap between the two.