Making Masks

Before we can start working with masks, we need to define what they are, how they relate to selection and how they can be created.

WHAT IS A MASK?
A mask is similar to a stencil or masking tape that is used to "show", "hide" or "protect" paint.  We have already covered several types of masks indirectly while talking about selections since they are related to each another:

  1. Quick Mask – a "temporary" mask that allow you to "paint" a selection.
    TIP: It is helpful to think of a Quick Mask as a black and white image.  Hence, you can FILL, PAINT or apply FILTER to it.
  2. Alpha Channel – a "permanent" mask that you create that can store a selection as a grayscale image.
  3. Type Mask – a "text" mask that create an Quick Mask automatically that can then be converted to a selection.

In addition to these, there are also other types of mask:

  1. Layer Mask – similar to an alpha channel, but attach to a "layer" and is used to hide (not delete) portion of an image and is resolution dependent. It uses "PIXELS" (a selection) to create mask
  2. Vector Mask – similar to a layer mask but made of "VECTORS" instead of "pixels" and is resolution independent. It uses "PATHS" to create mask.
  3. Clipping Mask – a mask that is used to "clip" the pixels on the layer(s) on top so that it only shows the pixels of the base layer shape which can be either vector or bitmap. (Base-layer has an underline in the layer name). It is helpful to think of a clipping mask as a cookie cutter. Unlike layer and vector masks that requires only ONE layer with the corresponding mask on the same layers as thumbnails, clipping masks equires TWO or more layers ABOVE the base layer.
  4. Gradient Mask – is actually a Layer Mask with a Gradient Fill (Black/White) applied to it or a shades of gray applied to it to show various degrees of transparency.
  5. Filter Mask – similar to a Layer mask but on a separate layer. They can be created after converting a layer to a Smart Filter.
  6. Channel Mask – a mask used to restricts editing to a specific channel.
    MEMORY TIP:  It is helpful to think when you are using LAYERS (Layer/Clipping/Filter/Channel Mask) you will be PUSHING ON "PIXELS."  When you are using VECTORS (Vector Mask) you are PUSHING ON "POINTS."

Like selections, they are ALL used to store a mask and allow you to edit an image non-destructively.

HOW DO YOU CREATE A MASK?

Like selections, by using various TOOLS and TECHNIQUES depending on the image itself:

The layer mask is one of the most useful and flexible mask that can be used.

A. CREATE A "LAYER" MASK — FROM A SELECTION:

Create a Layer Mask by creating a selection by any means (selection tools, painting, text mask, etc.), then do one of the following:

Layer mask is automatically created.

NOTES:

TIPS:
TO AUTOMATICALLY CREATE A LAYER MASK:

B. PAINT A "LAYER" MASK — WITHOUT A SELECTION:

  1. Create a Layer Mask WITHOUT A SELECTION:
  2. Then paint with black, white or gray.
  3. You can also create a Layer Mask from an image with transparency by choosing Layer > Layer Mask > From Transparency.

Note: Reveal All will create a WHITE thumbnail mask with ALL pixels visible in an image, Hide All will create a BLACK thumbnail mask with the ALL pixels invisible in an image.

When creasting a Layer Mask, follow these golden rules.  You "paint" with:

TIPS:


C. DRAW A "VECTOR" MASK — WITH A PATH USING "VECTOR" DRAWING TOOLS:

As mentioned, a vector mask is similiar to a layer mask.  However, instead of using pixels, vectors are used so that the mask can have precise, sharp defined edges and uses less storage space than its layer mask counterpart. 

A Vector Mask by creating a path by using any vector tools to draw a shape:

 1. To create a path for a vector mask, use any of the following vector tools:

2. Then do one of the following:

NOTES:
Make sure to select the PATHS option and not the SHAPE LAYERS or FILL PIXEL in the control bar.

TIP:
TO AUTOMATICALLY CREATE A VECTOR MASK:

TIP: You can also create a path from a selection by selecting the Make Work Path from the contextual menu.

D. DRAW A "VECTOR" MASK — WITHOUT A PATH:

  1. Add a vector mask WITHOUT A PATH:
  2. Then add a vector with a vector tool

NOTE: Reveal All with create a white mask to show ALL pixels, Hide All will create a black mask to hide ALL pixels.

NOTES:

E. LOAD MASK — FROM A CLIPPING PATH

A popular use of a clipping mask it to use it with a Type layer.  Instead of rasterizing (turning into pixels) a Type layer which can not then be edited, a clipping mask is used so that only the pixels in the base clipping layer show through

  1. Create new layer above a Type layer with some type of fill or filter(s) applied to it or use an image (i.e., sunset)
  2. Do any one of the following:
    1. Menu: Right click on the top layer and choose Create Clipping Mask or choose Layer > Creating Clipping Mask from main menu.
    2. Keyboard:  Press CTRL+ALT+G
    3. Clicking: Press ALT and click in between (when the cursor changes to a double circle) the two layers.

NOTES:

Exceptions: In order for some filters to be applied to a Type layer, they have to be rasterized. They include the Lighting Effects, Gaussian Blur, or Brush Strokes.  A good precaution is to make a back up copy of the layer in case you need to edit the text.

However, you are not limited to using a Type layer as the base layer. Because it is this bottom layer that is actually doing the "clipping", other than the Background layer, you could basically "clip" to an object that has transparency in it:

NOTE: Unlike  a Layer and a Vector mask, where you can UNLOCK the layer from the mask and move either the layer or the mask depending on the which thumbnail you have selected with the move tool. To move the mask, you need to use the Path Selection tool.

Next, we talked about how to work with masks:

Working with Masks:

What can you do with vector mask (or the path)?  Once a mask is created by any mean above, you can:

    1. Combine IT – Click vector mask thumbnail and draw another path using the pen/freeform pen or shape tool while using one of the pathfinder icon (add,substract, intersect or exclude overlapping area)
    2. Reshape IT – Use Shortcut keys or the Direct Selection tool (not Selection tool) and click on vector mask to edit its points by adding, substracting or move points, lines and curves.
    3. Delete IT
      1. Drag it to trash can icon
      2. Right click and select Delete Layer Mask/Vector Mask.
      3. Select Layer > Layer Mask/Vector Mask > Delecte Vector Mask
      4. If you delete the path in the Path panel, you will also delete the vector mask. You can also right-click path layer and select Delete path
    4. Move IT – select the Path Selection Tool and click on the path and drag it to move it.
    5. Copy IT – drag the vector mask to the layer you want to duplicate it on while holding down the ALT key
    6. Enable/Disable  IT – to enable or disable (you will see a red X) a mask Shift-click layer/vector mask thumbnail or use the menu Layer > Layer Mask/Vector Mask > Enable/Disable
    7. Link/Unlink IT – link or unlink the mask from the image in the Layers Panel. Click on the chain link in between the image and its mask in the Layers Panel or select Layer > Layer Mask/Vector Mask > Link/Unlink
    8. Apply IT -- Typically not something you normally would do. However, appying a mask with merge the image and the mask together into a normal layer. You apply if fromm the menu using Layer > Layer/Vector > Apply

Also, you can toggle the view of a layer mask in the image by holding down the ALT key and clicking on the layer mask thumbnail.  You can toggle the creation of a Quick Mask from by holding down the SHIFT+ALT key while clicking on the layer mask thumbnal.

TIP: You can also convert a layer mask into a vector mask by CTRL+click the layer mask thumbnail to make a selection and then click the Make Work Path from Selection button in the Path panel then choose Layer>Add Vector Mask>Current Path from menu.