Local adjustments using Layer Masks in GIMP (Part 8 of 14)

Use a combination of layers and layer masks to make localised adjustments to specific parts of a photo. This installment shows how to use them to paint with light.

In the photo of the landscape waterfall, the rocks around the artificial waterfall are too dark because they are lying in the shadows of the surrounding trees. I want to lighten the rock features. Download the before photo and follow along.

This tranquil landscaped lake was shot in the Nijojo Castle in Kyoto, Japan.

This tranquil landscaped lake was shot in the Nijojo Castle in Kyoto, Japan.

I want to lighten only the rocks around the waterfall without affecting the trees.

I want to lighten only the rocks around the waterfall without affecting the trees.

Creating a lighter duplicate layer

First duplicate the background layer by clicking on the fourth icon at the bottom of the Layers dialog.

Lightening the rocks has lightened everything else as well, making the photo too harsh.

Lightening the rocks has lightened everything else as well, making the photo too harsh.

Brighten the duplicated copy by using Colors > Brightness-Contrast command from the main menu. You can see that in addition to the rocks, the other parts of the photo are lightened as well. That is the problem with global adjustments – when you lighten the shadows, the highlights get blown out.

For the moment, just concentrate on getting the brightness of the rocks right. Ignore what happens to the rest of the photo. I used a Brightness setting of 75 and Contrast setting of 45.

The duplicated layer has become lighter overall and more contrasty. It’s actually not bad overall but it gives the impression of a hot and harsh sunny day at the park. I prefer to convey the shadiness of the trees in the background and the tranquil ambience of the lake.

Adding a layer mask

Select the Black (full transparency) radio button.

Select the Black (full transparency) radio button.

Right-click on the name of the duplicated layer in the Layers dialog and select “Add Layer Mask” from the pop-up menu.

An “Add Layer Mask” dialog box pops up. Click the “Black (full transparency)” radio button and press the Add button.

In the image window, the duplicated layer disappears from view and you see the original darker photo in the Background layer.

In the Layers dialog, note that in the duplicated layer,  a small rectangle thumbnail has been added to the right of the layers thumbnail. It is a mask that determines which part of the layer is visible.

A Layer Mask is added to the duplicated layer in the Layers dialog.

A Layer Mask is added to the duplicated layer in the Layers dialog.

Black areas in the mask make the corresponding areas in the layer transparent/invisible while white areas make the layer opaque/visible. Grey areas make the corresponding areas in the layer translucent or partially visible.

At the moment, the mask is totally black, so the entire layer is hidden from view.

Painting with light
Activate the Paintbrush Tool to paint on the Layer Mask for the duplicate layer.

Activate the Paintbrush Tool to paint on the Layer Mask for the duplicate layer.

Select the Paintbrush Tool from the Toolbox. From the options below the Toolbox, select a Circle Fuzzy brush. Set the Foreground colour swatch to white. You can press “D” followed by “X” on the keyboard as a shortcut.

Now move the cursor over the rocks in the photo to be lightened and start painting. Because the layer mask is active, the painting actually occurs on the layer mask instead of the pixels in the layer.

And because the Foreground colour is white, painting on the layer mask reveals the corresponding pixels in the layer itself so that they become visible.

You can see the rocks lightening as you paint over them because pixels in the lightened layer is revealed as you paint white into the layer mask. You can also see the white areas appear in the layer mask thumbnail in the Layers dialog as you paint.

Adjust the size of the brush by pressing the “]” and “[” keys on the keyboard to increase or decrease respectively.

Painting back the mask

If you paint into the areas where you do not want to be lightened – like the leaves – and want to reverse the lightening, simply press “X” on the keyboard to toggle the Foreground colour to black. Painting on the layer mask now will hide the lighter pixels, so that the areas painted appears darker again.

If you find that painting on an area lightens or darkens it too much, lower the opacity of the Paintbrush Tool by dragging the Opacity slider in the Options below the Toolbox.

Alt-click on the Layer Mask thumbnail in the Layers dialog to show the mask in the image window.

Alt-click on the Layer Mask thumbnail in the Layers dialog to show the mask in the image window.

As you are painting, you can toggle the eye icon of the duplicated layer in the Layers dialog to compare how the photo looks before and after the adjustments. You can also disable the layer mask by Ctrl-clicking on it to see how the layer looks without the layer mask. Alt-clicking on the layer mask will show black-and-white layer mask in the image window itself.

Once you’ve completed the painting and lightened the rocks, you can still fine-tune the results by varying the layer opacity of the duplicated layer. Simply drag the Opacity slider near the top of the Layers dialog. This will reduce the overall intensity of all the lightening that you have done.

Maximum flexibility

This method of doing local adjustment provides plenty of control and flexibility. You don’t have to make a selection before making the adjustments. You can “paint” in the adjustments on the fly and reverse when you overdo an effect. You can tone down the opacity of the Paintbrush Tool to reduce the intensity and when the painting is completed, you can still control the overall intensity of the adjustments by varying the opacity of the duplicated layer.

What’s more, if you save the file in GIMP’s native .xcf file format, you can re-open the .xcf file at a later date and adjust the layer mask if you want change the adjustment.

Naturally, you can use this method for any type of adjustments – darkening, colour saturation, black and white toning etc. Just apply whatever effect you want to the duplicate layer and then use a layer mask to control how much of the effect shows through.

Tags: , , ,

Leave a Reply