Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Photoshop

Layer Masking in Photoshop CS4

  • Print
  • + Share This
When working in Photoshop, you’ll often need to combine multiple images together into a new composite image. Those original images, however, may have backgrounds or objects that you no longer want. This is where Layer Masks come in.
Like this article? We recommend

Lesson files for this excerpt can be found here.

When working in Photoshop, you’ll often need to combine multiple images together into a new composite image. Those original images, however, may have backgrounds or objects that you no longer want. This is where Layer Masks come in. Far superior to erasing pixels, Layer Masks allow you to hide (or mask) part of a layer using powerful painting and selection tools. The more you work on combining multiple images, the more you’ll find yourself using masks.

Layer Mask Essentials

In this chapter, you’ll revisit several techniques that you learned in Chapter 5, “Selection Tools and Techniques.” Masks generally start as a selection, which is then attached to a layer. The mask can be refined by adding to it with black or subtracting with white. Learning to create and modify masks is an important skill that becomes significantly easier with a little practice.

Adding Layer Masks

The best way to learn about Layer Masks is to jump right in and create one. You’ll start with an easy image, but one that will help illustrate the important concepts. Let’s get started:

  1. Open the file Ch07_Mask_Start.tif from the Chapter 7 folder on the book’s CD.
  2. Convert the Background layer into a floating layer by double-clicking its name in the Layers panel. Name the layer Tower.
  3. Select the Quick Selection tool from the Tools panel.
  4. Make a selection of the blue sky.
  5. Reverse the selection by choosing Select > Inverse. The building is now selected.
  6. Click the Add layer mask button to add a mask to the layer.
  7. To make it easier to see the edges of the border, place a solid color layer behind the Sundial layer. Choose Layer > New Fill Layer > Solid Color. Choose a color that is not in the image, such as green.
  8. Drag the fill layer below the Sundial layer in the Layers panel.
  9. Depending on the accuracy of your initial selection, your mask may be usable as is. If needed, you can quickly touch it up using the Brush tool.
  10. Click the Layer Mask thumbnail to select it.
  11. Activate the Brush tool by pressing B or by choosing it from the Tools panel.
  12. Press D to load the default colors of black and white. Black will add to a mask and create transparency; white will subtract from the mask. Using gray or blurring will create a softer edge.
  13. Zoom in to better see your edges. You can use the Zoom tool or the Navigator panel to get a better look at your edges.
  14. Paint with a soft-edged brush to refine the mask. If you add too much to the mask, press X to toggle the mask colors. Remember, painting with black will add to the mask (hence removing or masking the image).
  15. You can improve the edges of the mask by using the Blur tool or the Smudge tool on the edges. You can stop tweaking when you are satisfied with your results.

Disabling Layer Masks

The primary benefit of masks is their flexibility. In the previous section you explored that flexibility by adding and subtracting to a mask. This flexibility can also be used to temporarily disable a mask. This can be useful if you want to check your progress or if you need to restore the original image to use on another project:

  1. Work with the Tower image from the previous exercise or open the file Ch07_Mask_End.tif from the Chapter 7 folder.
  2. Select the Layers panel so it is active.
  3. Shift-click the Layer Mask thumbnail to disable it. Alternately, you can right-click the mask’s thumbnail to access more options, such as deleting it and permanently applying it.
  4. To re-enable the mask, Shift-click its thumbnail again.

Deleting Layer Masks

After going through the effort of creating a mask, you are unlikely to want to permanently discard it. But if you change your mind and are certain you want to delete it, doing so is easy:

  1. Work with the Tower image from the previous exercise or open the file Ch07_Mask_End.tif from the Chapter 7 folder.
  2. Select the Layers panel so it is active.
  3. Click the Layer Mask thumbnail. Drag it to the trash icon in the Layers panel.
  4. A dialog window appears asking you to decide what to do with the mask:
    • Delete: Discards the mask and restores the image to its premasked state.

    • Cancel: Allows you to cancel the command and return the image to its masked state.

    • Apply: Permanently applies the mask and deletes the pixels that were originally masked.

  5. Click Apply to permanently apply the mask. The mask is used to permanently discard portions of the masked layer in a destructive edit.

Using Vector Masks

Most users choose to work with the raster-based Layer Masks previously discussed. These raster-based masks tend to be the easiest to work with and allow the most flexibility in editing due to the wide variety of tools you can use to modify the mask. However, some users prefer to work with vector tools like the Pen tool or the Shape tools because of personal preference (or more experience with programs like Adobe Illustrator). There are several ways to add a Vector Mask:

  • After you’ve added a raster Layer Mask, click the Add layer mask button in the Layers panel to add a second mask that is vector-based.
  • To add a Vector Mask initially, Command/Ctrl-click the Add layer mask button when adding the first mask.
  • To add a new (empty) Vector Mask, you can choose Layer > Vector Mask > Reveal All.
  • To hide an entire layer, choose Layer > Vector Mask > Hide All.
  • + Share This
  • 🔖 Save To Your Account