Skip to main content

Masking Hair From Difficult Backgrounds

Lesson 9 from: Essential Compositing Tips & Techniques In Photoshop 2021

Jesús Ramirez

Masking Hair From Difficult Backgrounds

Lesson 9 from: Essential Compositing Tips & Techniques In Photoshop 2021

Jesús Ramirez

buy this class


Sale Ends Soon!

starting under


Unlock this classplus 2000+ more >

Lesson Info

9. Masking Hair From Difficult Backgrounds

Instead of masking, paint-in difficult to select hair!

Lesson Info

Masking Hair From Difficult Backgrounds

in this video, I'm going to show you how the mass care from difficult backgrounds. We're going to work with the same background we had in the previous example. But in this case, we're going to use a new foreground, and this woman is standing in a busy street. And as you can see, her hair does not have a lot of contrast from the background. She's blonde and she's up against a yellow background in this area, and there's also ah lot of white and grace in this area that will make the hair very difficult to select. In the process of masking these types of images, it's actually very similar to the previous example. However, there are some differences. Let's start with the similarities. First, make sure that your woman layer is selected and I'm going to click on the remove background button. Photoshop will actually do a pretty decent job. It's not bad at all. Considering is just one click, and the hair is up against a busy background. But obviously this is still not good enough, so I'm going ...

to select the layer mask thumbnail and click on the selected mask button to bring up the select in mask workspace. I am currently in the on black view, and that's okay. The first thing that I'm going to do is make sure that I refined the hair in the previous video. I use the refined edge brush for that I painted over the edges of her hair so that Photoshop could do some edge refinement on those areas in Photoshop 2021. There's actually an automated method to do this, and you can do so by simply clicking on the refined hair button. But before I do that, I'm going to click on the show edge button so that you can see that there is no edges. And if I increase the radius like it did in a previous video, you can see the edges of the mask. But I'll leave the radius at 20 And what I'm gonna do is I'm going to simply click on Refine Edge, and this will use Adobe Sensei artificial intelligence to find the areas of the image that contained the hair. And it will apply the same hair refinement as painting with the refined edge brush tool. Now Photoshop, select areas that you really don't want to refine. You can click on this minus icon and pain away those areas. In this case, we only have two pain away certain areas like these areas here. But for the most part, Photoshop did a very good job. What I'm gonna do now is unchecked show edge because we really don't need to look at the edge. And this is what that refinement adjustment looks like. If you need to, you can go into the brush tool to paint in areas that shouldn't be hidden. But in this case is gonna be very difficult because the background there is yellow, and we're gonna get some of that original background. So I don't think I can paint that area in too much and a lot of these other elements again very difficult to select. So what I'm gonna do is I'm just going to smooth out the image a little bit and increase the contrast. I'll press okay. And I know that this time I didn't do it in two steps, and that's okay. The reason that I didn't do it in two steps is because I'm gonna be hiding a lot of the hair anyway, So there was no point on doing two steps. What I'm going to do now is enable the background where my model will go and the reason that I'm enabling the background and so that I could see what the hair looks like up against the background, and we might be able to use some of this hair. But for the most part, we're gonna have to hide Ah, lot of the hair that we couldn't select. And that is the dirty little secret among professional composite er's. You hide things there too difficult to select, and instead you paint back in those details. And there's two ways of painting hair back in. In Photoshop, Number one is to simply create a new blank layer, and I'm going to call this hair strands and you can paint hair strands on this layer. I'm currently working with a welcome tablets, so I will select my brush tool and I'm going to go into my brush settings, and I'm going to make sure that the spacing is set to 1%. Shape Dynamics is set to pen pressure for size jitter, and I'm also going to go back into my brush tip shape and increase the hardness so that I have a fairly hard brush. Now I can hold Altan windows option in the Mac and click to select her hair like so and reduce my brush size by tapping on the left bracket key. And I could just paint in strands of hair. They're actually quite small because I have my brush really, really small. And that's okay. I don't need larger hair strands. I just need this tiny little ones and I can build upon it. Currently, I'm just painting with the same color, but I can always go back into the hair and select a different color. For example, this lighter blonde here I'm holding Altan Windows option on the Mac to select that. And I can now paint in with this new, brighter color like so. And obviously I'm not going to spend the time in this video. But this is all I would need to do in order to paint those fly away hairs. And also in areas like this one where the hair is not selected properly, I will need to go back in there and hide those pixels. So I'll click on the layer mask thumbnail with my brush tool selected. I can paint with black, and this time I will use a larger brush. And I would just pain away these hairs that don't look right. So you will have to spend a lot of time fine tuning these details. But at the end, it will give you much, much better results. And you could just continue painting accordingly. Like so you might be able to find a hair like this one, and it's actually a little bit thicker. So I'm gonna make my brush larger and then just follow its contour. Like so again, this will take some time. I'm going to double click on the handle and this is the before and the after, and there's actually another technique that you can use by creating a new custom brush. I'm going to go into this image and you can see this strand of hair and what I'm gonna do is I'm gonna turn this into a brush and to do so, we need to make the hair completely black and the background completely white to do so. We're gonna go into the channels panel and notice that each channel has different contrast between the hair and the background simply go into the channel that has the most contrast in this case, the Blue Channel, and duplicate that channel by clicking and dragging it into the new channel icon. Then you can press control I on Windows Command. I am the Mac to invert that channel, and now we need to make the background black. And I know that's the opposite of what I said. But give me a moment. You'll see why I'm doing this. Then go into image adjustment levels, then make the darker pixels darker by dragging this black point to the right and you can make the brighter pixels brighter by dragging the white point to the left and you can adjust a gamma with this center slider. When you're done, you can press okay. Since we're in a channel, we can actually make selections out of these channels. So if I hold control on windows, commanding the Mac and click on the channel, thumbnail Photoshop will load that bright pixels as a selection, which is why I was doing the opposite of what I told you earlier. Then click an RGB and go back into layers panel. Now that I'm here, I can create a new solid color failure, and I'll fill it with black. And I can create a new solid color and make it white, and that will be our brush. I could go on the top of the layer stack and go into edit. Define brush preset, and you can see the hair strands on this brush. I can just call this brush hair and press OK. If you have the brush tool selected, you'll notice that that brushes automatically activated. If not, it will be the last brush on the brushes panel. Then I could go back into my working document and I can paint. I'm just gonna create a new layer. And I'll just call this one hair brush just because this is where we're going to use the brush. And I can just click once and you can see the result. So what I'm gonna do now is press control Z on Windows commands and the Mac to undo. And I'm going to tap on the left bracket key on the keyboard to reduce my brush size, and you can see the preview there and just reduce the brush size until you have something that matches the layer that you're working with. You can also click on this icon and flip your brush horizontally by clicking on Flip X. See that now it's facing the same side. Asked my model, and I can use the left and right arrow keys on the keyboard to control the angle of my brush. You see how it's rotating there When I tap on those keys, you could also use the angle adjustment from the top here. So then try to get the angle as's closest possible. Maybe even make the brush a bit smaller and just paint when you're done. And in this case, you actually wanna have this hairbrush beneath the woman layer so you can click and drag it down below her. Or you can use the keyboard shortcut control left bracket That's command left bracket on the Mac. And as you can see, we have something that looks fairly convincing and you will need to make more brush strokes. But this time you can select the darker color and make the brush smaller and you can paint. I'm just gonna paint in several hair, strengths like so so you can see that result and obviously you can just delete the pixels that are not working. One way of the leading pixels that I like is by using just a regular brush and then holding down the tilde key. That is the key right above the tab key on North American keyboards. Or, of course, you can use that. You raise your tool. And I know that this is not looking great, but I haven't really spent time fine tuning the image. I just wanted you to see this result. What I'm gonna do now is show you a file that I've completed using exactly the same techniques. But of course, spending a little more time fine tuning the image and painting the hair in.

Class Materials

Bonus Materials with Purchase

Atmospheric Perspective
Matching Brightness
Matching Saturation
Matching Ambient Color
Select and Mask
Masking Difficult Hair
Blending Modes
Custom Brushes
Putting It All Together

Ratings and Reviews


This course teaches what you need to know about creating composites. As alway Jesus delivers in a clear, precise and fun way. You can just tell this guy has a great personality and he loves what he does. I greatly enjoyed the course and would strongly recommend it. A big thumbs up!!!

a Creativelive Student

One of the best courses I've done on CreativeLive and that's a high bar! An incredible mix of in depth guidance but also some simple photoshop tips along the way, I had so many 'wow' moments, learning things I had no idea you could do in Photoshop. Really a good pace too. Quite a short course but so many good lessons to revisit. Great work!

Javier Tinoco

Great course by Jesus Ramirez. This course teaches you several techniques regardless of your experience level. I've learned a lot from this course and I will recommend it to anybody wanting to start with PS or would like to expand their knowledge.

Student Work