Watching:

Masking a person from a white background


show more Masking a person from a white background provides you with in-depth training on Design. Taught by Deke McClelland as part of the Designing a Retro-Style Superhero show less
please wait ...

Masking a person from a white background

So this is the effect we're going for. But like any superhero he starts from more humble origins, specifically this guy right here, which is an image from the Fotolia image library. About which you can learn more and get special deals, by the way, by going to fotolia.com/deke. Now the great thing about this guy is he has his arms raised, so he might look like he's flying if it weren't for the dumb bells and of course the fact that he's obviously standing on the ground. But we can solve that quite easily because he is set against a plain solid color background.

Which is going to work, very much to our advantage. First step is to create a silhouette of this guy, and that's exactly what we're going to do in this very chapter. So, for starters, inside of this image, if you're working along with me. What you want to do is go to the Channels panel and check out your various channels that are available to you. If you're working from a portrait shot like this one here, then your red channel's going to be by far the lightest, and because he's set against a white background, that's no good. If he was set against a black background or even a dark background, that would work out nicely.

But instead we have a white guy against a white background. And even if he had darker skin, he's still going to show up very light inside of the red channel. He's going to darken up inside the green channel, regardless of ethnicity, and then he's going to be darkest inside the blue channel. So, you want to take the blue channel and duplicate it basically on top of itself like so. Switch back to the RGB image right there at the top of the Channel's panel, then go up to the Image menu and choose Calculations. And that's my keyboard shortcut by the way. By default, there is no shortcut for this command.

And then you want to make sure both of your sources here, source one and source two, are set to this Fotolia bodybuilder.jpeg image, or whatever image you're working on. And then change both of the channels to blue. This is going to work for any portrait shot once again. And change blending from its default which is multiply which is pretty good as you can see. We're getting a nice dark guy against a bright background. However if you want em to be even darker, which we do, then you want to go ahead and double up the mode to Linear Burn.

And we'll end up with this darker effect right there. And you want to set the result in a new channel, that's great. The Opacity should be 100%. Next all you need to do is click OK to create this new alpha channel, which is called Alpha One. And I'm going to leave that name as is for now. Now, I want him to be white against the black background so we can select him, and then fill him with black for silhouette. I'll go up to the Image menu, choose Adjustments, and choose Invert. And that'll go ahead and invert those colors so he's bright against a dark background.

And now because the background is so very, very black, in our case, it used to be very, very white of course. What we want to do is exaggerate his brightness using the Threshold command, which is a command you don't use very often because it gives you jagged results, which is why I'm going to zoom in so we can see exactly what we're doing. I'll zoom in to, let's say, 100%. And I'll just go ahead and Spacebar, drag him down a little bit, so we can see his face and a bicep here. And now I'll go up to the Image menu, choose Adjustments and choose Threshold.

And the idea is that we have a default Threshold value of 128, that's a brightness value of 128. Whereas white is 255, like so, and then black is zero, so we can't quite get down to black, but we can get down to just next door to black which is one. So low values are dark, high values are bright. Anything brighter than whatever value you enter, for example I just changed my Threshold level to 108, anything brighter than that is now going to be white, and anything darker is now going to be black.

And that's why I say we get very jagged transitions. Because every single pixel inside the Alpha channel turns either black or white. What we want is to move this guy down. Basically to one for starters, and then nudge it up from the keyboard by pressing the up arrow key until all this junk goes away, these little weird straight pixels around his shoulder and ears and so forth. And that happens very satisfactorily at a threshold value of 20, in the case of this image.

So I'll go ahead and enter 20, and then click OK. And now I'm going to rename this alpha channel just so I remember what I did. And so I'll call it Threshold 20. For example just in case I have to come back and either replicate or modify my results. Alright now at this point very likely you'll want to make some modifications, do a few manual touch-ups. And you do that using the Brush tool, which you can get by pressing the B key. Then you want to right-click inside the image window and change the size value to something like 50 pixels, and then here's the important part, you want the hardness value to be 100%, in order to pull this off.

Then press the enter key, or the return key, on the Mac, to hide the panel. Make sure Mode is set to Normal. In this case, so Pass In needs to be 100%, up here in the Options bar. Then press the D key, just to make sure that you have your default masking colors, which is white for the foreground and black for the background. And then paint, in my case, this little bit of jaw away right there. And then you might want to check out the arms. Now, those barbells are a problem, we'll come back to em. But you might want to paint in this area right there next to the hand in order to fill that in with white.

And then just go ahead and scroll around the image, you are going to see some folds in the fabric if there is any fabric in your image, and we'll come back to that in the next movie, for now we'll just let that go. But, what we do need to take care of right now is the shoes, so I'm going to go ahead and paint away some of this black gook inside of this right shoe. And then I'll go over to the left shoe and do the same. I could be working with the larger brush, but this works pretty well. Alright, now let's go up to those hands that are holding the barbells. We need to paint away the barbells by making them black.

And we're going to do that by pressing the x key. So, the foreground color is black like so. And them I'm just going to sort of click every once in a while around here. In order to fill things in like that. And I know so far I don't really have very good looking results. But I will in a moment. Just need to get this stuff painted away. And I'll go ahead and paint this guy, of course. And there's this stuff that needs to be painted away. And let's go and zoom out. Increase the size of the brush as well, now you don't have to do a super great job along the hands, because we're actually going to rebuild the hands later, but you probably want to do a half way decent job.

So I'm just clicking once again, just because it's the easiest way to get rid of some of this stuff, now I'm dragging, of course, and now I'll click at these locations right there and I'll go ahead and paint that away, and let's get rid of this guy too. Clicking sometimes is just the easiest thing to do when you don't want to run a foul of the image paint too far into it. Alright now I'll press the x key to switch the foreground color back to white, and I'll click here and here a couple times like so. Just to make that hand look like it's sort of bowing outward.

And I'll go ahead and fill in those regions. Don't need to worry too much about the fingers since we have a kind of fist going. I'll reduce the size of my brush by pressing the left bracket key a couple of times there. And then I'll click and drag up. You are going to get kind of lumpy results by default. And that's because Photoshop's default spacing value is too small. And if you want to switch that, if you want to fix things, then go up to the Window menu and choose the Brush command in order to bring up the Brush panel, and drop down to the Spacing value right there in the Brush Tip Shape area.

So, this item, at the top of the left hand list has to be selected, and then change the Spacing Value to 10% and press the enter key. And now after hiding the panel if you drag you'll see that you get less lumpy results and so in other words you get much smoother results. If you prefer, press the x key to switch back to black again, as my foreground color, click right about there, Shift+Click over here. And now I have a pretty smooth result where the hands are concerned but we still have very jagged results elsewhere along the body, and we have these little folds left over from the fabric.

And we're going to take care of these problems. We're going to make things nice and smooth all the way around in the very next movie.

Masking a person from a white background
Video duration: 8m 20s 4h 57m Intermediate

Viewers:

Masking a person from a white background provides you with in-depth training on Design. Taught by Deke McClelland as part of the Designing a Retro-Style Superhero

Subject:
Design
Software:
Illustrator Photoshop
Author:
please wait ...