Pin Me

Creating and Editing Vector and Layer Masks in Photoshop

written by: Joli Ballew•edited by: Daniel P. McGoldrick•updated: 2/8/2010

Masks control the parts of an image that will be hidden and the parts that will be revealed. You can edit a mask, apply effects, and use the mask to hide entire layers. Masks let you see what your potential changes will look like before you actually apply the change the original image.

  • slide 1 of 5

    Masks - An Introduction

    There are two types of masks—layer masks and vector masks. Both control which parts of an image or layer will be hidden or revealed, and the masks can have special effects and styles applied to them. Once you’re sure of the effects that you want to add, you can then apply them. This allows you to see what the changes will look like before actually changing any pixels in the image itself. Layer masks are created with the painting and selection tools; vector masks are created with the Pen and Shape tools.

    In the Layers palette, the masks that you create are shown as thumbnails inside the appropriate layer. A vector mask’s thumbnail image is the path that you’ve created using the Pen tool. A layer mask’s thumbnail is a rectangle with a black background that represents the grayscale channel created when you add the layer mask. You can create a vector mask that shows or hides an entire layer and shows the contents of a shape, or you can create an inverted mask, where the entire page is colored and the shape is knocked out of the image.

    Note: When you use the Pen tool and create a new shape layer, the new path appears automatically as a vector mask in the Paths palette.

  • slide 2 of 5

    Using Vector Masks

    Let’s look at the different ways that a vector mask can be used, created, and/or edited:

    · Add a vector mask that shows or hides an entire layer

    · Add a vector mask that shows only the content inside the shape that has been created by a path

    · Edit a vector mask that is already created

    · Remove, disable, or enable a vector mask

    · Convert a vector mask to a layer mask (rasterize the vector data)


    · To add a vector mask that hides or shows an entire layer, select the layer from the Layer palette that you want to add the vector mask to. Choose Layer>Add Vector Mask>Hide All or Reveal All. (If these are grayed out, make a copy of the layer first.)

    · To add a vector mask that shows the contents of a shape, select the layer to apply the mask to in the Layers palette, select the path from the Paths palette, and choose Layer>Add Vector Mask>Current Path.

    · To edit a vector mask, click the vector mask thumbnail in either the Layer or Paths palettes. Edit the mask using the Shape or Pen tools.

    · To delete a vector mask, select it and choose Layer>Delete Vector Mask.

    · To enable or disable a vector mask, select it and then choose Layer>Enable Vector Mask or Layer>Disable Vector Mask.

    · To convert a vector mask to a layer mask, choose Layer>Rasterize>Vector Mask.

  • slide 3 of 5

    Using Layer Masks

    A layer mask is represented in the Layers palette as a rectangle with a black background and the shape of the selection in white or gray. Layer masks can be used to hide or reveal entire layers or selections on layers. The black part of the layer mask (in the mask’s thumbnail in the Layers palette) is hidden.

    To create a Layer mask that hides or reveals an entire layer:

    1. Make sure no selection is currently active, and select the layer to mask in the Layers palette.

    2. Choose Layer>Add Layer Mask>Reveal All to reveal the entire layer or Layer>Add Layer Mask>Hide All to hide the entire layer.

    To create a layer mask that hides or reveals a selection only:

    3. Select the layer you add the mask to in the Layers palette.

    4. Make the selection for the mask using a selection tool.

    5. Choose Layer>Add Layer Mask and either Reveal Selection or Hide Selection. Only the selection will be hidden or shown, and this selection can be edited independently of the other parts of the image.

    To work with layer masks that have been created:

    6. Select the layer in the Layers palette that contains the mask you wish to edit. Click once on the layer mask thumbnail to make it active.

    7. Select an editing or painting tool.

    8. Paint with white to subtract from the image, black to add to it, and gray to partially hide the layer. You can switch to using the foreground and background colors in the toolbox and revert to the original black and white there too.

    9. When complete, you can either apply or discard the mask by holding down the Shift key and clicking once on the mask in the Layers palette. A red X indicates that the mask is discarded.

    Using layer masks allows you to separate and control specific parts of an image by producing a stencil of a selection. This stencil can be altered but the area around it is protected from change. These selections can then be saved for later use by saving the mask in an alpha channel. This is briefly detailed next.

  • slide 4 of 5

    A Little about Alpha Channels

    You can save a selection as an alpha channel mask. Saving the selection as a mask will allow you to keep your work for later use. Alpha channels are storage areas for data, like selections. When selections are saved as a mask, this channel is created automatically; to save a selection manually, open the Channels palette and click on the save selection as channel icon.

    You can open the Channels palette using Window>Channels. With the selection active in the image, you can save selection as channel icon. A new channel appears called Alpha 1, which can be renamed. These alpha channels can be deleted, added, and edited using the painting and editing tools, and opacity and other mask options can be set. Alpha channels can be converted to spot color channels for spot color separations.

    Once the mask has been saved as a channel, you can paint with white to erase part of the mask, black to add to the mask, or gray to apply opacity to the mask.

  • slide 5 of 5

    For More Information

    This information was excerpted from my book, Photoshop 7.0 for Screen Printers. A new version is available for CS3 at Use the code ps0365 for 35% off this book and any others at the site.