Refine Edge Selection on Image
Now of course this scene would not be complete without our little feline friend, so we'll go over back to our photo bin and he's open right down here. And this is gonna be a good example of making a little bit more complex selection. So we have this cat on a white background and the cat of course, is furry. So he's got hair, that is some tricky business that is not gonna go so well with this little quick select just by itself. How are we gonna to get that hair? It's looking like we just gave him a buzz cut. So what we're gonna do is we're gonna complete this selection in a couple of different parts. I'm gonna use this same tool that we've used before. So we'll make that quick selection. So I'm just selecting him real quickly, and it's not perfect and I know that. But I think that's about as good as we can do with this tool, and then when we're happy with that we are going to do the second part. Which is we're gonna refine this selection. So right now if I grab the move tool, and I try ...
to-- well lets put him somewhere. Let's bring him in. We'll shift... Where did that go? Somehow I had more than one open. Well this is right. We'll bring him in here and if we look at this, he got a haircut and that doesn't look very good. That looks like, "Oh? Have you been Photoshopping again?" That's not something that we want people to say when they see our work in Photoshop. We don't want them to see our work in Photoshop. That's the whole point. So let's go back to this kitten and we're gonna refine this selection. So from the select menu we're gonna choose refine edge. And this is pretty awesome because it's so powerful, and I don't know that you can fully appreciate it until you've tried not having it. So this is pretty advanced stuff. So we've got the ability to fine tune this selection, and at the top here the first thing we want to do is take look at our preview basically. So right now we're viewing just the image and our selection of it. But I think a more helpful way is to view it as a black and white mask. It allows you to just preview it normally. You can preview with the marching ants. You can preview with this, it's called a Rubylith Overlay. It just says overlay here, but that's what's kind of this pink overlay. We have a black to view it on a black background, or a white background, on a blank layer, or to just really see the whole thing. I like this black and white view and you'll see why in a minute. But what we want to do basically, is tease out this selection to include his fur, and a quick easy way to do that is take this radius slider and just drag it here-ish to the right. And you'll notice when I do that and then I let go, that Photoshop is suddenly aware of all his fur. And suddenly we have this little furry selection around him, which is pretty good. We can continue to fine tune this. We can turn on things like smart radius that helps to sort of clean that up a little bit but we still get the fur. We can come down here. Maybe we want to shift that inside a little bit if we want to avoid any fringe on the outside. But I think I'm gonna actually just leave this. It's so sticky on my tablet. So we can also adjust things like contrast, and feather or smooth, these aren't gonna really apply here. Smooth is gonna look like, almost like you just took a finger along here and smudged the edge, which for this particular instance it's not gonna help us. Same with feather. Feather is gonna just blur the edge like this which is super handy for a lot of things, but not for this cat selection. So I'm just gonna leave those alone and we can go ahead and turn on smart radius and I'll set the radius up here to 58 pixels, and I'm gonna go ahead and click okay. And then we get back here to this image and it looks like nothing happened. So you want to make sure you don't panic when you do this and think nothing happened it didn't work. It totally did work, but what happened is now we're out of that preview mode, now we're looking at this in marching ants, and marching ants can not display the finesse that we have applied to this selection. So you just have to kind of trust in your heart of hearts that Photoshop has refined this selection and that this is gonna be okay. So that said, we've got our move tool, we'll go back to our photo bin and I'll just grab this little guy and we'll bring him in and I'm going to Shift drop him. And look at him, he's so cute, and we can see his fuzz made it. He doesn't look like he got a haircut. But he is too large for this scene. So we will scale him down, Command or Control T. We'll put our cursor in the corner and drag down. There we go. If you miss the corner, if you're not getting this diagonal arrow, then you're probably just inside here for example, and then you're not scaling you're just moving so you want to make sure you've got that double edged arrow. I'm gonna drag this down so he's gonna be like peeking out of the basket. I'm not sure what the proper kitten to basket size ratio is but I'm feeling like this is gonna be fine. Something maybe like that, he's so cute. Alright, when I'm happy with it, I'll go ahead and hit this check mark button. Now obviously this looks weird 'cause he's like floating in midair and all that. Well that's because I'm gonna put him in the basket, and we're gonna make it look like he's actually in the basket not just floating in space here. And the way that we're gonna do that is similar to how we masked the dog so that the dog only appeared within this frame. We are going to mask the cat so that he, or she I suppose, only appears coming out from the basket. So, when we did the dog, we dragged the dog in, then we selected the area that we wanted to keep the dog, then we clicked to make the mask. In the case of the cat, I'm gonna do it differently 'cause I'm not going to bother selecting the basket and then trying to apply that to a mask. Instead I'm just gonna add a mask by clicking over here and the mask is blank so nothing happened. It's just a blank mask. But now I'm just gonna freehand with my paint brush tool and I'm just gonna paint the mask manually where I want it. In order to see what I'm doing I'm gonna temporarily reduce the opacity of the cat layer. So basically, I want to be able to see where the edge of the basket is behind the cat here and I can't do that if the cat is here. So I'm gonna make him see-through by just lowering the opacity. So with that cat layer selected in the layers panel I've lowered the opacity and now I can see through the cat so I can see what I'm doing. So I've got this selected. I'm gonna get my brush tool over here. I want to paint with black. Because just like we saw down here, black on the layers mask, black is what's going to do the blocking, to do the hiding of that layer. So if I want to hide the cat here, I need to paint with black. So I'm gonna click this little double-headed arrow to flip- flop my colors so I've got black on top and I want my brush to be soft. Excuse me, hard, relatively hard. If my brush is super soft then the cat and the basket will look like they have a fuzzy edge and that will look weird. So in my brush settings down here, I'm gonna take the hardness slider and drag that, I'm not gonna make it totally 100% hard, I might make it like 95%, 90% - 95%, somewhere in there, and then I'll close this. Just like we did with the quick selection brush we can change the size using our left and right brackets. So now I'm just gonna go ahead and paint this away. So I'm just being really careful. When I get up to the top of this basket, it's got this little blanket hanging over it. And so I'm gonna make my brush a little smaller. And I'm just painting and oops, let's say I make a mistake like that. That's okay, I'll keep going. Paint this all in, scribble, scribble, scribble. And I might have some down here that I need to get. So I think I got all of that. Now to fix this little area where I painted away too much cat, all I have to do is flip flop my paint. So I've been painting with black now I'm gonna flip-flop this and paint with white and that allows me to basically bring the cat back. Now why do we do this, why do we bother with this mask instead of just what you might have done previously before you knew of this mask, before you took this class? You might have reached for, let's say the eraser tool and erased this cat and that would work. I mean, the end result would be the same. This part of the cat is removed and now the cat appears to be in the basket. The difference though is with the flexibility. And when we're working in Photoshop one of the most important things is to maintain flexibility so we can edit things later. Because if you've worked in the creative field for even two seconds it seems, you know that things change. And you thought you were gonna do one thing and then something happened and now we're gonna do this instead. So it's important to maintain as much of that flexibility as possible, and if we used the eraser tool and just erased the cat, the cat would be gone. So even next week or something, if we find out we need to put the cat somewhere else. We'd have to start over with the cat. Reselect the cat, bring the cat back into the document all over again. But by using a layer mask, we can hide or show parts of the cat or any layer, and it's gonna be totally editable and very flexible and we can just tweak it as we need to. So, once we're happy with this we will go ahead back to the layers panel and drag that back up to 100%. So now we can see the cat and look at that he is in the basket. You know what and I'm looking at this and I'm thinking I don't like this part. So I'm gonna fix it with a smaller brush and black paint, and just kind of... I don't like this edge right here. So we'll clean that up, that looks better. There we go, now I'm feeling it. And incidentally, just another way to help you understand how this works and sort of just see really what's happening behind the scenes, if we want to view this mask by itself. In other words, instead of viewing the image over here and the mask here, I can just view them as one over here. I'm gonna hold down Alt or Option and click on the mask and now we can see what's happening. So even though we've been painting with our mouse physically on top of the photo. What we're really doing is painting this mask thing, that's sort of living over here in our layers panel. So I'm actually laying down black paint but instead of painting black on our photo it's just landing over here in this mask. So that is what's allowing us to hide the cat. So to get back to our regular view. I'm going to press Alt or Option and click one more time over there. We have two more things that we're going to do to really finish of this photo with this cat. Because he looks good, he looks like he's really in the basket, except for one detail. There should be a little shadow on him, ever so slight, from the fact that he's in this basket. So we're gonna do another layer from scratch, because there's no button that just gonna, I'm mean I guess we can put an inner shadow on him, I mean I guess we can do that. But I was planning to show you a different way. So you can try that at home if you're following along. Just do like what we did here, and create an inner shadow, and can try applying it to the cat. But the problem is that you're gonna have that shadow all the way around him a little. So it's probably not going to work out too well, which is why I'm gonna show you another technique. So I want to click this new layer button right here to add another blank layer. I'm gonna grab my brush tool and I want black paint. So, right now I don't have black and white paint. When I'm on a layer mask you'll notice your colors, no matter what they were when you're on a layer mask, they'll always switch to black and white. But now that I'm just on Layer Four, I'm back to whatever colors I had and they are not black and white. And I want black, so I'm just gonna click this little icon right here. This is a shortcut button that gives you your default colors so no matter what colors you have, if you click right here, it will pull up your black and white defaults. So with black and my brush I'm going to come into the brush settings right here, and I'm gonna reduce the hardness. So we'll make the brush all the way soft, and I'm gonna make it bigger, and I'm just gonna paint, this is so rudimentary, but I'm just gonna paint right along the edge of the cat here. So basically where I want this shadow to be, and I'm not staying in the lines. I'm not even trying. I don't even care. He looks like he has on a black scarf now or something. He's got on this fuzzy black scarf which is going to become the shadow. But I only want the shadow to appear where the cat is. I don't want it overhanging on the basket. I don't want it floating off the cat's shoulders over here. I just want it on the cat. So to make the shadow stick just to the cat, we're going to take advantage of something called a clipping mask or clipping group. I'm just gonna make sure in my layers panel, in order for this to work, that I have my shadow layer here. Let me rename it, we'll call it cat shadow. This is our cat in case it's hard to see at home. We'll just do all of these. Our dog, and this is our wall print. So I want to make sure my cat shadow layer is directly on top of, in the layers panel anyway, directly on top of my cat layer. Then all I have to do is hold down Alt or Option on my keyboard, and when I do that and I hover my cursor in-between those two layers, I get this funny little icon, and if I click when I see that icon. It will clip this shadow to the cat. Now obviously it still looks weird. Don't panic, we'll fix it. So it still looks weird, but it is now clipped to the cat, so at least it's not floating in space anymore and it's not overhanging the basket. It's clipped to the cat. So to complete this realism, we need to for one thing, reduce that shadow 'cause it's way to intense. So in the layers panel up here where it says opacity, I'm gonna click and drag that down. And I'm also gonna move it down, so I'm gonna grab the move tool and just physically move it down. And you know what, I don't think my brush was soft enough, or it wasn't large enough. So what I want to do is actually soften this even more, and the way that I'm gonna do that is with a blur filter. So I'll come up to the filter menu, and if I come down to blur, you'll notice there are so many ways to blur something. It's kind of mind boggling. But what I'm looking for is just a regular, generic blur, and this gaussian blur allows me to do just that. So gaussian blur, I'll click on that. And I can adjust the radius, which basically says how blurry do I want this blur to be. Something like maybe nine or even ten pixels, I think is plenty. I'll click okay and now I can adjust that, and if we turn that layer on and off we can see the difference that it makes. So it really does add some dimension, so it looks like he's actually in that basket. Last but not least, when I look at this picture, I think that cat looks like he drank some neon kool-aid or something. He's a little hyper-saturated for this image. So we're going to correct that. In the layers panel I want to make sure the cat layer is active, 'cause that's the one I want to affect, and I'm gonna come up to the enhance menu. We'll choose adjust color, adjust hue saturation, and now I'm gonna click the saturation slider and just drag it to the left, 'till about something like that. And now he looks so much more like part of the scene and less like a transplant.