Translate

Photoshop - Understanding Layer Mask

Photoshop Tutorial

Part 4 - Understanding Layer Mask


This article is part of a series of s thought for beginners. I’ll explain in depth those features that can result difficult to understand for a newbie. In the previous article I’ve explained the core of : layers and their functionality.
Today I will show you one of the most powerful tool: layer masks. They can result difficult to use for a beginner, but once understood how they work, you won’t need the Eraser tool anymore. Let’s start!

What are layer masks?

As I often write, one of the most powerful features is the possibility to modify the same object again and again and, if you’re not satisfied, go back and return to the original image. I’m not speaking about the history timeline (ctrl+Z), that allow you to eliminate the last steps, but of some functionalities that allow you to have full control on your layers at any time during your workflow. Layer masks represent one of these functionalities.

I prefer the practical approach so download this free image of a lion and open it in . Double-click on the thumbnail of the image in the layers window to unlock it.
Why do I have to unlock the background layer? By unlocking the background layer, you are free to move it over the canvas. Grab the move tool (V) and move the lion layer: you will see the transparent background, while if you lock it there’s no way to move it. Also you can’t apply a layer mask if the layer is locked.
unlock the background layer
Now let’s create the layer mask. Simply click the “add layer mask” button which is at the bottom of the layers window. A white rectangle will appear near the lion thumbnail layer. This white rectangle represents the layer mask.
create the layer mask
Let’s see the basic use of the mask: set black as foreground color and grab the brush tool (B). In my case I’ve chosen a 300px default round brush. Click a couple of times over the lion face:
click twice using the brush tool
As you may have noticed, the black brush, combined with the mask, works like the eraser tool. There are two spots over the mask thumbnail, representing the area eliminated with the brush tool. So where’s the power of the mask?
Switch the foreground color from black to white. With the mask still selected (not the layer thumbnail, but the mask. Make attention!) paint over one of the 2 spots. Ta-daa! Pixels will reappear. So here is the power of masks: you “mask” pixels, don’t eliminate them. If you mask pixels, you can replace them at any time, while if you eliminate them you lose them.
How the layer masks works:
  • Black: eliminate pixels
  • White: replace pixels
  • Grayscale colors: reduce pixel opacity
repair using the white brush
Let’s suppose you’re working on a complex composition with lots of layers. At the end of the process you decide that you’ve erased too much of an object. How to repair? If you have used the eraser tool there’s no way, while if you used a layer mask, simply grab a white brush and modify the image until you’re satisfied.
So here is a basic definition: the layer mask is a tool that allow you to eliminate and replace pixels of a layer at any time.

Exercise 1: create the til-shift photography effect using masks

Download this beautiful photo of Prague and open it in .
Prague photo
Duplicate the layer by pressing Ctrl+J (or go to Layer>Duplicate layer).
duplicate layer
Now go to filter>Blur>Gaussian blur and enter a value around 10px:
gaussian blur
At this point we have two layer: the bottom one which is the original layer, and the upper one which is blurred. To create the til-shift effect we have to remove the blurred effect from a specific area – the one you want to emphasize. So create a layer mask:
create a layer mask
Grab a black soft brush (reduce hardness to 0%) and start painting over the bridge. Painting over the mask using a black brush we remove that area. In this way an area of the below layer will reappear:
apply the black brush
Here is the til-shift effect! In case you’re not satisfied with the result. you can always use the white brush to replace the pixels.
til-shift photo effect

Exercise 2: working with gradients

There’s another tool that can be used combined with layers masks: the Gradient tool (G). Download this picture of a flower and open it in .
flower picture
Duplicate the flower’s layer (ctrl+J) and desaturate it by going to Image>Adjustments>Desaturate.
desaturate the flower
Create a layer mask. Set black as foreground color and white as background. Then grab the gradient tool (G), click on the left edge of the canvas, drag till the right one and release. The final result gently goes from the colored area (eliminated from the top layer using the gradient tool) to the black/white one.
This technique, that can result not so useful, is often used in web and icon design to create gradients going from white to transparent.
gradient applied

Exercise 3: Masks and selections

Masks can work as separate layers because what you make on them won’t affect directly the layer masked, but only the mask. Another powerful feature derives from the combination between masks and selections.
Download this beautiful portrait of a woman and open it in .

Unlock the background layer. Grab the Polygonal lasso tool and make a rough selection of the face:
polygonal lasso tool
Press the layer mask button. The face will be isolated from the background.
Tip: if you want to eliminate the selection using masks, instead of isolate it, hold down “alt” on your keyboard while pressing the mask button.
face isolated
After desaturated the lady’s face by pressing shift+ctrl+U, create a new layer and move it below the lady’s one. Grab the Paint bucket tool and fill the layer with white.
create the background
Select the lady’s layer and fo to filter>Artistic>Dry brush and enter the following settings:
  • Brush size: 7
  • Brush detail: 5
  • Texture: 1
Press OK to apply the filter:
dry brush filter
Now select the mask thumbnail. We will play a bit with face contours using dry paint brushes. You can download our Dry Paint strokes brushes here.  Once obtained the .abr file, grab the brush tool (B), then in the tool options bar (on top) open the brush window and, once opened, click on the little arrow on top-right. In the menu that appears select “load brushes”. Here select the .abr file and load it.
load a brush set
With black as foreground color and the mask still selected, grab a brush from the new set and paint over the outline of lady’s face.
Here is my result:

Finally create a third layer and put it between the lady’s one and the background. Grab the brush tool and paint around the lady’s face. This time dry paint strokes won’t be used to eliminate some areas from lady’s face, but to enhance it.
And here is the nice result of this brief :
final result
I hope you have understood how masks work following these brief s. I’m going to publish other s for beginners, so stay tuned! I

No comments:

Post a Comment