In my opinion, two “bad words” when it comes to working nondestructively are “erase” and “delete.” If you erase or delete pixels, they are gone—unless you undo the action right away. A layer mask gives you the opportunity to hide pixels instead of deleting them. Because the pixels are hidden, they can always been shown again as necessary.
To compare the difference, we’ll start with two layers that we want to combine (Figure 1.11).
Using the Eraser tool with a soft-edged brush, it is possible—and quite easy—to delete the unwanted pixels to create the effect we want (Figure 1.12).
Now here’s the problem: If you decide to perform further edits, the only option is to start over—assuming you still have the original photo. Here, I tried to scale down the layer on which I had erased some pixels, and now those pixels are gone (Figure 1.13).
When viewing only the erased layer, you can see that the pixels are missing in action (Figure 1.14).
To take advantage of a layer mask, we need to add a mask to the top layer. We can do this by clicking the Add a Mask icon at the bottom of the Layers panel or through the Layer menu. The mask thumbnail appears beside the layer, initially filled with white (Figure 1.15).
When the mask is white, all the pixels on the layer are visible. In order to hide portions of the layer, you need to add black paint to the mask. You can do this by painting with the Brush tool or by making a selection and filling it with black. In this case, I used the Brush tool with soft-edges to create a result that looks pretty much the same as the erased example (Figure 1.16, Figure 1.17).
The big advantage of using this method is that we can continue to edit it. For example, after transforming a layer, I painted with white in the “missing” areas to show the pixels that were previously hidden (Figure 1.18).
As many people like to say, “Black conceals, white reveals.” Personally, I don’t worry about the rhyming part and just think, “Black hides, white shows.” Oh and any shade of gray between black and white can be considered as “kinda”—as in “Kinda hidden, kinda visible.”
Along with adding a mask and then painting on it, you can also create a mask by making a selection and then adding a mask. That way, the selected area is filled with white and everything else is filed with black—and you can continue to paint to adjust the edges of the mask.
Here’s another simple but powerful example of using a mask rather than erasing when working with text. I want to make it appear as though some text is painted on the wall behind my subject. That is pretty simple to do with a mask—while preserving the text editability (Figure 1.19, Figure 1.20).
Even thought the text looks like it’s on the wall behind the ballet dancer, it’s the mask that’s making it appear that way. The type layer sits above the Background layer and can always be edited (Figure 1.21).
In this case, parts of the mask are black to hide the text completely while some parts are gray so that the text is partially visible behind the dancer’s tutu (Figure 1.22, Figure 1.23).
By default, the layer and the mask are linked together, as indicated by the chain icon between the two thumbnails. That means that when you move the layer, the mask moves with it. Much of the time that makes sense, but sometimes you want the mask to stay in place while you move the layer. In this example, it wouldn’t make sense for the mask to move with the text. In order to move them independently, the link needs to be broken. Just click the chain icon to unlink the layer and its mask (Figure 1.24).
Once the layers are unlinked, the text layer can be moved while the mask stays put (Figure 1.25).
To showcase just how much more control you have with mask, here’s what would happen if I try to achieve the same result by deleting pixels. If I make a selection and press Delete, I get a warning asking me to rasterize the text (Figure 1.26).
Rasterizing is the process of converting editable text to pixels—something I highly recommend that you NOT do. (I’ll do it here for the purpose of comparison.) Once the text is rasterized, I’m able to delete the pixels and make it look like the text is behind her arm (Figure 1.27).
However, there will be a problem if I try to move the rasterized text—because there is a hole where the pixels were deleted (Figure 1.28).
Because the text was converted to pixels, it’s not possible to edit the text. Now, imagine if you have a typo! Comparing the two methods, I think it’s pretty clear that using layer masks gives you waaaay more possibilities than rasterizing and deleting. (We’ll see another alternative to rasterizing when we look at Smart Objects.)
3.143.5.217