From the course: Photoshop 2023 Essential Training

Layer mask essentials

- [Instructor] Layer masks are a key feature of Photoshop that allow us to non-destructively hide and show selected portions of our image. In a previous chapter, we use the Frame tool, which was great for simple rectangles and ovals, but layer masks are much, much more powerful. So, we can see that this document already has five layers, there's a sky layer, a water layer, there's a bottle, a giraffe and a texture. And we're going to make a composite that puts the giraffe in the bottle and it's going to be floating in the water. So, I need to add a mask to this water layer. In a previous video, I changed the settings for this panel by going to the Panel Options and then, I changed the thumbnail contents to Layer Bounds, but it might be more useful to set it back to Entire Document at this point. All right, so now we can see that the water doesn't take up the entire document, I want to add a layer mask to the water and there's a variety of ways that I can do this, the easiest is probably to use the Layer menu. And then choose Layer Mask, and I have the option to Reveal All or Hide All. If I choose Reveal All, that's going to add a white mask and Hide All will add a black mask. I'll choose Reveal All, we can see the white mask in the Layers panel and where the mask is white, we can see the contents of the layer. So, as long as you can remember that if the mask is white, you can see the contents of the layer and if the mask is black, it's going to hide the contents of the layer, then you can master masking in Photoshop. I'm going to tap the B key, which will select the Brush tool and then I'll right-click in order to reset the Brush tool. I'll use the heads-up display, which is the option and Ctrl key, and then drag to the right to quickly get a very large brush. Now, if I want to hide a portion of this water layer, all I need to do is switch my foreground and background colors, so that I'm painting with black. I'll click the double-headed arrow, or you could tap the X key to do that. Now that I'm painting with black, anywhere that I paint with black in the mask, I'm going to hide this water layer. If we ever want to see the mask, I can hold down the Option key on the Mac or the Alt key on Windows and click in the mask. In order to view the layer again, we can click the I icon. Now, if I continue painting and I decide that I have painted too much, and instead of hiding an area, I want to reveal it. All I need to do is exchange my foreground and background colors, again, I can do that with a double-headed arrow or by tapping the X key and then I can paint with white, and wherever I paint with white, it's going to show the contents on that layer. All right, another way that we can transition or slowly fade out the contents of a layer is by using a gradient in a layer mask. So, I'll tap the G key and that's going to select the Gradient tool, and then I'll right click in order to reset it. I'm going to use the basic linear gradient here that goes from my foreground to my background color, so we can see that it's going from white to black. If we need to exchange our foreground and background color, we can tap the X key, so that it goes from black to white. If we look at the image and in fact I'll hold down the Shift key, and click on the mask to temporarily toggle it off. We notice that I want to slowly fade, starting maybe at the horizon here towards the top of the image. So, if I want to hide the the top portion of the water image, this area should end up being black. So, if black is the start of my gradient, I'll want to start my gradient near the top of the water image and drag down towards the water. All right, I'll click on the X here in order to be able to see the layer mask and then starting right about here, I'll click and drag down towards the water. In the layer mask, we can see that the mask at the top is black, so it's hiding all that information and then it slowly reveals the information until it's white, and we can see all of the information. We can draw this gradient as many times as we want to, if we draw it backwards, meaning that I were to start at the horizon and drag up. We can always invert the mask by choosing Image and then Adjustments, and Invert, or we can use the keyboard shortcut, Command I on Mac, Ctrl I on Windows. Or we can even use the Properties panel with the mask targeted, we can scroll down and choose the Invert option. We can even separate the mask from the content of the layer, we do this by clicking on the icon in-between them. We can see that the mask is now targeted because it's got the highlight around it, but I could also click on the thumbnail for the image in order to select it. If I choose the Move tool, if I reposition the image, we can see that it's repositioning without changing the mask. If I click on the mask, now I can adjust the mask without adjusting the image. All right, let's go ahead and relink those by clicking in-between the two thumbnails, and just one more note, I'll go back to the gradient for a moment. If you started the Gradient tool too high and then you clicked, and dragged down, you'll probably see a line here because that's the top of the content on this layer. So, you just need to make sure that your gradient is going to start below the contents of that layer and then drag down to slowly fade it. All right, let's move onto the bottle layer, I'm going to target it in the Layers panel and also make it visible. There are a number of different ways that we can select items in Photoshop. Probably for this bottle, the easiest way is to choose the Select menu and then choose Subject. Photoshop will automatically select the bottle, it selects a little bit more than the bottle, but that's okay, we can work on that in a moment. When you have a selection and you want to add a layer mask, when you use the Layer menu, you can go to Layer Mask and you'll notice that there are two additional options. We can Reveal the selection or Hide the selection. In this case, I want to Reveal the selection, which is the bottle and hide the background. I'll tap the V key to select the Move tool, then I'm just going to reposition this over to the right a little bit. I also want to rotate it, so I'll choose Edit and then Transform, and then Rotate. The bounding box looks really large and that's because it's actually around the entire mask. I'll click and drag in order to rotate this maybe about -15° or so, reposition it a little bit more and then, apply that transformation. Now, I need to edit this portion of the mask because I don't want to see the bottom of the bottle, I want to make it look like it's going into the water. Certainly, I could paint with my brush in this mask, but I can also put the bottle layer into a group and then add a layer mask to the group. And the benefit there is that I wouldn't be touching or ruining this bottle, if the next mask that I create maybe isn't what I want it to be. So, to put this single layer into a group, I can just drag it down into the Folder icon, now it's in it's own group and we can add a layer mask to the group. So far, we've gone to the Layer menu and added our layer masks, but we can also just click on the Mask icon at the bottom of the Layers panel. Because I don't have a selection, Photoshop is simply going to add a white mask, which will reveal the contents of the layer group. Let me just double-click on the Tab for the Properties panel in order to hide it, so we can see our layers a little bit better. I'll tap the B key to select the Brush tool and I'll use the left bracket key to get a little bit smaller of a brush. And I want to hide this area, so I'm going to make sure that I'm painting with black. I'll just paint over the area that I don't want to see and if I paint too far, I can always tap the X key, that will give me white as my foreground color and I could paint back in an area. I'm actually going to get a little bit smaller of a brush using the left bracket key, tap the X key again so that I'm painting with black. And just paint to hide those marbles that are in the bottle. All right, let's add our giraffe. I'll make that layer visible and I'll also target it in the Layers panel, and to select the giraffe, I'll choose Select and Subject again. Now that I have a selection in my image, Photoshop is smart enough to know that if I click the Add Layer Mask at the bottom of the Layers panel, it should take that selection and turn it into a mask. Well, we can see that it missed a little area right here, so again, I'm going to tap the B key to select the Brush and in order to reveal this information here, I'll tap the X key so that I'm painting with white and then paint over this area so that we can see that portion of the giraffe. All right, I need to make the giraffe a little bit smaller, so I'll choose the Edit menu and then Transform, and then Scale. I'll scale down the giraffe, position my cursor within the free-transform handles, scale it down maybe a little bit more, so that it fits in the bottle. All right, when I'm happy with that, I'll click the check mark in order to apply that, but we can see that there's a hard edge at the bottom of the giraffe. I'll go ahead and zoom in, just to make sure that we can see that. If I want the giraffe to fade into the water just like the bottle does, all I need to do is add the giraffe to Group 1, because the mask on Group 1 is going to mask everything within it. So, on the Layers panel, I'll drag and drop the giraffe into Group 1 and we can see that it's now masked. If I tap the V key to select the Move tool, we can even reposition the giraffe further down in the bottle and it's going to continue to be masked because it's in that group and the group has it's own layer mask. Excellent, let's zoom out using Command 0, so we can see the entire image. I think I need to add a little bit of a drop shadow and darken down this area in the foreground. In order to add a new layer above the group, I'm actually going to close the contents of the group, then with the group targeted, when I add a new layer, it will add it above the group. I'll tap the B key again to select the Brush tool, my foreground is set to black, so we can just paint right over this area to create our shadow. Of course, it's far too dark, so on the Layers panel, I'm going to change the opacity of that layer down to somewhere around 10%. Finally, I'm going to target the texture layer and make it visible, and I just want to add a texture overlay on top of the entire image. And I'll do this by changing the blend mode to Soft Light. I think the texture's a little bit strong, so we can use the Opacity slider to just dial back the texture over the entire image. I think one of the most difficult things when you're learning layer masks in Photoshop is just remembering to target the mask when you want to work on the mask. And targeting the layer when you want to work on a layer. But if you remember that where the mask is white, you can see the information on the layer and where the mask is black, the information is hidden, then you'll have no trouble at all masking in Photoshop.

Contents