When portrait subjects ask me to retouch their favorite pictures, there’s one thing they request above all else: “Can you fix that flyaway hair?” And, as is often the case when it comes to post-production, there are many effective ways to tackle this retouching challenge. But one of my favorite methods involves a layer mask to quickly and effectively hide stray strands of hair. Here’s how to do layered hair repair in Photoshop.
The first step is to duplicate the portrait onto a new layer, then hide the top layer and select the original background image. Next, whether the background is busy and detailed or solid and seamless, use the clone stamp, warp tool and any other Photoshop controls you’d like to copy the background onto and into the subject’s hairline. You don’t have to worry about accuracy here because all you’re trying to do is to create more background that will be revealed in a moment by a layer mask. Instead, just be sure that the background now encroaches well onto the subject’s face, head and shoulders—or anywhere you might like to improve the edge of their hair where it meets the background. This odd-looking modified layer will soon replace those flyaways.
With the background expanded into the subject, click on the top layer to make it active and then restore its visibility. The modified background layer now disappears from view, but rest assured we’ll see it again in a moment.
On the duplicated top layer, the next step is to make a selection of the subject’s head. I like to use the Select Subject option from the Select menu, but even a manual lasso tool will work. Either way, you’re creating a fairly rudimentary outline of the subject that’s going to need some refinement. So, the next step is to hold the Shift key while clicking on the Select and Mask option in the Select menu in order to open the Refine Edge tool.
With the Refine Edge tool active, click and drag to paint along the edge of the selection, entirely covering the stray hairs and helping to smooth the transition between the subject and the background. It doesn’t need to be perfect, of course, but accuracy doesn’t hurt. With the edge refinement painted on, set the “Output To” option to “Layer Mask” and then click OK.
Now, with mask added to the layer, you’ll see the edited background is revealed along the edges of the subject’s head. In some cases, it has likely removed too much hair and in others not enough. The remedy is the same in either case: simply choose a paintbrush (with a fairly hard edge and large diameter, helpful to make smooth adjustments without making the edges look fuzzy) and select the layer mask to make it active. Then, paint on the mask to add or take away from it as necessary. Hand painting on the mask provides a great way to simply and effectively remove flyaway hairs with a brushstroke, easily revealing the appropriate background behind.
One word of warning here: don’t get overly aggressive with removing every hair that’s out of place. Sometimes making that hair-to-background edge too smooth creates a pronounced “hair helmet” effect that’s neither realistic nor attractive. So use this newfound skill rather sparingly. That’s the beauty of the technique: you can always paint on the mask to modify it as you see fit, adding or subtracting stray hairs selectively or in one fell swoop.