Sub topic 8
Painting back fine strands with the Refine Edge Brush
This chapter assumes you can open Select and Mask, switch view modes, and read the Edge Detection controls from the earlier chapters. It also assumes you know that a layer mask uses white to reveal, black to hide, and gray for partial transparency. Here you will use the Refine Edge Brush to recover fine strands that the Radius setting alone does not capture.
What the Refine Edge Brush does
The Refine Edge Brush tool is in the Select and Mask toolbar, below the Quick Selection tool. It does not paint color. It marks an area as an edge zone, and Photoshop re-analyzes that zone and decides pixel by pixel how opaque each pixel should be.
Edge Detection applies one Radius to the whole border of the selection. Hair rarely behaves that evenly. A flat, smooth shoulder needs almost no refinement, while flyaway strands can extend far past the base selection. The Refine Edge Brush lets you apply a wide search area only where you need it.
| Tool | What it does | Typical use |
|---|---|---|
| Quick Selection | Adds solid areas to the selection | Filling holes in the body |
| Refine Edge Brush | Re-analyzes the edge inside the brush stroke | Hair, fur, wispy edges |
| Brush | Paints the selection in or out directly | Cleanup on hard edges |
| Object Selection | Selects a defined object by region or lasso | Separate items near the subject |
| Lasso and Polygonal Lasso | Draws rough additions or subtractions | Large corrections |
The Brush tool is the one to use for hard edges. Because the Refine Edge Brush re-analyzes pixels, using it on a hard edge such as a shirt collar can soften the edge and make it look worse.
Setting up before you paint
Set these controls first so you can judge your strokes honestly.
- Choose a view mode that exposes the edge. On Black or On White shows missing strands and halos clearly. Overlay shows the selection as a colored mask, which is useful for judging coverage.
- Set Radius in Edge Detection to a small value, such as 2 to 5 px, or leave it at 0. Then use the brush for the problem areas. This keeps flat edges clean.
- Zoom to at least 100 percent. At smaller zoom levels you cannot see individual strands, and you will not notice damage until later.
- Pick a brush size slightly larger than the hair zone you want to treat. Use the left and right bracket keys,
[and], to change the size. The brush cursor is a circle, so you can see the area it will analyze.
Leave Show Edge (the original selection border) off while you paint. Turn it on briefly only to compare against the base selection.
Painting the edge zone
Drag the brush along the hair border. Photoshop looks at the contrast between the subject and the background inside the circle and rebuilds the edge there. The first stroke often looks wrong, because the brush may reveal too much background or too little hair.
Work in short strokes, and watch the result after each one.
- Place the brush so the circle straddles the border: part of it on the hair and part on the background.
- Click and drag slowly along the hair. A slow stroke gives the algorithm time to refine, and the preview updates when you release.
- Use
Ctrl+Z(Windows) orCmd+Z(macOS) to undo a stroke that went wrong, then repeat it with a smaller brush. - For hair that curls inward, such as a loose strand in front of a neck, make a separate stroke so the brush does not pick up skin as background.
Photoshop also lets you hold Alt (Windows) or Option (macOS) to switch the Refine Edge Brush to a subtract mode. In that mode the brush restores the original selection in the area you paint over. This is how you undo a refinement locally without undoing your whole history.
Brush options that matter
The options bar and the tool settings affect how the brush behaves.
- Size controls the area that is analyzed. A larger brush captures more, but it can also pull in background that was never part of the subject.
- Hardness is not available for the Refine Edge Brush in the same way as for a normal brush. The brush works on a soft analysis zone, so you do not control a hard falloff.
- Sample All Layers reads the visible composite rather than only the active layer. Turn it on only if you want the brush to consider layers you can see. Leave it off when you want to refine the active layer alone.
- Auto-Adjust Edge (when offered in your Photoshop version) lets the brush adapt its analysis to the local edge. It is useful on mixed edges, but check the result.
Settings in the Select and Mask Properties panel change over time as Adobe updates Photoshop. If a control in your version has a different name, look for the one that does the same job rather than assuming it is missing.
How the brush and Radius interact
Edge Detection Radius and the brush both widen the area where Photoshop decides opacity. They stack in a way that is easy to misjudge.
- A high Radius applied to the whole border makes the subject's edge soft everywhere, including the smooth body outline.
- A low Radius with brush strokes keeps edges tight and applies extra analysis only to hair.
- Smart Radius automatically varies the radius by edge type. It helps on subjects with both hard and soft edges, but it can still misjudge hair against a busy background.
A workable approach is to set Smart Radius on, use a modest Radius, and then add brush strokes where strands are still missing.
A worked example
Suppose you have a portrait of a person with curly hair against a gray wall, and the base selection from Select Subject cuts through the curls.
- Open Select and Mask, set the view to On Black, and zoom to 100 percent. You see the curls clipped, with a thin gray halo.
- In Edge Detection, set Radius to 3 px and turn on Smart Radius. The outline improves, but the loose curls above the head are still missing.
- Choose the Refine Edge Brush and set the size to about 80 px, a little larger than the band of loose curls.
- Drag along the top of the head, keeping the circle half on the hair and half on the wall. The curls reappear.
- On the left side, the stroke reveals some of the wall as a gray smear. Undo it, reduce the brush to 40 px, and repaint with the circle centered on the hair.
- Switch to On White. A pale fringe shows, which you will deal with in the Decontaminate Colors chapter, so leave it for now.
Check your work at several view modes before you commit. A cutout that looks good on black can show gaps on white.
Edge cases and common errors
- The brush adds a halo. The analysis zone included a lot of background of a similar tone to the hair. Reduce the brush size and make slower, shorter strokes. Later, Decontaminate Colors can remove leftover background color from the edge pixels.
- Strands appear in front of the face. The brush circle overlapped skin, and Photoshop treated skin as hair. Keep the circle away from the face, or Alt/Option-paint to restore the original selection there.
- Nothing seems to change. The edge zone may already be fully opaque, or the subject and background have almost no contrast. Low-contrast hair, such as dark hair on a dark background, may not be recoverable with this tool. The channel-based method in a later chapter handles that case better.
- The edge looks soft on a hard object. You used the Refine Edge Brush on a smooth edge. Use the Brush tool or the original selection instead.
- Results change after you move on. If you paint, then increase Radius afterward, the global change can alter the area you just refined. Set Radius first and paint after.
Habits that give clean results
- Refine in passes. Do one region at a time, such as the crown, then each side, rather than one long stroke around the head.
- Check a different view mode after each region.
- Keep the brush circle on the border, not deep inside the subject or deep in the background.
- Use Alt/Option subtraction instead of repeated undo when a small area needs correcting.
- Toggle Show Original (press
P) to compare against the starting selection and make sure you are improving it.
Exercise
You have a subject with smooth shoulders and wispy hair. Radius is set high (30 px) and the shoulders now look soft and blurred on a black preview. What is a better way to handle the edges, and which tool do you use on the hair?
Show answer
Lower the global Radius to a small value (for example 2 to 5 px) so the shoulders keep a tight edge, and keep Smart Radius on if the edge types vary. Then use the Refine Edge Brush only along the hair border to recover the wispy strands. If a stroke reveals too much background, undo it, reduce the brush size, and repaint with the circle centered on the hair edge.
Exercise
A Refine Edge Brush stroke along the temple makes strands appear across the cheek. How do you fix the cheek without losing the strands at the hairline?
Show answer
Hold Alt (Windows) or Option (macOS) and paint over the cheek with the Refine Edge Brush to restore the original selection there. Use a smaller brush and keep the circle on the cheek, away from the hairline, so the strands you recovered are not removed.