In this tutorial, we will learn how to use clipping masks to hide individual unwanted areas of a layer from view. Clipping masks are similar to layer masks (layer masks) of Photoshop in that both types of masks allow us to display and hide separate parts of the layer, but the principle of clipping masks is different from layer masks.
When working with layer masks, we need to first add a mask to the layer and then paint over or fill the areas on the mask with black (to hide the area), white (to show the area) or gray (to hide the area partially). In contrast to layer masks, clipping masks simply use the contents and transparency of the layer to determine which areas of the overlying layer are left visible.
At first glance, this may seem a bit confusing, but as we will soon see, using clipping masks is quite easy. In fact, their use can be much faster and easier than using layer masks!
There are so many possibilities and ways to use clipping masks in Photoshop that it’s simply impossible to tell about all of them in one lesson. Therefore, in this lesson we will look at the basics of working with clipping masks, and later, after studying the material, you will be able to experiment with clipping masks and, perhaps, come up with unusual ways of using them.
In this tutorial, I’ll work in a version of Photoshop CS6, but other recent versions of the program are also suitable for our work.
In order to understand how clipping masks work, we first need to make sure that we clearly understand the difference between the transparent areas on the layer and the areas with actual content. For this we will use the help of my little friend, who also tries to understand in his own way what this whole procedure is for. (comment of the lane.: the author of the article plays the word clipping) (dog image taken from photobank Shutterstock):
If we look at the layers panel, we see that the image of the dog is placed on the Background layer:
In order to show how the clipping masks work, I’m going to add a new empty layer under the image layer. At the moment, the program does not allow us to add other layers under the “Background” layer, and to get around this problem, we will rename the “Background” layer and give it any other name. The easiest way to do this is by holding down the key. Alt (Win) / Option (Mac), double-click the layer name in the layers panel. Photoshop immediately renames the background layer, giving it the name “Layer 0”(Layer 0), which may not be too informative, but quite suitable for our purposes:
Now the background layer has become a regular layer, and we can add a new layer under it. To do this, I will press the key Ctrl (Win) / Command (Mac) and, while holding it down, click on the icon for the new layer at the bottom of the layers panel:
As a rule, the program adds new layers on top of the active layer, but by holding down the key Ctrl (Win) / Command (Mac) when choosing the icon of a new layer, I went for a little trick, as a result of which the program will add a new layer under the active layer, rather than on top of it. Thus, under the image placed on Layer 0, the program added a new layer called “Layer 1” (Layerone):
Let’s take a closer look at our new layer. To do this, I will hide the original image for a while by clicking on the layer visibility icon (eyeball icon) located to the left of the layer image thumbnail in the layers panel:
Hiding the image layer from view, we now see only the newly added layer in the document. By default, new layers are empty, i.e. nothing is on them. They have no content. They may contain a lot of interesting, of course, but not at the moment. When a layer has no content, it is transparent. We can see right through this layer. Photoshop displays transparency on a layer as a repeating grid pattern, as you can see in the image below. When nothing else is on the layer except this grid pattern, it means that the layer is completely empty:
As I mentioned at the beginning of the lesson, clipping masks use the contents and transparency of the layer to determine which areas of the overlying layer are left visible. How does this work? So, any areas on the underlying layer, where there really is an image (no matter what – in the form of pixels, shapes, or text), become visible areas of the upper layer, while transparent areas on the underlying layer become hidden areas on the layer above.
As we just looked at, our new layer has no content at all. It is an empty, transparent layer. Let’s see what happens if we try to use it as a clipping mask for the overlay with the image. In order to do this, I first return the visibility to the image layer by clicking again on the layer visibility icon:
The image reappeared in the document window:
Picturebecomes visible again
Next, I need to make sure that the desired layer is selected on the layers panel. When creating a clipping mask, we select the layer that will be “cropped” by the underlying layer, so in our case, I will click on the image layer (“Layer 0”) to make it active (the selected layer is highlighted in blue). The underlying “Layer 1” in turn will become a clipping mask for the image layer:
To create a clipping mask, we select the Layer item in the menu bar at the top of the screen and go to the Create Clipping Mask section:
If we look at the layers panel again, we see that the image layer (“Layer 0”) has shifted slightly to the right, and a small arrow appeared to the left of the layer thumbnail pointing down to the underlying “Layer 1”. Thus, the program notifies us that the layer is “cut off” by the underlying layer. We have safely turned “Layer 1” into a clipping mask for the overlying “Layer 0”:
However, in reality, all we managed to achieve was to create one of the most uninteresting clipping masks, since “Layer 1” currently has no content. Since it is completely transparent, nothing is reflected in the document window, because Photoshop uses transparent areas of the mask to determine which areas of the overlying layer should be hidden from view. The image on “Layer 0” is now hidden from view entirely:
This result is not interesting to us, so let’s cancel our clipping mask. To do this, again go to the “Layers” menu at the top of the screen and select the Release Clipping Mask:
Now we can see that the image layer is no longer cropped by the underlying layer, since it is no longer shifted to the right on the layers panel:
We returned to the fact that the image again appeared in the document window:
Let’s add some content to our empty layer. I will hide the image layer from view again by clicking on the layer’s visibility icon so that we can see what we are doing, and then I will select an empty layer by clicking on it in the layers panel:
Next, on the toolbar, I will select the Elliptical Marquee Tool by clicking on the Rectangular Marquee Tool tool and holding it until a pop-up menu appears with a list of other tools available in section. From the list that appears, I will select the tool “Oval area”:
After selecting the “Oval region” tool, I click in the center of the document and, while holding the mouse button down, draw a dotted oval contour. It was not important for me to use this particular selection tool. The main thing in this case is to add some content to the layer:
In order for the layer to contain something, I need to fill in an oval contour, so I will go to the “Edit” menu section(Edit)at the top of the screen and choose the command “Run Fill”(Fill):
This action will open the Run Fill command dialog box. In the section “Use” (Use) at the top of the dialog box, I will select the word “Black”(Black), blending mode (Mode) “Normal” should be set at the bottom of the window(Normal) and in the section “Opacity” (Opacity) should be 100%. Again, I repeat that we simply add content to the layer. Therefore, there is no particular reason why I chose black as the fill color — just black can be clearly seen in the screenshots:
To exit the dialog box, I click OK, and after this Photoshop program will immediately fill my oval contour with black. And now on the layer I had an area containing the actual image, while the rest of the layer area remained transparent:
The oval dotted outline itself is still visible, therefore, since I don’t need it anymore, I’ll remove it by going to the Selection section (Select) at the top of the screen and selecting the “Unselect all” command(Deselect):
After the content appears on our bottom layer, let’s take a look at the panel
layers again. In the “Layer 1” miniature, you can now see a black oval-shaped area. Notice that if we compare the “Layer 1” thumbnail with the thumbnail of the overlying layer, we will see how part of the image on the top layer is located directly above the black oval, while the rest of the image is located above the transparent areas of “Layer 1”
Let’s see what happens this time when creating a clipping mask. As before, first I will return the visibility to the top layer by clicking on the corresponding icon, and then click on the layer itself to select it and make it active:
I will add a clipping mask, again selecting the Layer item in the menu bar at the top of the screen and going to the Create Clipping Mask section. (Create Clipping Mask):
On the layers panel, we will again see that the top layer is cut off by the underlying layer, since the Layer 0 miniature has shifted to the right. While everything looks the same as last time when creating a mask:
On the layers panel you can again see the created clipping mask.
But if we look at the document itself, we will see that there have been significant changes. While most of the image is again hidden from view, since it is located above the transparent areas of the underlying layer, the part of the image located above the oval content of Layer 1 is now visible to us:
Of course, the result could be improved by placing the image of the dog right in the center of the oval. Fortunately, due to the properties of the clipping masks, moving the image inside them is quite easy. All I need to do is select the Move tool in the toolbar.(MoveTool):
Then, after selecting the Move tool and selecting the layer with the image on the layers panel, I can simply click on the image and move it to the right place inside the clipping mask:
Let’s look at a typical situation for applying a clipping mask. I opened another document containing two photos. The photo frame is shown on the bottom layer (background layer) (the old photo frame is taken from the photobank Shutterstock):
And if I return the visibility to the overlying layer by clicking on the layer visibility icon:
Then we will see a photo that I want to put inside the photo frame (image of a young couple from the photobank Shutterstock):
I will temporarily hide the top layer again by clicking on the corresponding icon:
In order to place an image of a young couple inside the photo frame, using a clipping mask, I first need to select a specific area inside the frame. Since the area inside the frame is filled with solid black, I can easily highlight it with the Magic Wand Tool, which is located on the toolbar. To select this tool, I will click on the Quick Selection Tool icon and hold it until a popup menu appears, where I will select the Magic Wand tool:
After this, I will make the photo frame layer active by clicking on it on the layers panel, and then click the cursor inside the photo frame to quickly select the entire black area:
Next I need to copy the selected area to a separate layer. To do this, I will go to the “Layers” section (Layer) in the menu bar at the top of the screen, select the item “New”(New)and further – “Copy to a new layer” (LayerviaCopy) (or for more convenience, I could just press a key combination Ctrl+J (Win) / Command+J (Mac)):
No changes are visible in the document window, but if we look at the layers panel, we see that the selected area inside the photo frame has been duplicated on a separate layer, which is located above the layer with the original image. Please note that only the area inside the photo frame was copied, it is the content for the new layer, while the other areas of the layer are transparent:
I will return the visibility to the top layer by clicking on the layer visibility icon. Then I will select this layer, making it active so that we can add a clipping mask. Do not forget that we always choose the layer that we want to cut off the underlying layer:
Let’s go ahead and create a clipping mask. This time, instead of selecting “Create Clipping Mask” from the “Layers” section, we will use a faster method that will help us create the mask right within the layers panel.
All we need is to press and hold the key. Alt (Win) / Option (Mac) and at the same time hold the mouse cursor over a horizontal line separating the two layers that we want to join the mask. When the cursor turns into a clipping mask icon, click on the mouse button:
The top layer will immediately become “cut off” by the underlying layer, with the result that on the layers panel the top layer will move to the right:
And now in the document window we see that the image on “Layer 1” is located only inside the area that we selected in the photo frame and copied onto a separate layer. The rest of the image is hidden from view, since the underlying layer, turned into a mask, is transparent in these places:
Thanks to the clipping mask, the image is now placed inside the photo frame.
Earlier we learned that using the Move Tool you can move the image inside the clipping mask. We can use the Free Transform team. (Free transform) for this purpose, as well as using this command, we can resize the image. In my case, I want to make the image of a young couple smaller so that inside the photo frame it looks more natural. Thus, after I make the layer with the image of the pair active, click on it in the layers panel, I will go to the “Edit” menu section at the top of the screen and select “Free Transform” (Free transform):
This action will lead to the appearance of a free transformation frame around the photo with special markers. Notice that when we resize the image inside the clipping mask, the transformation frame appears around the entire original image, including the masked parts, and not just around the areas visible to us. Just click on any corner marker frame and drag it to resize the image as you need. Press and hold Shift as the marker moves, in order to preserve the original proportions of the image and not accidentally disturb the aspect ratio. When you are satisfied with the result, press Enter (Win) / Return (Mac) for final confirmation of the transformation:
To make the image inside the photo frame look even more realistic, you need to add a finishing touch – darken the inner corners of the frame. To do this, we apply a specific layer style to the clipping mask.
I need to add a shadow directly on the layer-clipping mask, so on the layers panel I will click on “Layer 2” to select it:
Having selected a layer-clipping mask, I will click on the layer style icon at the bottom of the layers panel:
Then from the list of layer styles that appears, I will choose the style “Inner Glow“ (InnerGlow):
This action will open the layer style dialog box, where the “Inner Glow” options are located in the middle column. First, I need to change the color of the glow (as I really need a shadow effect, not a glow), so I’ll click on the color swatch icon:
As a result of my click opens a palette of colors. In it, I will select black and then click OK to close the palette:
Returning to the layer style dialog box, I will change the blending mode (BlendMode) effect from “Screen” (Screen) to “Multiplication”(Multiply)and then reduce the opacity (Opacity) up to 25%. I will also increase the size (Size)Glow (shadow) up to 10 pixels:
Then I click OK to exit the dialog box, and that’s it – we’ve finished! If we look at the layers panel for the last time, we will see that the newly created layer “Inner Glow” is added to the layer-clipping mask (Layer 2):
Below is the final result, which we got due to the convenience and ease of applying clipping masks:
And here we are done! We have reviewed the basics of working with clipping masks in Photoshop! Study our lesson “How to Insert an Image into Text” to get to know another way to apply a clipping mask. Or visit our Photoshop Essentials section for more useful program skills!