Sub topic 13
Layer Masks, Vector Masks and Clipping Masks Compared
Photoshop offers three tools that limit where a layer is visible: the layer mask, the vector mask and the clipping mask. They overlap in what they can do, but they store their information differently and they fail in different ways. This chapter explains the working model of each one, shows how to combine them, and gives criteria for picking one.
This chapter assumes you can already create and paint a layer mask, use the Layers and Properties panels, and draw a basic path with the Pen or a shape tool. It builds on the earlier chapters about the grayscale principle and about managing masks.
The core difference: what is stored
Each mask type answers the question "where is this layer visible?" with a different kind of data.
- A layer mask is a pixel-based grayscale image attached to one layer. Every pixel has a value from 0 (black, hidden) to 255 (white, visible), so partial transparency is possible.
- A vector mask is a path attached to one layer. The path has an inside and an outside. Everything inside is visible and everything outside is hidden. There are no gray levels, so the edge is always crisp unless you add feathering in the Properties panel.
- A clipping mask is not an image or a path. It is a relationship between layers. A layer is clipped to the layer below it, and it shows only where the lower layer has pixels, scaled by the lower layer's opacity.
| Property | Layer mask | Vector mask | Clipping mask |
|---|---|---|---|
| Stored as | Grayscale pixels | Path | Relationship to the layer below |
| Partial transparency | Yes, any gray level | Only through feathering | Yes, follows the base layer's transparency |
| Resolution dependent | Yes | No | Depends on the base layer |
| Edit with | Brush, gradient, filters, selections | Pen, Path Selection, Direct Selection | Edit the base layer |
| Affects how many layers | One layer | One layer | Many layers, stacked above one base |
| Typical use | Photo blending, retouching, soft edges | Logos, UI shapes, sharp geometric cutouts | Texture or photo inside a shape or text |
Layer masks: the general-purpose choice
A layer mask is the most flexible of the three, because anything you can do to a grayscale image works on it. You can paint with soft brushes, fill gradients, apply Gaussian Blur, run Levels or Curves on it, or paste a channel into it. That flexibility is why the other chapters use layer masks for portraits, composites and local adjustments.
The cost is resolution. The mask has a fixed pixel size, so if you scale a layer mask up by a large amount, the edge softens and shows stair-steps. Scaling down is usually harmless. Smart Objects reduce this risk because Photoshop resamples from the original data rather than from an already resampled layer, but a mask applied directly to a Smart Object layer still has its own pixel grid.
Use a layer mask when you need soft transitions, when the boundary is organic (hair, clouds, skin), or when you want to refine the visibility by painting.
Vector masks: crisp edges that stay sharp
A vector mask is created from a path, so it scales without losing quality. You can enlarge a layer with a vector mask to any size and the edge stays clean. This makes it a good fit for logos, icons, badges, device mockups and any shape defined by straight lines and smooth curves.
To create one:
- Select the layer. It cannot be the Background layer, so convert it first by double-clicking it.
- Draw a path with the Pen tool or a shape tool set to Path mode.
- Choose Layer > Vector Mask > Current Path. Alternatively, with no path active, choose Layer > Vector Mask > Reveal All or Hide All and then draw.
The vector mask thumbnail appears in the Layers panel next to the layer. Edit it by selecting the thumbnail and using the Direct Selection tool to move anchor points.
Vector masks have limits:
- You cannot paint on one. If you select a vector mask thumbnail and use the Brush tool, Photoshop does not paint on the path. It paints on the layer or does nothing useful, depending on what is selected.
- Edges are binary. Soft edges require the Feather slider in the Properties panel, which applies a uniform blur to the whole path boundary.
- Adjustment layers do not have vector masks as their main mask. They use a layer mask, though a shape layer does have a vector mask built in.
Because a shape layer is a fill layer with a vector mask, you already use vector masks whenever you draw a shape in Shape mode. Clicking the shape's mask thumbnail shows the path.
Converting between layer and vector masks
You can add both masks to one layer. The layer then shows a layer mask thumbnail and a vector mask thumbnail, and the final visibility is the combination of both. A pixel is visible only where both masks allow it.
To turn a vector mask into a layer mask, choose Layer > Rasterize > Vector Mask. This is one-way. The path is converted to pixels at the current document resolution, so you lose the ability to edit anchor points. Keep a copy of the layer, or duplicate the path into the Paths panel first, if you may need the geometry later.
Going the other way is manual. Make a selection from the layer mask (Ctrl or Cmd click the thumbnail), then use Make Work Path in the Paths panel menu. The result is an approximation, and the gray values are lost.
Clipping masks: one shape, many layers
A clipping mask makes a layer, or a stack of layers, appear only within the visible pixels of the layer beneath. The base layer provides the shape. The layers clipped to it provide the content.
To clip a layer, hold Alt (Windows) or Option (Mac) and hover between the two layers in the Layers panel until the cursor changes to a small square with a down arrow, then click. You can also select the upper layer and press Ctrl+Alt+G (Windows) or Cmd+Option+G (Mac). The clipped layer shows an indented thumbnail with an arrow, and the base layer's name is underlined.
The main advantage over the other two is that one base can control many layers at once. For example, a text layer can serve as the base, with a photo, a texture and a Curves adjustment layer all clipped to it. Changing the text changes the shape of everything above it.
Clipping also works with adjustment layers. A Hue/Saturation layer clipped to a single layer affects only that layer rather than everything below it. This is the standard way to apply a local color change to one layer in a stack.
How clipping interacts with blend modes
Clipping affects how blend modes behave, and this is a frequent source of confusion. By default, a clipped group is treated as a unit whose blend behavior depends on the base layer. In Layer Style > Advanced Blending, the option Blend Clipped Layers as Group controls this. If it is on (the default), blend modes on clipped layers affect only the clipped stack. If you turn it off, the blend modes of the clipped layers interact with everything below the base. When a clipped Overlay or Multiply layer looks wrong, check this option first.
Clipped layers can also have their own layer masks. This is the usual way to combine the two ideas: the base layer sets the overall boundary, and each layer's mask refines where its content appears inside that boundary.
Combining the three
The three types stack in a predictable order of evaluation, and you can use that.
- The layer's own pixels are the source.
- The layer mask and vector mask on that layer are applied. Both must allow a pixel for it to appear.
- The layer's opacity and blend mode apply.
- If the layer is clipped, the result is multiplied by the base layer's transparency.
A practical example is a product mockup. A flat screenshot is placed over a phone image. A vector mask on the screenshot cuts the rounded corners with crisp, scalable edges. A layer mask on the same screenshot paints a soft glare fade across one corner. A Curves adjustment layer is clipped to the screenshot so that darkening affects only the screen and not the phone body.
Failure modes and gotchas
- Clipping base moved or hidden. If you hide the base layer, every clipped layer disappears. If you lower the base layer's Fill, the clipped layers fade with it. Lowering the base layer's Opacity does the same thing and also affects blending.
- Wrong layer selected. Painting on a mask only works when the mask thumbnail has the white selection bracket. When the layer thumbnail is selected, you paint on the pixels instead. This applies to vector masks too, where the bracket indicates which mask you are editing.
- Linked masks move together. Layer masks and vector masks are linked to their layer by default. Moving the layer with the Move tool moves the mask. Unlink them to reposition one without the other.
- Rasterized shapes. Rasterizing a shape layer converts its vector mask to pixels. After that, the shape no longer scales cleanly.
- Both masks on one layer. If a layer seems to be missing content, check for a second mask. A vector mask you forgot about can hide areas that the layer mask reveals.
- Group masks. A layer mask on a group affects all the layers inside the group. A clipping mask on layers inside a group is limited to that group unless the group's blend mode is set to something other than Pass Through.
Decision criteria
Use these questions in order.
- Do you need soft or painted transitions? Use a layer mask.
- Do you need a sharp geometric edge that must stay sharp when resized? Use a vector mask.
- Do you want the shape of one layer to control several layers, or to keep an adjustment local to one layer? Use a clipping mask.
- Do you need a shape with a soft edge that also scales well? Use a vector mask with Feather in the Properties panel. If you need variable softness, switch to a layer mask.
- Will the shape need to change later, such as editable text acting as the boundary? Use a clipping mask with the text layer as the base.
Exercises
Exercise
You place a company logo on a banner. The banner will be exported at three sizes, including one four times larger than the working file. The logo needs rounded corners with perfectly crisp edges. Which mask type should you use, and why?
Show answer
Use a vector mask. It is stored as a path, so the corners stay crisp at any export size. A layer mask is pixel-based and would show soft or stair-stepped edges when enlarged four times.
Exercise
A Curves adjustment layer sits above a photo layer and a texture layer, and it darkens both. You want it to darken only the texture layer. What do you do, and what visible change appears in the Layers panel?
Show answer
Clip the Curves layer to the texture layer, by Alt/Option-clicking between the two layers or pressing Ctrl+Alt+G (Cmd+Option+G on Mac) with the Curves layer selected. The Curves layer then shows an indented thumbnail with a down arrow, and the texture layer's name is underlined. The photo layer is no longer affected.
Exercise
A layer has both a layer mask and a vector mask. A region is white in the layer mask but the layer content is still hidden there. What is the likely cause?
Show answer
The vector mask hides that region. Visibility is the combination of both masks, so a pixel appears only where both allow it. Select the vector mask thumbnail and check the path with the Direct Selection tool.