ADVANCED Hair Masking In Photoshop – MASK HAIR From BUSY Backgrounds – Photoshop Tutorial

ADVANCED Hair Masking In Photoshop – MASK HAIR From BUSY Backgrounds – Photoshop Tutorial


Welcome back to another very exiting tutorial
here at the PhotoshopTrainingChannel.com My name is Jesus Ramirez, and you can find
me on Instagram @JRfromPTC In this Photoshop tutorial, you will learn
how to mask hair from complicated backgrounds. We will start with a quick crash course on
Layer Masks and the Select and Mask Workspace. Then we will move on to masking a photo with
a busy background, and I will show you the things that you can do when working with a
photo like this. If this is your first time at the Photoshop
Training Channel, don’t forget to Subscribe and to click on the notification button! OK, let’s get started. First, we will discuss Layer Masks. What they are and how they work. Simply put, Layer Masks allow you to hide
portions of a layer and reveal the layers below. The term “Layer Mask” can be confusing
for beginners. You can also think of it as simply “Layer
Transparency.” The Layer Opacity slider controls the transparency
of the entire layer at once. At 100% opacity, you can see the entire layer. This is 50% opacity. The layer is showing at half strength. And 0% opacity it hides the entire layer. It is completely transparent. A layer mask also gives you the ability to
control transparency but with more precise control over specific areas. You can create a Layer Mask by selecting the
layer, then clicking on the new Layer Mask Icon to apply a Layer Mask to the layer. Applying a mask to a layer will not cause
any immediate visual differences unless you have an active selection. In which case you will create a mask in the
shape of that selection. Notice the Layer Mask thumbnail. It is completely white. Which means that all the contents of this
layer are at 100% opacity and that there is no transparency. You can use the Brush Tool to paint with any
shade of gray or black to reduce the transparency of the areas that you paint on. Currently, my foreground color is set to black. Notice that the focus, the white outline,
is around the Layer Mask, which means that if I paint on the canvas, I will affect the
Layer Mask and not the pixels of the layer. And, I will make those areas invisible. In other words, I’m reducing the opacity
of those areas to 0%. To better understand how white, black and
the different shades of gray affect layer transparency, open the Foreground Color Picker,
by double-clicking on the Foreground color. Then set the Hue, and Saturation to 0. And set the brightness to 100. Notice that we now have white as the foreground
color. This means that we will have 100% opacity. If we paint with white on the layer mask,
everything will be visible. Which is why the layer mask was completely
white when we first created it. So that everything shows. If we type 50% in the Brightness input box
and then paint with this shade of gray, those pixels will have 50% opacity. The same transparency as dragging the opacity
slider to 50% And as you might have guessed already if we
type 0% in the Brightness input box, we will be painting with black, which is 0% opacity
and that makes the areas that we paint over completely transparent. If I press OK and start painting with black,
you will see how I am hiding those areas. I’m making them transparent. If I change to a different gray, such as 75%,
now I am painting with 75% opacity on that Layer Mask. And as you can see, Layer Masks are non-destructive,
which means that we can always comeback and edit the mask. Also, notice how now the Layer Mask thumbnail
is no longer completely white. It contains the shape that we painted using
75% gray. Now that you have a basic understanding of
how masks work let’s look at how to extract this person from their background. Then we will move on to a photo with a busy
background. In this case, we have a solid background which,
of course, makes the person a lot easier to extract. And this should be the way that you shot your
photos for when you are compositing. That’s the way professionals do it. Even in the film industry, filmmakers place
their actors in front of green screens, to make the extractions easier in post-production. It’s the same in idea in photography and
compositing. Of course, background removals are much more
difficult on low quality images or photos with busy backgrounds. They require more work, and there are easy
solutions. But no worries, we will talk about busy backgrounds
in this video, because sometimes you have no choice but to use what a client gives you. My preferred workflow is to create a layer
mask from a rough selection. You can select the Quick Selection Tool for
this. Select it from the Toolbar, or press W on
the keyboard. Then click-and-drag around your subject to
create the selection. If you make a mistake, you can hold Alt, or
Option the Mac as you click-and-drag to subtract from the selection. Once you have a selection that contains all
the main elements of the person, you can click on the Layer Mask icon to create a mask based
on that selection. Then use the Select and Mask workspace to
refine the mask. You can open it from the Properties panel. Select and Mask is a dedicated workspace that
helps you make precise selections and masks to cleanly separate foreground and background
elements. It is important to note that The Select and
Mask workspace replaces the Refine Edge dialog box found in earlier versions of Photoshop. So, if you are not on Photoshop CC, you will
not see this new workspace. However, they both offer the same functionality,
but the Select and Mask Workspace does it in a streamlined way. If you are on Photoshop CC, but you prefer
the old Refine Edge dialog box, then you can hold Shift and go into the Select Menu and
click on Select and Mask while you have a selection or mask active. This brings up the old dialog box. And you can work with that if like. I prefer the new Select and Mask Workspace,
and that is what we will use for this video. There are many settings and tools that you
can use in the Select and Mask workspace that will allow you to refine your sections and
masks. But, generally speaking, I like to start by
selecting a view, that gives me a good representation of what my selection looks like. In this case, “Onion Skinning,” the default
view works. I can use the transparency slider to show
or hide the unselected areas. You can then use the tools in the tool bar
to add or subtract to the selection. Notice that we have a few selection tools
here, including the Quick Selection Tool. And you can use these if you need to continue
adding or subtracting to your selection. I this case, I do not need to do that. Instead, I am going to focus on and take advantage
of the edge detection tools and settings. First, you need to understand that this workspace,
just like the old Refine Edge dialog box is all about working with the edge of the selection. You can start with the Radius. The radius Determines the size of the selection
border in which edge refinement occurs. You can think of this as a stroke around the
edge of the selection where Photoshop looks to make the refinement adjustments. You can actually see this border if you check
the “Show edge” check box. Notices how the edge increases and decreases
as I adjust the Radius. The Smart Radius allows for a variable width
refinement area around the edge of your selection. In other words, Photoshop will automatically
change the refinement area based on the content of the image. I started with these two options because I
wanted you to see what the edge is, and how all these sliders help adjusts that edge. The next tool that you should be aware of
is the Refine Edge Brush Tool. It allows you to precisely adjust the border
area in which edge refinement occurs. For example, brush over soft areas such as
hair to add fine details to the selection. You can use the left and right bracket keys
on the keyboard to adjust the size of the brush. Notice that as I brush over the hair, the
preview is updated, and the background is removed from in-between the hair. Also, notice that if I enable the Show Edge
check box, the border was adjusted in the areas that I painted on. If I continue painting with the Refine Edge
Brush tool, the edge of the selection will change. Again, this works great for portraits of people
with long flowing hair since you can tell Photoshop exactly what areas to apply the
edge refinements. I’m going to undo these last few edge refinements,
and disable the edge view. You can then use the Global refinements as
needed. I’m going to change the view to “Black
and white” so that you can better see how these adjustments affect the mask. Smooth: Reduces jaggedness in the selection
border to create a smoother outline Feather: Blurs the transition between the
selection and the surrounding pixels Contrast: makes bright areas in the mask brighter,
and dark areas in the mask darker. So, it reduces softer transitions. Shift Edge: Moves soft-edged borders inward
with negative values or outward with positive values. Shifting the edge inward can help remove edge
halos from certain selections. The adjustments that you should apply in this
workspace, of course, all depend on the object and selection that you have. But most of the time I seem to adjust the
Smoothness, and Shift Edge. When you’re done you can press OK, and your
mask will take on the adjustments that you applied. There’s a few things that we can do to further
refine the mask. For example, we can use the Dodge and Burn
tools, which darken or brighten pixels. With the Burn tool, we can darken pixels with
the Layer Mask selected, and using the Burn tool I can come into this area here, in between
her arm, and you can see how we have a halo. With this tool, I can simply paint and remove
that halo, because I’m making those edge pixels darker. Therefore, I’m hiding them. If I go too far, I can either use the Dodge
tool to brighten those pixels back up, or I could come into the Brush tool and paint
with white. I’m going to use the left bracket key on the
keyboard to reduce the size of the brush and paint with white to get those pixels back. I want to double-tap on the Hand tool to fit
the image to screen, and I can do that for the rest of the image. I’m going to quickly just do one other part,
which is here on her arm, that is showing that edge halo. The next thing that you can do to enhance
the image is, first select the Eyedropper tool and select the darker hair color, but
make sure that you have the layer selected, not the Layer Mask. Otherwise, you will select one of the shades
of gray in the Layer Mask. When the focus, the white outline, is on the
layer, click and select one of the darker shades of her hair color. Then create a new solid color and press OK. You can then press Ctrl Alt G, that’s Command
Option G on the Mac, to clip that to the layer below it. Then we can select the Layer Mask, click Invert
to make the Layer Mask black, and reduce the transparency to zero, make it invisible. Then paint with white to reveal the brown
on those stray hairs, and you can change the blending mode to Darken so that this effect
is only applied to the brighter pixels. This blending mode looks at both layers and
keeps the darker pixel. It’s not a big change, but in some cases,
it can help a lot. I’m going to double-click on the Hand tool,
and you can see the entire image, and you can continue painting with white on that Layer
Mask just to further enhance those stray hairs that were taking a lot of that gray background. I’m only using one color fill layer, but in
some cases, you may need more than one for the different shades of color found in the
hair. Even though we were working in the ideal situation
where there is a lot of contrast between the foreground and background, there were still
some elements that we couldn’t really mask, and that’s because they just didn’t have enough
contrast, and that’s okay. It’s okay to disregard elements if they’re
too difficult to select. Of course, we can spend a little more time
to further refine the mask, but I think that you get the idea. As you can see, this is a very simple task
if your foreground and background have enough contrast between each other, but what happens
when you’re working with a busy background where there is not much contrast between the
person and the background, especially in areas with flowing hair? Well, you’ll be surprised to find out that
in most cases the process is very similar. The only difference is that you must either
disregard areas that are too difficult to select or recreate them somehow. In the advance example, we will use this image. As you can see, the background is a complicated
one. There is not much contrast between the background
and the hair, so this will make it difficult to make an accurate selection. This document contains two layers, the woman
and the background that we want to place her in. Before we do anything else, I’m going to create
a new solid color fill and just change the brightness to 50%. That way, I can switch between the gray background
and the background we’re going to put her in, and that is going to allow us to better
see what’s going on. The reason that this is more complicated than
the previous example is that the hair is very fine, and the background is not a solid color. As you can see, we have dark areas, light
areas that are very similar to her hair color, especially here in the yellow, and it makes
it very difficult to select, so I’m going to select the Quick Selection tool from the
tools bar. Then I’m going to click and drag and make
a selection around the model, and I’m going to show you what happens if we try to make
a similar refinement as in the previous example with this busy background, and I’m going to
make sure that her layer is also selected. Then I’m going to create a new Layer Mask
and click on Select and Mask. If I increase the radius and check Smart Radius
and then start painting with the Refine Edge Tool, you will see that Photoshop will not
do that good of a job simply because the background is too complicated, and we can maybe shift
the edge, adjust the contrast, and try to do different things to get a better selection,
but it’s just simply not going to give us the result that we want. If I press OK, you’ll see that that’s the
result. This is what it looks like up against the
background that we want to place her in. The secret that most people won’t tell you
is that you will simply have to disregard certain areas if they’re too difficult to
select, and what you will have to do instead is recreate that area either by painting it
in or composite the hair back in from another image. Let me show you how that would work. I’m going to delete this Layer Mask, and I’m
going to use the Quick Selection tool once again and just make a very rough selection
and make sure that I don’t go into the background or to those stray hairs that are near the
background just as best as I can. That looks pretty good, so I’m going to click
on the New Layer Mask icon to create a new Layer Mask, and I’m going to be working with
this gray layer enabled so that we only focus on her, and when we need to check the image
with the background, we can see the background. I recommend working with the final background
that you’re going to use, because sometimes the background may help you hide a lot of
the imperfections of the mask, and you will not waste the time working in areas that you
don’t need to, so you want to have it available so that you can check, so I like having a
gray layer and the background layer. That way I can switch between the two. One of the things that you can do is paint
in some of that detail. To paint in detail, all you need to do is
select the Brush tool. This becomes so much easier if you use a tablet
and a stylus. You can do it with a mouse, but it’s much
easier with the tablet. I’m going to select the Brush tool, and I
am using a tablet, by the way, a pressure-sensitive tablet, and I’m going to select a regular
circle soft brush and then bring the size down to one pixel, and I’m going to create
a new layer. Notice what happens when I paint. It’s just a single line. Then I can go into the properties of the brush,
the Brush Settings, make sure that I have Transfer selected, and Control is set to Pen
Pressure, and do the same thing for Shape Dynamics. Enable that, and Control, set it to Pen Pressure. Now notice the difference. If I paint lightly, you can barely see that
line, and if I push in hard on the pen, then you can see it, and that allows me to create
effects like that. We’re going to use that to create our hair
strands, so I’m just going to delete this layer and create a new one. Then I’m going to hold Alt-Option on the Mac
to temporarily select the Eyedropper tool as I have the Brush tool selected, and we
can come into this area here, select that color, and start painting stray hairs. Also, try to follow the flow of the hair,
so it looks more realistic. I’m going to zoom in, and I’m going to hold
Alt to select a different color. You want to use different colors just like
in the original photo, and continue painting with that color. I know this will take some time, but this
is one of the ways in which you can bring in some of that detail back into the image
because it wasn’t there, to begin with. Don’t worry if it doesn’t match the original
hair. As long as it looks convincing, nobody’s going
to know what the original strands of hair look like anyway, so there is no need for
you to worry about matching the original hair precisely as long as it looks good on your
composite. I’m going to double-tap the Hand tool to fit
the image to screen. The other thing that you can do is create
brushes of hair that you can use on something like this. I’ve already made some brushes, so I’m going
to select my Brush tool again, and I’m going to go down to these hair brushes. This is one here that I’ve made, and it’s
pretty big now, so I’m just going to reduce the size. What I’m going to do is, I’m just going to
paint. That’s actually a little too small, so I’m
going to undo that. Then I’m going to use the bracket keys on
the keyboard to increase the size. I’m using the right bracket key. Then I’ll paint. As you can see, it’s that hair ball that I
can now use to place accordingly anywhere on this image. By the way, I had to do that on a new layer
so that I don’t move the original paint strokes, so let me undo that, create a new layer, and
once again paint that hair back in there. There it is. I’m going to press the V key on the keyboard
to select the Move tool, and I can just move that in place that accordingly, so I can place
that behind her in any one of these areas where I think the hair would work, and I can
press CtrlT, CommandT, to transform and transform that and distort it any way that I need. I could also right-click on it and select
Warp and just warp that hair as I need to and place it in that area there as well. I can also come in and choose a different
style of hair, so I have this one here, hair number three, and once I paint, you can see
what that looks like. Again, that’s too big, so I’m going to reduce
the size of that brush by using the bracket keys, and there it is. If it’s too light, that’s because we have
the Transfer enabled in the Brush Settings, so I can disable that. I can also disable the opacity pressure sensitivity
from the options bar. Then when I paint again, you’ll see the difference. Let me undo those changes by pressing Ctrl-Alt-Z,
Command-Option-Z on the Mac, create a new layer, tap to paint, and I can move that layer
and place it anywhere that matches, but in most cases, you will have to transform it,
so I’m going to press Ctrl-T, Command-T, to transform, then right-click to flip horizontal. I can move that and place that into position
somewhere else, maybe here, then double-click to the side of the layer to bring up the layer
styles, check Color Overlay, then double-click on the color to bring up the Color Picker
and select a similar hair color. You can always come back into that original
layer, where we were painting with that one-pixel stroke, and continue painting with a one-pixel
stroke to sort of blend in those areas. In this case, I probably would need a darker
color and then paint that in just so that it blends better. That’s basically what you would do with those
brushes. Now I’m going to show you how to create those
brushes. I have this file here which has the final
brush composite, but it came from an Adobe stock image. You don’t have to use a stock image. You can just take photos on your own and then
convert them into brushes. I just found it much easier to find a stock
image that was already isolated, and I can convert that into a brush. Basically, what I did is go into the Channels
panel, because you can use channels as selections as well, and this technique could be used
for anything, not just this example, so as you watch this, think about how you can apply
this technique to your images. We have three channels, red, green, and blue. What you need to do is click on each individual
channel and see which channel has the most contrast between the foreground and background. In this case, the blue channel has the most
contrast, so you can click and drag that into the New Channel icon to duplicate it. Then we can adjust the contrast of the image
to further isolate the foreground from the background, but before we do that I’m going
to press Ctrl-I, Command-I on the Mac, to invert, because the white pixels is what we’re
going to keep, so we want to keep the hair. Then you can do several things. You can go into Image, Adjustment, Levels,
and use the levels to adjust the brightness of the image. That way you can better isolate the hair from
the background. You can even go into Image, Apply Image, and
apply that image onto itself using a blending mode. The Multiply blending mode makes everything
darker. That might be too much, so we can bring the
opacity to zero and then start increasing it accordingly until we get something that
we’re happy with. Then we can press OK. I can see a lot of gray inside of the hair
that probably should be white, so I’m going to go into Image, Adjustment, Levels once
again and just click and drag this white point to the left to make those pixels brighter. Then we can simply hold Ctrl, that’s Command
on the Mac, and click on the channel thumbnail to make a selection out of the bright pixels. Then I can click on RGB, go back into the
Layers panel, and create a new layer and fill that layer with black. I’m going to make sure that black is my foreground
color, so I’m going to click on that icon there. Then I’m going to hold Alt and Backspace,
that’s Option-Delete on the Mac, to fill with the foreground color, which is black, and
I can do that one more time to make that even darker. Then I can press Ctrl-D, Command-D, to deselect,
and I’m going to switch over into the Move tool by pressing the V key on the keyboard. Click and drag this up and then press Ctrl
J, Command J on the Mac, to duplicate, so now I have two layers. Then Ctrl T, Command T, to transform. I’m going to flip it vertically and then flip
it horizontally, and then I’m going to put it right about here. I’m trying to make sure that the shadows of
the hair are not too noticeable. Since they are, I’m just going to right-click
on it and select Warp and just warp those in like so. Then I’m going to hit Enter, and I’m going
to do the same thing for the layer number one. Ctrl T, Command T, to transform. Right-click, select Warp and push the shadows,
these shadows here on the bottom so that they’re not noticeable. Then commit the changes by pressing Enter,
Return on the Mac. I’m going to hold Shift, click to select both
layers, then press Ctrl E, Command E on the Mac, to put them into a single layer. That’s called merging a layer. Then I can use this for my brush, so with
that layer active, I’m going to go into Edit, Define Brush Preset, and you can call it whatever
you like. I’m going to call it “hair ball,” so now there’s
my brush, so if I create a new layer, I can click, and there’s my hair ball. Again, you can press Ctrl-T, Command-T, to
transform, and you can click and drag the corner handles and rotate it and warp it any
way that you like so that it better helps the composite that you’re working with. I have one more that you saw just a second
ago was that long strand of hair. This is the image that I used, so if I come
into hair number three and create a new layer and click, you’ll see how that is that right
there, it matches perfectly. That’s what I used to create that strand of
hair, so you can use whatever you like. You can use portraits that you’ve already
taken, or you can take photos of hair balls, or go into any stock photography website and
download photos of hair, so you can have a library of hair that you can use for when
you have to composite hair in, in those difficult situations. By the way, you can even composite this hair
in. You don’t have to turn it into a brush, so
if this model had similar color hair, I could have simply just copied this area, masked
it out, and then I would have used that as the hair, so it doesn’t have to be a brush. Also,
I’m going to have these two brushes available for download on my website, photoshoptrainingchannel.com,
or you can use a short URL, ptcvids.com, and then look for this tutorial. If you’re watching on YouTube, then there
will be a link to the page on my website right in the description, and you can download these
two brushes if you like. I’m going to go back into the document that
we were working with. I just want to point out that it takes a lot
of time to do this type of thing. I understand that, but it’s really the only
way of making it work. If you don’t shoot your model up against a
solid background with a lot of contrast, it’s going to become very difficult for you to
mask, so these are the alternatives. What I’m going to do now is show you a finished
version of this document. I’m going to disable this layer, and you can
see all the different layers that I created, like these two hair balls, those strands of
hair that were distorted, lines that I painted over to simulate stray hairs, and more hair
balls of different colors. In some cases, I had to blur the hair strand
layers to match the depth of field of the photo. So, this is the after image. If I were to disable all these layers, you
will see what the original selection looked like, and that will enable the layer so that
you can see what it looks like with all the hair that I composited in. I’m going to disable the mask by holding the
Shift key and clicking on it. That’s before and after. Notice that the strands of hair do not match
perfectly, but that’s okay. This took me about 30 minutes to complete,
so it wasn’t necessary for you to see every single step that I did. I was basically repeating the same two or
three steps that you already saw to complete the composite. I’m going to zoom out. Something else that I want to show you is,
since this is really a compositing job, something that you may want to do after you finish something
like this is put that either into a Smart Object or into a new layer. In this case, I’m just going to put it all
in a new layer, so you can press Ctrl-Alt-Shift-E, that’s Command-Option-Shift-E on the Mac,
to put all the visible layers into a new layer. Basically, you’re making a copy, merging it
all together onto a new layer. In this copy, what I’m going to do is go into
Filter, Camera Raw Filter, and I’m just going to go into the Effects icon and just add a
little bit of grain. I’m going to zoom in, so you can see what
I’m doing. The original background was actually a background
that I blurred, so it lost all the grain, so I want to bring some of that grain back. That grain is also going to go into those
stray hairs, so it’s going to make it look a little more realistic, and if I zoom in
to 100%, you’ll see that the grains are not that noticeable. That’s really what we want to do. Also, in some cases, you may want to add just
a little bit of sharpening and then press OK. I know it’s difficult to see there, but if
we double-click on the Zoom tool to zoom to 100%, you will see a slight difference before
and after. Obviously, if we zoom in into certain areas,
you’ll see how we added that grain, and I think it helps, and you can see some of that
blurry strands of hair in the back. By the way, I think that the grain works because
it’s an element that ties everything together. You could also do that with color or other
elements, but adding grain seems to work a lot of the times for me. That’s it for this tutorial. I hope that you enjoyed it and that you learned
something new. If this is your first time at The Photoshop
Training Channel, don’t forget to click on that Subscribe button. If you have any comments or questions, leave
them down below. Thank you so much for watching, and I will
talk to you again next time.

100 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *