Layer Masking: Free Photoshop Tutorial

Discover the intricacies of Photoshop, including the creation and adjustment of masks, in this comprehensive tutorial.

This exercise is excerpted from Noble Desktop’s Adobe Photoshop training materials and is compatible with Photoshop updates through 2023. To learn current skills in Photoshop with hands-on training, check out our Photoshop Bootcamp, Graphic Design Certificate, and graphic design classes in-person and live online.

Note: These materials are provided to give prospective students a sense of how we structure our class exercises and supplementary materials. During the course, you will get access to the accompanying class files, live instructor demonstrations, and hands-on instruction.

Topics covered in this Photoshop tutorial:

Creating a Mask, Adjusting a Mask by Painting On It

Adobe Photoshop Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Exercise Preview

preview layer masking

Photo by Lucas Sankey on Unsplash

Exercise Overview

In this exercise you’ll learn how to use masks, which many features in Photoshop rely on. Instead of destructively deleting pixels, masks allow you to hide (or un-hide) pixels for non-destructive editing.

Creating a Mask

  1. From the Photoshop Class folder, open the 3C Hat guy.jpg file.
  2. In the Tools panel, click and hold on the Rectangular Marquee tool rectangular marquee tool and choose the Elliptical Marquee tool elliptical marquee tool.
  3. In the image, hold Shift (to make it a perfect circle) and drag a selection circle (marquee) around his head (you’ll be able to move it later so don’t worry about being perfectly sized or positioned).
  4. In the Layers panel, at the bottom click the Add a mask button layer mask button.
  5. Choose the Move tool move tool.
  6. Drag on the circle to see the circle (and the guy in it) both move around.
  7. In order for you to move the circle separately from the guy, as shown below, click the link icon link icon to unlink the guy from its layer mask.

    layer mask hat guy unlink

  8. Select the layer thumbnail (the left of the 2 icons).

    hat guy select layer thumbnail

  9. In the image, drag on the guy to see the photo move inside the circle (the circle should NOT move).
  10. Select the mask thumbnail (the right of the 2 icons).

    hat guy select mask thumbnail

  11. In the image, drag to move the circle (the guy should NOT move).

Adjusting a Mask by Painting On It

  1. In the Layers panel, make sure the mask thumbnail is still selected.
  2. In the Tools panel, choose the Brush tool brush tool.
  3. Let’s set the brush size. In the Options bar at the top of the screen, click on the Brush Preset picker and set the following:

    • Size: 500px
    • Hardness: 0%

  4. Near the bottom of the Tools panel, above the foreground and background colors, click the small Default Colors icon default colors white on top to set the Foreground color to white and the Background color to black.

    TIP: You can also hit D on your keyboard to do the same thing.

  5. Starting from inside the circle, drag outside the circle to see you start revealing some of the photo that was hidden.
  6. Hit X to exchange the foreground/background colors, so you’re painting with black.
  7. Paint over any of the visible photo to see you’ll now hide it.

    Masks: Black, White, and Grays

    • Where a layer mask is black, pixels on that layer are completely hidden.
    • Where the mask is completely white, pixels on that layer are fully visible.
    • Any place where a layer mask is a shade of gray, pixels on that layer are partially hidden (transparent). The darker the gray, the more transparent.
  8. Masks are non-destructive, which means they do not remove pixels, they only hide them. To prove this, we can get the entire original image back!

    • In the Layers panel, drag the mask thumbnail to the Trash button trash button at the bottom right of the panel.

    • A dialog will likely appear, in which you should click Delete.
    • Now you should see the entire photo again (although some of it may be outside the document).

    NOTE: If you had clicked Apply, Photoshop would have deleted the pixels (a destructive change).

    TIP: You can hit Delete (Mac) or Backspace (Windows) when a mask is selected, to delete it without seeing the dialog.

Making the Hat Pop Out of the Circle

  1. Go into the File menu and choose Revert.
  2. Choose the Elliptical Marquee tool elliptical marquee tool.
  3. Hold Shift and drag a circle around his head.
  4. To finalize the size and position:

    • Choose Select > Transform Selection.
    • Adjust the size with the resize handles (do NOT hold Shift), and drag anywhere inside the selection to position it as shown below (some of his hat should be outside the circle).

      hat guy position circle

    • To finish the transform selection, hit Return (Mac) or Enter (Windows).

  5. In the Layers panel, at the bottom click the Add a mask button layer mask button.
  6. In the Layers panel, rename the layer to guy
  7. To create a solid backdrop for the design, we’ll use a fill layer. This is a special kind of layer that is just used to fill an area with a solid color. At the bottom of the Layers panel, click the Create new fill or adjustment layer button adjustment layer button, and from the menu, choose Solid Color.
  8. Choose black and click OK.
  9. In the Layers panel:

    • Drag the fill layer below the guy layer.

    • Select the guy layer’s mask (the black and white thumbnail which shows a circle).

  10. If you don’t see the Properties panel (it should be above the Layers panel), open it by choosing Window > Properties.
  11. In the Properties panel, drag the Feather slider to the right until the circle’s edge become soft (blurry).

    NOTE: This is a non-destructive setting that can be adjusted or removed at any time.

  12. We’re ready to make the hat pop out of the circle. For that we’ll need a copy of the guy layer. In the Layers panel, select the guy layer.
  13. Press Cmd–J (Mac) or Ctrl–J (Windows) to duplicate it.

    NOTE: This is the same as choosing Layer > New > Layer Via Copy which is like doing a copy and paste all in one quick step.

  14. Name the new layer from guy copy to hat.
  15. Select the hat layer’s mask (the black and white thumbnail which shows a circle).
  16. In the Properties panel, set Feather to 0 (we don’t want the hat edge to be blurry).
  17. Choose Select > Select and Mask.
  18. In the Properties panel the right:

    • Next to View click the thumbnail and choose On Black.
    • Set Opacity to 100%
  19. In the Options bar at the top of the window, click Select Subject.

    • If warned about it discarding your current selection, click OK.
  20. To see how this will look on top of the existing layer background, next to View click the thumbnail and choose On Layers.

    We’re only concerned with the hat part that protrudes outside the circle. It’s a bit of a hard edge, so adjust it as follows. On the right, set:

    • Feather: 3px
    • Shift Edge: +20%

    Click OK.

  21. In the Tools panel, click and hold on the Elliptical Marquee tool elliptical marquee tool and choose the Rectangular Marquee tool rectangular marquee tool.
  22. We don’t want the guy to stick out the bottom of the circle, so select the bottom part of the guy as shown below:

    hat guy select bottom part of hat mask

  23. Near the bottom of the Tools panel, click the Default Colors icon default colors white on top so your background color is black or hit D on your keyboard.
  24. In the Layers panel, select the hat layer’s mask thumbnail.
  25. Hit Delete (Mac) or Backspace (Windows) to fill the selected area of the mask with black, which hides the guy.
  26. Press Cmd–D (Mac) or Ctrl–D (Windows) to deselect.

    • The image is looking nice!
    • Even though we like this, let’s see how it would look with the circle being a hard edge again instead of feathered (soft).
  27. In the Layers panel, select the guy layer’s mask thumbnail.
  28. In Properties panel, reduce the Feather amount to see that this remains editable at any point!

Optional Bonus: Cropping the Image

  1. Choose the Crop tool crop tool.
  2. Hold Shift and draw a crop area that’s a perfect square. Don’t worry about being perfect with the position or size yet.
  3. Once you release, adjust the crop area as follows:

    • Drag inside the crop area to move it:
    • Hold Shift when using the handles to adjust the size (to keep it a perfect square.)
    • You can go outside the original document size to add space (the area will look transparent during the crop, but will become filled with black one you accept the crop).
  4. When you’re satisfied with the size and position, hit Return (Mac) or Enter (Windows) to apply it.

How to Learn Photoshop

Master Photoshop, the industry-standard application for photo retouching, color correction, and more, with hands-on training.

Yelp Facebook LinkedIn YouTube Twitter Instagram