Skye Blog link

Please phone
or email for workshop

Layers and layer masks – a simple introduction

I use layers (with layer masks) in the processing of almost every image. If someone new to digital processing asked me to name the top three processes for them to master, this would absolutely be on my list.

Many photographers who are not comfortable using layers and layer masks regard them with an air of mystery, and not a little trepidation. If that describes you, I want to assure you that the basics of using layers and layer masks are simple. Any time spent becoming familiar with them WILL be time extremely well spent.

There are several ways to create additional layers in our images. We can copy and paste from another image, we can duplicate a layer, and in Photoshop we can create an adjustment layer: but more about that last one later. There are more ways but these three are methods you will come to use often.

A simple way to visualise layers is to think of them as being like a stack of clear acetate sheets.

Let's make the bottom sheet a print of your original image. (In Photoshop this is called the background layer.) On a second sheet you might print the same image but lighter. Any part of this lighter layer you "rub out" will let you see through to the darker layer below. By using the layer's mask, we can precisely control which parts of a layer are visible or invisible.


The layer mask is one of the most useful tricks in digital processing. By controlling which parts of each layer are visible we can combine images, or perhaps different versions of the same image. We normally use the paint brush tool with a layer mask. As we brush over the image with the brush set to black, the layer we're on is hidden (masked). Brushing with white makes that part of the layer visible again by removing that part of the mask. We can even alter the brush opacity so where we brush we can partially see one layer through another. One use of that is the "soft" brush which has a feathered edge instead of a hard edge so that we get a more subtle blending together instead of that nasty sharp-edged cardboard cut-out look.

Let’s take a common photographic task and see how we would use layers and layer masks in Photoshop to perform it. We have an image which is generally well exposed but we want to bring out more detail in a dark area. We might also want to quieten down a highlight or two. Darkroom workers will remember these processes as dodging and burning.

If we used exposure bracketing when shooting then we'll have several shots we can combine. Alternatively, we might produce several versions of the same image from one RAW file, each with a different exposure setting. Either way, we can begin with our best overall exposure. Then we would open another version that’s better exposed for the highlights. For this second one, select all, copy, then close it. We can then paste it into the first image, creating a new layer which is a darker copy of our image and it should be properly aligned. You can, if you wish, rename the layer to remind you what it is, e.g. "darker".

layer mask

At the foot of the layers window there are several small symbols, or icons. One of these - a light grey rectangle with a darker grey spot inside - is the layer mask icon. (If the Layers window is not visible, use Windows | Layers, or F7 to open it.) Make sure that the correct layer is highlighted - click on it if it is not - and then click on the layer mask icon at the bottom. A white rectangle will appear on the highlighted layer.

Well done, you have now created an image with two layers and a layer mask!

Now for the clever stuff. Having created a layer mask, you can use several tools to mask out parts of that layer. As I've mentioned, the brush tool is the usual one, and it will pay dividends if you become very familiar with the shortcuts for altering your brush size, hardness, and opacity. Two other useful options are the gradient tool and its alter ego, the paint-bucket tool. (You can right-click a tool icon to select from a list of alternatives associated with that tool.)

Useful brush tool keyboard shortcuts -

X - swaps foreground and background colours

[  - decreases brush size

]  - increases brush size

{  - makes the brush softer

}  - makes the brush harder

The number keys set brush opacity, from 1 = 10%, 2 = 20%, through to 9 = 90% and finally 0 = 100%

Returning to our example, let’s first mask out the whole of that new, darker layer. After all, we will need just a small part of it. Select the paint bucket tool. Because we currently have the layer mask selected, the two overlapping squares showing our foreground and background colours should show white and black (See right.). Make sure the top square (foreground colour) is set to black. If the squares are not black and white, it is an indication that the layer mask is not selected. If that’s the case, go to the layers window and click on the layer mask rectangle on the new, darker layer.

The X key will swap the black and white squares and is a shortcut well worth remembering.  When the top one is black, click anywhere on your image. This should flood the layer mask with black and so hide the whole of the new, darker layer. Now select the brush tool (keyboard shortcut: B) change it to white (X), make it a low opacity, say 10% or 20%, and make it as soft as it will go. With practice you will find what brush sizes work well. Now you can use the brush to “paint” over the area you want to darken. Remember that if you overdo something, you can swap to black (X) and paint it out again. The trick is to make sure you leave no obvious brush strokes, so use subtlety with low opacities and a soft brush.

By now you’ve used most of the techniques you need for effective layer masking. It just remains to practise, practise, practise to develop your skills with the brush.


Adjustment Layers

I mentioned earlier that you can create a new layer with an adjustment layer. In fact, when you create an adjustment layer it automatically includes a layer mask. You could try brightening a part of your image by applying a new “Levels” adjustment layer and then using the brush tool on the layer mask. Another use of adjustment layers might be to create a monochrome layer, and you can then select parts of it to mask, bringing colour back to them.

It all went wrong! What do I do now?

It’s worth mentioning some of the things that go wrong so when these happen to you - and they happen to the best of us - you will understand why and be able to cope.

First, remember that these things always happen for a reason.

  • You have just painted black - or white, or perhaps a solid colour - across your image with the brush tool. Okay, when you’ve stopped screaming, calm down and reverse out your brush strokes. This happens when the layer, and not the layer mask, is selected. Simply click on the layer mask on the layer you are working on.
  • When you paint with the brush, nothing happens. Again, it’s a “selection” issue. Very probably you’ve got the wrong layer selected, perhaps one that is hidden under a higher layer, or it could be an adjustment layer of some kind that’s selected and the changes are not obvious. It IS worth checking that lower layers don’t have unwanted brush strokes so switch off the layer visibility for each layer until you’ve seen them all and you are sure there’s nothing bad lurking below! Then switch the layer visibility back on and click on the layer mask rectangle of the layer you are working on.
  • Another reason that “nothing” appears to be happening might be that you lowered the brush opacity and have forgotten to return it to what you now need, or that the brush is white instead of black, or vice versa. It’s worth checking your brush colour and brush opacity each time you start painting in a layer mask. I have got into the habit of hitting the zero (shortcut for 100% opacity) when I start using the brush, or at least checking my brush settings.

These are just some common mistakes but I hope they demonstrate that most problems can be sorted by calmly checking a few key settings and selections. It is not just your computer taking some kind of revenge on you!

Good luck using this new found skill. The more you use it and the more competent you become with your brush skills, the more you'll grow to love it. Before long you will be wondering how you ever managed without it.

© David McHutchison (Deemacphotos)
Menu by:Apycom jQuery Menus
Site hosted by Heart Internet