Tutorial: Using the Layer Mask in Photoshop 8 or CS

This is a tutorial to demonstrate the Mask feature of Photoshop 8 or CS. I know it works in other PS releases, but I don't have those to demonstrate in, sorry!

I'm making this tutorial because I see so many people erasing backgrounds from images they want to use, when there's a MUCH better way: masking. You make part of an image transparent without actually erasing any of it! Why is this cool? Two reasons: 1) If you decide at some point that you want some of your background BACK, it's not gone; and 2) you can manipulate masks with the usual drawing, text, and selection tools, giving you MUCH more control than just the eraser. Say goodbye to pixelly erased edges!

To demonstrate, I'm going to use my kitty Ioane (pronounced "ee-oh-WAH-nee" or Wanni for short).


#1
#1
We start with a picture of Wanni laying in my computer chair. I want to remove the chair background and put in something else. To follow along, copy her picture and paste it into a new document in Photoshop.

#2
#2
After selecting the image layer, I click the 'new mask' button, seen here.

#3
#3
Add two layers underneath the image layer, and fill them with colors that will be easily seen when compared to the dark red chair background -- one light, and one dark. I chose white and a dark green. Click the new mask (the white box next to the image) so it is selected.

#4
#4
Set the foreground color to black, as though you're going to paint something black with the paintbrush tool. Select the paintbrush tool and set it to a small diameter (I used 8 pixels) with 0% hardness. Now, start "drawing" on the picture itself, as though you are painting the background. The red chair disappears, and the green layer below it is showing through!

#5
#5
I use the paintbrush to do the edges near Wanni's outline, and then switch to the pencil tool, with a bigger diameter, to "draw" over the red chair which isn't near her head. Using the larger pencil tool deletes all of the background faster, removes all of it (instead of just some, as the paintbrush does), and I don't need to worry about pixelly edges because I've used the paintbrush to outline Wanni's head.

#6
#6
This is what the mask looks like now. See, I've painted black on the mask, but on the image, it is transparent. Notice that the image of Wanni itself is still all there!

#7
#7
Turn off the green layer so you can see the white one behind the image. Now it's easy to see the reddish outline I've left behind, plus a small greyish spot I left with the paintbrush. Use the paintbrush tool to clean up the edges. Obviously, zooming in helps a lot.

#8
#8
I've cleaned up the edges here, but oh no, I slipped with the mouse and took a chunk out of her head! This is where you see how awesome masks are. If I were using the eraser, unless I used UNDO right now, I'd be stuck. Since we're using masks, just change your foreground color to white (as though you're going to paint something white with the paintbrush tool). "Draw" over the part that got accidentally erased. The "erased" part comes back! Now you never need UNDO, because you can come back at any time to edit the mask.

BLACK on the mask makes the image transparent, WHITE on the mask makes the image visible. GREY makes it semi-transparent, depending on how dark the grey is.

#9
#9
So, here's my completed outline of Wanni, with a full mask drawn and painted on.

#10
#10
Here's the same image, but with the green background layer visible again.

Switching between the two backgrounds, dark and light, allow you to see how the edges will look against different backgrounds you may use for the final picture.

#11
#11
Here I've added a pretty bush behind Wanni! I just pasted in a layer with a picture of a bush on it. If you're following along and want to use it, here is the bush picture.

#12
#12
The shadow on Wanni's neck is obviously darker than the bush behind her, so I do a little burning of the bush image on the area behind her neck. That image is here if you want it, or you can just burn yourself. I show this step so you can see how the background can be manipulated to fit the main image better. If you didn't know better, you might even think the bush was in the original picture.

For some extra tweaking, I dodge the edges of Wanni's ears, to make them a little lighter, and to blend in better against the background.

Right-click the Wanni layer and choose 'Apply Layer Mask'. Notice what we've done.. by applying the layer mask, we now have an ACTUAL image of just Wanni -- the mask is gone. Now we CAN'T go back to add more of Wanni back in, because we have deleted it. You can apply the mask if you like, or leave it alone if you want to change it later. The final image acts the same. For this tutorial, we'll apply it, because we want to do a NEW mask on this image.

#13
#13
Now for a demonstration of another way to use masks. Turn off all the layers except Wanni, then use the font tool to make a new text layer over her saying "CAT".

Hold down the CTRL key and left-click the new text layer to select the text.

#14
#14
Click the Image layer to select it, then click the 'new mask' button again. Now you have a new mask that is all black except for what you selected earlier (the word 'cat'). Delete the text layer since you don't need it any longer. Also, duplicate the masked layer so you can compare it to what we do next.

Hold down CTRL and hit D to deselect everything. Use the square selection tool to select the entire image, then click the mask in the layer window to select it.

#15
#15
Click Image > Adjustments > Invert. We're changing the black mask with white 'cat' on it to a white mask with black 'cat'.

Now you've got a cat with the word "cat" cut out of it, and the word 'cat' filled with the cat image! We won't use the second one here, but it's good to see and play with the technique.

#16
#16
You can add filters and show backgrounds now, and get some really cool effects. Here's a picture with the bush background again, but the Wanni layer has a drop shadow.




I hope that helped some people! You can make some really neat effects with layer masks, and it's a very useful way to remove backgrounds.