Layer masks are an integral part of Adobe Photoshop's photo-editing prowess, since – among other benefits – they allow you to work on an original image without intervening. How could that be? If you want to be an expert and get amazing creative results, you need to know how to create layers in Photoshop and apply masks.
A layer mask is a non-destructive way of working with a small portion of the image, such as when you only want to apply an effect to the subject or the background. Layer masks are essential for many common Photoshop tasks, from adding background blur to more advanced compositions.
What is a Photoshop layer mask?
A mask allows a fraction of the layer or layer be invisible, revealing the ones underneath and keeping other parts of the cape intact. Unlike making a copy-and-paste selection, a layer mask allows you to go back and make adjustments to what is included in the selection – and what is not included – at any point in the editing process.
For example, you are composing a person in a new background. Halfway through, you realize you cut some of that person's hair. If you copied and pasted that person using one of Photoshop's selection tools, you would have to start over from the beginning, making a completely new selection. With a cape mask, it's no big deal – you just adjust the mask to include lost hair and continue working.
A layer mask is basically a monochrome layer. You paint all black to completely hide the underlying layer or all white to reveal it. You can also handle any shade of gray, partially hiding the underlying layer. You can use the brush, paint bucket, or even the gradient tools to create all mask shapes and sizes.
Selecting an object, then, is about painting everything you don't want to include in black, or, starting with a filled mask and painting in white what you want to include. At any point in the edit, you can go back and use black, white, and gray brushes to adjust the selection.
Layer masks work with both regular and adjustment layers. When you add a new adjustment layer in Photoshop, a new layer mask is automatically created: just use the brush to make selections or leave the mask alone to adjust the entire image. This is a great way to adjust, for example, the brightness and contrast of a particular single item in a photo.
How to create (and work with) layer masks in Photoshop?
1. Create a multi-layered document.
If you create a layer mask from a file with a single background layer, you will create a cutout on a transparent background. To make selective adjustments to the photograph without removing the background, you must work with adjustment layers. Photoshop automatically creates a layer mask for each new adjustment layer. The latter are best for tasks such as selectively adjusting the exposure or color.
To create an adjustment layer, click the half-color circle at the bottom of the layers panel (or on the menu bar, choose Layer> New Adjustment Layer) and select the type of adjustment layer. For example, this selectively adjusts the exposure only for the masked area.
Another popular use for layer masks is to compose or merge multiple photos together. To work on a composition, start by creating a layer for each image you want to merge into the final copy.
2. Decide whether to start with a layer or a selection.
You can start a layer mask from a selection or simply from a layer itself. Starting from a selection allows you to use the different Photoshop selection tools to launch your mask. In many cases, use the tool Select subject or Selection of object Photoshop is the fastest way to create the initial mask.
If you decide to start from a selection tool, use the one you prefer to select the layer you want to adjust. In the photo above, we use Select> Color Range for quick selection. You can also use the tools Select subject, Select object, Magnetic loop, Magic wand wave Quick selection. Don't worry about making the layout perfect, because that's what the layer mask is for.
If getting selection is easier with a brush, go straight to making the layer mask button without making a selection first
3. Press the layer mask button.
If you made a selection, make sure it is still active with dotted lines. If you decided to start with just one layer instead, make sure it's selected within the Layers panel.
Then, inside the Layers panel, press the button Add layer mask (It is the cone that looks like a white rectangle with a circle cut in the middle). Then you will see a white box next to the name or a white box with a black shape identical to the selection you made. This is the layer mask. (When working with an adjustment layer, you don't need to add a layer mask, as Photoshop adds them for you.)
Suggestion: If you don't see the layers panel, navigate to the Window menu and make sure that the Layers option is checked, or press F7 on the keyboard.
4. Create a selection with the layer mask.
The white rectangle inside the layers panel is your layer mask. When adjusting, make sure it is selected: a white outline will appear in the corners when you select it.
With the layer mask created, making a selection is as simple as coloring what you want to be visible in white and what you want to be invisible in black. If the foreground and background colors at the bottom of the left toolbar are not black and white, tap the key D on the keyboard to make them appear. To change the brush color, press the X key.
With the tool Brush, you can paint white on the areas of the image that you want to include. Among the options, find the one that best suits the task. A brush with a solid edge will create an abrupt transition, while one with a gradient edge will gradually fade adding a semi-transparent gray.
Although the brush tool is usually the most useful, you can also use:
- Paint bucket: makes the entire layer black instead of white. In this way, you can paint the white object instead of the black background.
- Degraded: Because white is displayed and black is excluded, a black and white gradient can apply a subtle transition to an adjustment layer.
Use those tools until you have selected the areas of the photo you want to select.
5. Adjust the layer mask.
Photoshop offers more than a brush tool for making selections within a mask. On the panel Properties, click on the layer mask icon to make the changes. (If you don't see the properties window, go to Window> Properties).
You can rotate the mask to get a smoother edge. Adjusting the density lighten those black layers to gray, returning those areas just a little.
Under the refine options, you can access the workspace To select Y Mask, which tends to be an easier way to wrap a mask around fine details like hair. You can also refine the selection by color range or invert the selection.
From here, continue editing your photo. You can go back and adjust a layer mask at any time to add or subtract more from the selection. To go back, just click on the mask in the layers panel and continue editing.
How you use layer masks depends entirely on what you want to do. They are infinitely adjustable and when combined with adjustment layers, they allow a flexible and non-destructive way to edit photos. Sometimes just playing around with different selection tools, brushes, and gradients can reveal new ways to use them, so don't be afraid to experiment.