Account Log In - Home/Outlines - Books - Contact Us - Support - Employment -

Photoshop

Channels and Masks

Layer Masks

A powerful isolation tool in Photoshop is a mask. A mask can be used for two purposes. You can use it to paint out unwanted portions of a layer with the option of painting them back in at any given time. You can also use a mask to protect an area of a layer while editing an unprotected area. When you're done, you can discard the mask. Unlike selections, a mask can be saved with the file. You can close a file part of the way through an editing job and when you come back to it, you can pick up right where you left off.

tiger image for exercise Probably the best way to learn about masks is to do an exercise as we explain them. You'll need cloud.jpg that you used in the Airbrush exercise in the Painting module as well as this tiger image.

Practice Exercise: Using a Mask to Create a Composite Image

In this exercise we're going to use a mask to blend the cloud and tiger images to come up with the surreal composite below.

completed masked tiger

  1. Open cloud.jpg that you downloaded in a previous exercise. Use the Save As command to save it as masked_tiger.psd.
  2. Right-click (Ctrl-click) on the tiger image (tiger.jpg) at the top of this page and save it to your hard drive. Open that image also.
  3. Drag the tiger layer into the cloud image document. Close tiger.jpg.
  4. Rename the tiger layer Tiger.
  5. Go to Edit > Transform > Flip Horizontal to flip the tiger.

tiger flipped horizontally We flipped the tiger so that the light would be coming from the right in both images.

  1. Press Ctrl-T (Cmd-T). We're going to scale the Tiger layer so it's large enough to cover the cloud layer. Hold down the Shift key and drag a corner handle outward to enlarge the tiger and retain its proportions. If the bounding box handles disappear while you're doing this, drag the window border to enlarge it so you can see the bounding box on the canvas outside the image area. Once the Tiger layer is large enough to just cover the cloud layer, press Enter (Return) to apply the scale transformation.
  2. Save your file.
  3. Mask button Click on the Add a Mask button at the bottom of the Layers panel. Alternately, you can go to Layer > Layer Mask > Reveal All. Your Layers panel should now look like this:

Layers panel with tiger layer masked The Tiger layer displays two thumbnails: the layer thumbnail of the tiger image is on the left and the mask thumbnail is on the right. The two thumbnails have a link icon between them. If you move the layer, both the layer and its mask will move as one unit. However, you can unlink them by clicking on the link icon if you want to move them independently of each other.

There is a black border around the mask thumbnail. This means that the mask is active and any editing you do will apply to the mask. If you click on the layer thumbnail or name, the border will switch to the layer thumbnail and your edits will apply to the tiger, not the mask. To switch back to editing the mask, click on the mask thumbnail.

  1. Make sure the mask thumbnail is active. Just like Quick Mask mode, the foreground and background colours will be confined to the greyscale palette when you're editing a mask.
  2. In order to see what we're about to do, change the Opacity of the Tiger layer to 50%. You should be able to see the outline of the clouds now.
  3. Select the Brush tool and set the following options:
    • Brush: Soft Round 65 pixels
    • Mode: Normal
    • Opacity: 100%
    • Wet Edges: Off
  4. Set the foreground colour to black and drag the Brush over the cloud area as pictured below. Don't worry about being too precise at this point. The idea here is to reveal the clouds. We'll fine-tune it later.

initial mask to reveal underlying clouds What you've done is mask the top layer by painting on it with black to reveal the underlying cloud layer. The beauty of masks is that you can add back areas you've 'erased' by painting with white. Greys will produce semi-transparent areas, which is what's happening with the soft edges of the brush.

  1. Now that you've roughly defined the clouds, increase the Opacity of the Tiger layer to 100%.
  2. after refining the mask Choose a smaller brush size and refine your mask around the tiger and the edges of the clouds. Use black to remove from the Tiger layer and white to add it back in. Remember that you can use the keyboard shortcut X to quickly switch the foreground and background colours. If you want to create a misty effect in areas, choose a large brush and reduce the opacity. Smaller brushes and higher opacity will create more clearly defined edges.
  3. Save your file again.
  4. Set your Brush options as follows:
    • Brush: Soft Round 65 pixels
    • Mode: Normal
    • Opacity: 100%
    • Wet Edges: Off
  5. Select a medium grey as the foreground colour. We used #999999.
  6. sky mask partially removed with grey Paint over the sky area behind the tiger. Grey will partially remove the mask, leaving a midnight blue sky. Leave the ground area and trees behind the tiger intact.

mask thumbnail in Layers panel If you look at the Layers panel now, the mask thumbnail has changed. You can see where you've painted with black, grey and white to create the mask.

  1. Go to Layer > Layer Mask > Disable.

Layers panel with mask disabled This hides the mask and you can see the entire Tiger layer again. The mask thumbnail in the Layers panel is displayed with a red X to show that the mask has been disabled.

  1. Go to Layer > Layer Mask > Enable. This will restore the visibility of the mask.
  2. Display the Channels panel. You'll see a channel called Tiger Mask. This is a temporary mask channel. (Any channel name in italics is temporary.) You can save the mask as a regular alpha channel by selecting the Tiger Mask channel and choosing Duplicate Channel from the panel menu. If you decide to do this, the mask itself will be displayed in the image window. You'll have to click on the composite channel to restore the colour image.
  3. If you want to give the image a more ghostly effect, reduce the Opacity to around 80%. If you prefer the vividness of the tiger's colour, leave it at 100%.
  4. Save your file.

You have three options now that your mask is complete. You can just leave it as it is in the image, you can apply it and the mask and masked pixels will be removed from the layer, or you can discard the mask to restore the layer to its original state. Let's apply the mask.

  1. Go to Layer > Layer Mask > Apply. The Tiger layer no longer has a mask thumbnail on it. Another way of applying the mask is to drag the mask thumbnail to the trashcan icon in the Layers panel. You'll be prompted with, "Apply mask to layer before removing?" Click the Apply button.
  2. Hide the Background layer to see what effect your mask has had on the Tiger layer.

mask applied and background layer hidden With the cloud layer hidden, the Tiger layer looks something like this after the mask is applied. The areas that were completely masked are now completely transparent. The sky area that was partially masked by painting with grey is partially transparent.

  1. If you want to retain the mask for future reference, close your file without saving. Otherwise, turn on the visibility of the Background layer and save your file.

completed masked tiger

You can remove areas of a layer like this by using the Eraser tool but you don't have the flexibility to add back erased pixels as you do when using a mask.

Gradient Masks

Gradients can create beautiful mask effects. In the example below, The two images shown at the top were layered. A simple black and white linear gradient was applied to a mask on the top sunset layer. It fades one image into another flawlessly.

gradient mask

Here's another example where a feathered oval selection was used on the mask layer to create a soft vignette around the image.

oval gradient mask

Here are the specifics for masking:

Adding a Layer Mask

A mask can be applied to a layer or layer group. Background layers cannot be masked. When adding a mask, you can start with the layer completely masked or unmasked. If a selection is in effect, you can choose to have the selected area masked or unmasked. These options are described below.

To Reveal All of the Mask Layer

  1. Remove any selections.
  2. Select the layer or layer group you want to mask.
  3. Do one of the following:
    • Click on the Add a Mask button at the bottom of the Layers panel.
    • Go to Layer > Layer Mask > Reveal All.
  4. The entire layer will be visible and the mask thumbnail will be white.

To Hide All of the Mask Layer

  1. Remove any selections.
  2. Select the layer or layer group you want to mask.
  3. Do one of the following:
    • Alt-click (Option-click) the Add a Mask button at the bottom of the Layers panel.
    • Go to Layer > Layer Mask > Hide All.
  4. The entire layer will be hidden and the mask thumbnail will be black.

To Hide or Reveal a Selection

  1. Create a selection of the area you want to mask.
  2. Select the layer you want to mask.
  3. Go to Layer > Layer Mask and select either Reveal Selection or Hide Selection from the submenu. Clicking the Add a Mask button in the Layers panel will reveal the selection.

Editing a Layer Mask

  1. Make sure the mask thumbnail is selected so you don't inadvertently paint on the image. A black border will outline the active thumbnail.
  2. Use any of the painting, editing or selection tools.
    • To add to the mask and hide the masked layer, paint with black.
    • To subtract from the mask and reveal the masked layer, paint with white.
    • To create partial transparency on the mask layer, paint with grey.

Showing/Hiding a Layer Mask

Hide a Mask

Do one of the following:

Show a Mask

Do one of the following:

Applying and Discarding Masks

  1. Click the mask thumbnail.
  2. Do one of the following:
    • Click on the trashcan icon in the Layers panel.
    • Drag the mask thumbnail to the trashcan icon.
    • Go to Layer > Layer Mask > Apply.
  3. Click the Apply button to combine the mask with the layer, leaving areas of transparency or partial transparency. Click the Delete button to remove the mask and restore the layer along with any changes you made to the layer pixels while it was masked.

Layer Masks Summary

Coming Soon:

Jun 27
Microsoft Office Word 2007 - Tips for Small Business
Jun 27
Microsoft Office Excel 2007 - Tips for Small Business
Jun 27
Microsoft Office PowerPoint 2007 - Tips for Small Business
Aug 21
Facebook for Business
Sep 10
ISSD 24 - Web 2.0 Technology
Sep 17
ISSD 24 - Ajax


Photoshop - TOC - Introduction - Books -
Channels and Masks - Links - Questions -
1 - 2 - 3 - 4 - 5 - 6 - [ 7 ] -

Photoshop - TOC - Introduction - Books -
Channels and Masks - Links - Questions -
1 - 2 - 3 - 4 - 5 - 6 - [ 7 ] -