Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Layer masking is one of the most useful of the layer related features in Photoshop. Layer masks give you the flexibility to edit an image nondestructively. As I will show you here, you can hide parts of an image without permanently deleting or erasing those parts. So you can always get those bits back if and when you need them. In this case I'd like to add a layer mask to the whipped cream layer here. Let me show you what's on that layer. I'm going to click its eye icon on and off so that you can see that what's there is this big glob of whipped cream part of which is spilling over the edge of the cup.
I'd like to see how this looks without the spilling over portion, so that the whipped cream looks more like it's sitting inside the cup. But since I'm not sure how that's going to work out, I want to avoid erasing parts of the whipped cream because maybe I want to get those parts back again. I'm going to add a layer mask to this layer by going to the layer mask icon at the bottom of the Layers panel and clicking. When the layer mask comes in, it's filled with white and that means it's not going to have any visible effect on the image here because the general rule is that on a layer mask, white reveals and black hides.
What does that mean? It means that when a mask is white, it is going to show or reveal everything that's on the layer to which its attached, which in this case is this whipped cream layer. But where there is black paint on a mask, that paint will hide the content of the layer to which the mask is attached. So the next step is to add some black paint to this mask. But before I do, I want to tell you one of the things that sometimes trips people up. By mistake they may end up selecting the content thumbnail on a masked layer. So, for example, if I clicked here on this icon of the whipped cream and then I came and painted on the image, I would actually be painting directly on the pixels of the image, and I would be harming them and I certainly wouldn't be getting the mask effect that I wanted.
Let me show you what that would look like. I am going to get my Paintbrush and with some black paint I am just going to paint and I am just painting right over the image. Bad idea. So I am going to press Command+Z on my Mac or Ctrl+Z on a PC to undo that and I'm going to make sure that I have the mask thumbnail selected by going to a panel that's new in Photoshop CS4, the Masks panel. Here in the Masks panel, if I click on this representation of a layer mask, I am automatically switched over to the mask portion of this layer and now I can begin painting.
I am going to zoom in a bit to paint here by pressing the Command key and the Plus key on my Mac, that's Ctrl+Plus on a PC, and I am just going to start painting away on top of the spilled over portion of the whipped cream. It's like magic, isn't it? And there it goes. Now let me show you the mask that I just created by going back to the whipped cream layer and holding the Option key on the Mac or the Alt key on a PC and clicking on that mask and here you can see right in the document window where I've added that black paint that hides the content of the whipped cream layer.
Where there is white paint, you can see the whipped cream layer and in between at the edges where my soft edged brush laid down some grey paint, the layer content will be partially hidden and partially showing, giving a nice transition. So you just don't see a straight line between the mask area and the non-mask area. I am going to hold the Option or Alt key again, and click on that layer mask to go back to my regular view. Let's see what would happen if I went too far when I was painting with black and by mistake I went in and cut off some of the image content that I meant to keep.
One of the advantages of using a layer mask is that you can alter it so easily. To get that content back, all I have to do is switch my foreground and background colors here in the toolbox. I will just press the X key on my keyboard to do that. Now that I have white paint on my brush, I can come in and paint on the layer mask, revealing the content on the associated layer again. If I went too far again in the other direction, I will press X on my keyboard to get black paint and I will fix that little bit. I am going to go back to 100% view now by pressing the Command+Minus keys on the Mac, that's Ctrl+Minus on the PC, and that's the result of my layer masking.
If I press the Shift key and click on the layer mask icon, you can see how things were without a mask and how they are now with the mask. So as you can see, layer masks really give you lots of flexibility when you're editing an image. They are a cornerstone of what's going to be called nondestructive editing, which is a kind of editing that I strongly recommend you do, where you try to avoid deleting or erasing portions of your image allowing yourself to bring them back if necessary.
Get unlimited access to all courses for just $25/month.Become a member
180 Video lessons · 76165 Viewers
64 Video lessons · 94555 Viewers
86 Video lessons · 62039 Viewers
103 Video lessons · 31405 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.