Hair clipping - the compendium

Hair clipping with color range selections and color range fades

All videos of the tutorial Hair clipping - the compendium

For uniform backgrounds, it is advisable to use a color range selection for cropping. Color range masking can also be an effective means of achieving good results even with irregular backgrounds.

In three examples, I will show the possibilities and limitations of color range selections and color range masking. The examples are curls, straight hair swirling in the air and dog hair. Image source: Giorgio Gruizza, pitrs, Sorin Popa @ Fotolia.com


Hair clipping via color range selections

Uniform backgrounds make it easier to crop hair. As a rule, you then try to use the channel with the highest contrast as the starting point for the hair selection. However, if there are only a few similar colors in the background, a slight gradient or even just one color, a color range selection can produce good results much more quickly.

Example 1 - the ideal motif: hair swirling in the air

In this example, I have a red background. A preview in the channels shows that a selection can be made quickly here because the background in the channel is almost black. I would then only need to duplicate the channel, further increase the contrast with a tone value correction and lighten the hair more with the dodge tool. This would then result in my selection of hair. I add a background texture to the document via File>Place and duplicate my background layer.

Hair clipping with color range selections and color range fades

Instead of creating a selection via the channels, I choose Selection>Color Range for the duplicated background layer in the menu. A dialog box opens. The tolerance determines the behavior at the edges of the color area. The higher the tolerance set, the more colors are included in the selection. As I want to achieve a very sharp distinction between color and hair, I select a low tolerance of around 20. Holding down the Shift key, I select the color areas in the red background. Each new click on the Shift key adds the color range to the existing color range selection.

Hair clipping with color range selections and color range fades

When the red background is completely white, I can confirm with OK. Now I reverse the background selection with Ctrl+Shift+I. The hair is now selected.

I can still improve the edges. To do this, I activate the selection tool and select Enhance edge in the menu bar.

Hair clipping with color range selections and color range fades

There I set a black background and can already see how the result will look. Now I can increase the contrast of the edges a little and round off the fine hairs.

Hair clipping with color range selections and color range fades

I then select the icon for adding a layer mask in the layer control panel. My selection has now been transferred to the mask. The hair has been cropped.

Hair clipping with color range selections and color range fades

I remove the red color fringe with a Hue/Saturation adjustment layer as a clipping mask. The clipping mask - Alt and left-click between the adjustment layer and the hair layer or Ctrl+Shift+G - ensures that the adjustment layer only affects the layer directly below it. I look for a color tone that roughly corresponds to the light blonde hair.

Hair clipping with color range selections and color range fades

I then mask the area in the layer mask of the adjustment layer so that the adjustment layer only affects the areas with the red color fringe. Using black, I can mask out all the areas that should not be covered by the adjustment layer; the adjustment layer takes effect in the white area and balances out the color fringe.

Hair clipping with color range selections and color range fades

My clipping using the color range selection is finished. The clipping is very successful. Cropping via channels would not have produced a better result.

Hair clipping with color range selections and color range fades

Example 2 - the somewhat more difficult subject: curls

The view into the channels in this example is not quite as warming as in the first example image.

Hair clipping with color range selections and color range fades

Even with a contrast increase, I can only achieve usable results here with a considerable amount of time. For this reason, hair removal is carried out using a color range selection.

Hair clipping with color range selections and color range fades

First, I duplicate the layer with Ctrl+J because the right background area is slightly darker than the left one and I will make two color range selections. I then go to the color range selection with the first layer and select the grey in the background on the left-hand side with a low tolerance.

Hair clipping with color range selections and color range fades

I confirm with OK and invert the selection with Ctrl+Shift+I. I use Improve Edge to check possible optimizations of the selection.

Hair clipping with color range selections and color range fades

I add a layer mask to the layer containing the selection.

Hair clipping with color range selections and color range fades

I repeat these steps with the second layer for the right-hand hair area.

Hair clipping with color range selections and color range fades

I draw a selection from the middle to the edge of the document and color the upper layer mask inside the selection completely black. I then invert the selection with Ctrl+Shift+I and color the layer mask of the layer below completely black. In this way, I have created a good separation between the two layers.

Hair clipping with color range selections and color range fades

Now I clean the layer masks, as there are some residues of the background in the black. I also look for irregularities in the white of the layer mask. I use a brush in black or white in Normal mode and in the hairy areas in Overlay mode or with the Dodge tool to lighten and the Burn tool to darken these areas.

Hair clipping with color range selections and color range fades

The left side of the hair still has some unsightly areas. I improve these by selecting an area of the right side with the lasso tool, copying it and inserting it transformed on the left. If necessary, the edges of the copy must be blurred with a layer mask for a clean transition.

Hair clipping with color range selections and color range fades

My picture is finished:

Hair clipping with color range selections and color range fades

Limits of this technique:

In this case, with a dark background texture, the result is quite pleasing. The errors are easily overlooked. With a light background texture, the irregularities in the clipping are more than obvious.

Hair clipping with color range selections and color range fades



The result could only be salvaged with effort by making further copies of tidy hair areas - preferably with the lasso in the curved direction of the curl guide.



Conclusion: This technique can be used very well for easy subjects with uniform hair and background structures. With medium-difficulty motifs, it depends on the further processing. If the new background is to remain dark with dark hair, this technique is recommended. Extraction is not expected to produce a much better result. And channel selection would be extremely time-consuming in the second example. With light backgrounds and dark, unstructured hair, this technique is only recommended to a limited extent because all editing errors are immediately visible.

Clipping hair using color range masking

Another technique that addresses the color ranges or tonal values is the color range masking technique.

It is ideal if the new background is placed under the layer with the hair at the beginning.

Unfortunately, this technique is not very well known and is rarely described in books/magazines, although very good and above all very quick results can be achieved with certain image motifs.

When can color fading be used?

It is important that there are not too many deviations in brightness in the background, i.e. from the shadows to the mid-tones to the highlights. Nevertheless, with a few tricks, irregular backgrounds with different brightness levels can be faded out to a certain extent. It always depends on the transition area from hair to background. This is the yardstick for whether the technique works or not. If this area can be separated cleanly, good results are possible. The technique works best when the hair is light and the background is in the mid tones to shadows or the hair is dark and the background is in the mid tones to highlights.

Example 1 - the ideal motif: the smooth hair swirling in the air

I double-click on the layer thumbnail of the duplicated background layer or call up the fill options by right-clicking on the layer.

Hair clipping with color range selections and color range fades

In the fill options of the color layer, I edit the color range of the layer. I set the color range to "Red". I can use the two sliders for the color range to control the tonal values. This allows me to set, for example, that the highlights of the layer should be retained, while shadows to midtones are faded out. I have moved the left slider to the right in the middle so that I almost like the result.

Hair clipping with color range selections and color range fades

The transition can now be a little too gradual. I therefore select the left side of the slider by holding down the Alt key and drag it to the left again. A small triangle has detached from the slider, which ensures a smooth transition. Now I can fine-tune both sliders.

Hair clipping with color range selections and color range fades

Here, too, I have a red color fringe. I can compensate for this again with a Hue/Saturation adjustment layer from the first example.

Hair clipping with color range selections and color range fades

My cropping with the color range masking technique is finished.

Hair clipping with color range selections and color range fades

Example 2 - the somewhat more difficult subject: dog hair in front of an irregular background

Hair clipping with color range selections and color range fades

I have again placed a texture as a new background.

A look into the channels reveals that a channel clipping would again only be possible with considerable effort.

Hair clipping with color range selections and color range fades



In this case, clipping via Extract is recommended, as is the color range masking technique, which I would now like to explain.

I open the fill options again. I have moved the left slider to the center right to the tone value 130.

Hair clipping with color range selections and color range fades

For a smoother transition, I select the left side of the slider by holding down the Alt key and drag it to the left again to 90. A small triangle has detached from the slider, which ensures a smooth transition.

Hair clipping with color range selections and color range fades

I duplicate the background layer with Ctrl+J and place it under the layer I have just edited. Some areas in the dog, which also consist of mid tones and depths, such as the eyes, nose and snout, have been masked out. I therefore add a layer mask to the duplicated layer and Blender only the inner areas of the dog.

Hair clipping with color range selections and color range fades

I don't have a perfect result yet. Most of the hair parts have already been cropped. But because the background was not monochrome, some green stalks are still visible, which have similar tonal values to the fur.

Hair clipping with color range selections and color range fades



Here's a little trick: the hair has not really been cropped out, but only color areas that are still all there have been masked out. With an adjustment layer, I can change the tonal values of certain color areas and thus also influence the fade-out afterwards.

I will use a Hue/Saturation adjustment layer as a clipping mask to address the last green stalks. I select the green tones in the adjustment layer - as the background is green - and reduce the brightness to -100. The blades fade out as if by themselves because they now have their tonal values in the midtones instead of the highlights.

Hair clipping with color range selections and color range fades



I select the last remaining stalks with the magic wand and delete them or can also hide them in the layer mask.

My cropped dog is finished, with the fur still visible in detail.

Hair clipping with color range selections and color range fades



Tip: If the existing color range for the color range masking is not quite optimal, I can replace it using the color correction or adjust other color correction tools to the color tone that works best for the masking. It also works quite well to selectively address the colors and make them darker or lighter so that the tonal value difference to the object to be cropped is as high as possible.