NHS Designs

combining images 9

Graphic Design Tutorials

Layer Masks - Introduction

Layer masks let you non-destructively erase areas from one layer to reveal the layers below. Non-destructively means you are not actually destroying pixels. You can always move things around and change how photos are combined later, because they are still in one piece.

Layer masks are one of the most important things you can learn when it comes to Photoshop layers. Once you figure them out, you'll wonder how you ever got along without them.

Start by copying the following folder from the Outbox, paste it into your Documents folder and rename it:

Outbox\PEDERSEN\Graphic 1\Photoshop Lessons\Layers Chapter 4


A) Layer Masks Basics

  1. Open two photos: super-spy.jpg and gun-barrel.jpg.

layer mask basics 1

  1. Use the Move tool to drag the gun barrel image onto the image of the super spy.

layer mask basics 2

  1. Save the file as basics.psd.
  2. Time to add a layer mask to the gun barrel layer. Make sure Layer 1 is selected, then click on the Add Layer Mask button at the bottom of the layers palette. It looks like a gray rectangle with a white circle inside it.

layer mask basics 3

The layer mask thumbnail shows up right next to the image thumbnail on the layer. The layer mask starts out as solid white, allowing the entire gun barrel layer to remain visible. In order to hide part of this layer, we need to fill part of the layer mask in black. We're going to show the super spy through the end of the gun barrel, so we need to select the area and fill it with black on the mask.

  1. Select the Elliptical Marquee tool and draw a circular selection in the middle of the canvas. (Remember to hold the shift key down to keep the selection perfectly circular.)

layer mask basics 4

  1. Fill the selection with black:
    1. Edit > Fill
    2. In the Use dropdown, select Black.
    3. Ctrl+D to deselect.
  2. Notice in the Layers palette that the gun barrel layer is still intact, but that a portion of it is hidden because of the black part of the mask.
    1. Wherever there is white on a mask, that layer is still visible.
    2. Wherever there is black on a layer mask, the layer(s) below are visible and the current layer is hidden.
  3. Save the file and close it.

layer masks basics 5


B) Automatically Creating Layer Masks

You can automatically create layer masks by making a simple selection and using Paste Into. Here we'll replace the image in a cool dude's sunglasses with a sunset image of airplanes.

  1. Open two photos: cool-dude.jpg and airplanes.jpg.

automatically creating layer masks 1

Start with the photo you want to use as the replacement area. In this example, we're using the photo of the airplanes.

  1. Select the entire image of airplanes.jpg using Ctrl+A. Then copy the image with Ctrl+C.

automatically creating layer masks 2

  1. Now switch over to the photo of the cool dude. Use the Quick Selection tool to select the areas inside this sunglass lenses:
    1. Use the Zoom tool tool to zoom into the sunglasses.
    2. Select the Quick Selection tool.
    3. Click the "Add to Selection" icon on the Options bar.
    4. Click and drag the Quick Selection tool across the left-hand lens.
    5. Drag the same tool across the right-hand lens.
    6. If the selections spill over onto the face or the frames, press-and-hold the Alt key and click on those areas to subtract them from the selection. Make the brush size smaller to make small corrections.

automatically creating layer masks 3

  1. Choose Paste Into from the Edit menu. It will paste the airplanes image into the active selection: the dude's sunglass lenses. It makes sure the airplane photo only shows in the lenses by automatically creating a layer mask for this new layer.

automatically creating layer masks 4

  1. Save the file as pasteinto.psd.
  2. Here's where it gets really cool. Select the Move tool. Click and drag the photo of the airplanes around. Find a good location for the planes in the sunglass reflections.

automatically creating layer masks 5

  1. Now let's resize and warp the planes to simulate the curve of the lenses:
    1. With the airplane layer still selected in the Layers palette, press Ctrl+T to transform the image.
    2. Make the image smaller by holding shift while you drag one of the corner handles in a bit.
    3. Right-click inside the transform box and select Warp.
    4. In the Options bar, select Inflate from the Warp drop-down menu.
    5. Press Enter to save the transformation.

automatically creating layer masks 6

  1. Drop the opacity of the airplane photo layer the better blend in with the glasses: in the Layers palette, change the Opacity to 80%.
  2. Save the file and close it.

automatically creating layer masks 6


C) Careful Where You Paint!

It matters where you click on a layer with a mask before you paint. If you click on the layer's image thumbnail, you will paint directly onto the image. If you click on the layer mask thumbnail first, you will paint on the layer mask.

  1. Open two photos: niece.jpg and nephew.jpg (right-click each link and save each image into your Layers Chapter 4 folder).
  2. Use the Move tool to add nephew.jpg to neice.jpg.
  3. Add a layer mask to the top layer.
  4. Save the file as careful.psd.

careful painting 1

  1. Take a closer look at the top layer (the one with the mask). Notice how there are two thumbnails on the layer? One is the actual layer thumbnail that gives you a little preview of what is one that layer. The other is the layer mask itself.

careful painting 2

  1. Click on the layer thumbnail to select it: the thumbnail on the left. You'll see a small black outline around the corners of the thumbnail.
  2. Get the Brush tool and paint with black onto your image. You should see black painted directly onto the photo of my nephew.

careful painting 3

  1. Undo the black brush stroke(s) in the History palette.
  2. This time, click on the layer mask thumbnail instead.
  3. Now paint with black on the image.
  4. You should see my neice revealed underneath rather than black paint.

careful painting 4

  1. Save the file and close it.


D) Combining Multiple Images

  1. Open three photos: buildings.jpg, fork.jpg and running-man.jpg.

combining images 1

  1. Use the Move tool to move the buildings onto the top half of the running man image.
  2. Save the file as combining.psd.

combining images 2

  1. Make sure the buildings layer is selected, then click on the Add Layer Mask icon at the bottom of the Layers palette to add a layer mask to it.

combining images 3

Now we'll add a gradient to the layer mask that will blend the edge of the building image into the man.

  1. Select the Gradient tool from to Toolbox.
  2. In the Option Bar, click on the gradient dropdown and select the third gradeint (Black, White).

combining images 4

  1. We're going to use the gradient on the layer mask. Click on the layermask thumbnail in the Layers palette.
  2. Click on the bottom of the buildings and drag up a little ways (hold the Shift key down to keep your angle straight up.) If the man's head is not visible, try drawing the gradient again.

combining images 5

  1. Let's bring in the third image. Use the Move tool to bring the fork image into combining.psd, and make sure it is at the top of the layer stack.

combining images 6

  1. Add a layer mask to this layer as well.
  2. The fork shape needs a little more care to blend it in. Select the Brush tool.
  3. In the Options bar, set the Diameter to 200 pixels and the Hardness to 0% to get a large, soft brush.
  4. Click once on the layer mask for the fork layer.
  5. Press D, the X to set your Foreground color to black.
  6. Paint around the fork to hide the areas next to it. Paint over the man to reveal him.

combining images 7

  1. If you paint out too much of the fork image, press X to switch back to white. Then paint on the layer mask to reveal portions of the fork layer. Feel free the change to brush size.

combining images 8

  1. Save the file and close it.

With a bit of text, the image resembles the collaging technique used in many movie posters. You don't need to do this today, however.

combining images 9


Thanks to Layers by Matt Kloskowski for these tutorial ideas.

resources · copyright information · Natomas High School Design Department