Digitally apply a graduated ND filter to your landscape photos using GIMP (Part 9 of 14)

Instead of paying to buy a graduated neutral density filter and go through the hassle of carrying it around and fitting and unfitting it everytime you use it, simulate the effect using layers and layer masks in GIMP.

When taking photos of sceneries where the bright sky occupies the upper half and the foreground occupies the lower half, it can be difficult to capture the entire range of brightness levels to show the details clearly.

The park within the grounds of Nijojo Castle in Kyoto.

The park within the grounds of Nijojo Castle in Kyoto in autumn.

The sky has been darkened and the foreground lightened.

The sky has been darkened and the foreground lightened in GIMP.

The clouds and the sky can be too bright; while the mountains, trees and houses in the foreground may be too dark. This is made worse under the harsh sunlight of the midday sun when contrast in the photo will be at the highest.

The traditional way to get around this, is to avoid the midday sun, or to buy a graduated neutral density (ND) filter – if you own an SLR that allows filters to be attached to the lens.

The graduated ND filter darkens the upper portion of a photo so that the sky will not be overexposed while a brighter exposure can be used for the whole photo such that the foreground will not be too dark.

What if you use a compact camera, on which typically you can’t attach any filters? Or you find it a hassle to attach and unattach filters between snapshots? Or you simply don’t want to pay for another camera accessory that you have to carry around?

Using layers and layer masks in GIMP, you can pretty much simulate the effect of a graduated ND filter on the computer.

Simulate a graduated ND filter digitally using GIMP

I snapped the autumn colours of the park within Nijojo Castle in Kyoto from the top of the castle keep. The clear blue sky was rather bright while trees along the moat in the foreground of the photo were too dark.

Darkening the photo to darken the sky would make the foreground too dark. Brightening the photo to brighten up the foreground would overexpose the sky.

Duplicate two copies of the original photo in the Layers dialog.

Duplicate two copies of the original photo in the Layers dialog.

To control which areas to darken and brighten, first duplicate the original background layer twice by clicking twice on the Duplicate icon at the bottom of the Layers dialog.

Two new layers containing copies of the original photo are now created above the background layer. We will darken the upper copy and lighten the lower copy and then use a layer mask to merge the two layers so that only the darkened sky and the brightened foreground is visible.

Brightening the foreground

First hide the upper copy by clicking the eye icon to the left of its thumbnail in the Layers dialog.

Drag the middle slider directly below the histogram.

Drag the middle slider directly below the histogram.

Now click on the lower copy by clicking on it in the Layers dialog. Brighten the lower copy. You can use Colors > Brightness-Contrast I generally prefer the Colors > Levels command. I will cover this command in more detail later in the series.

In the Levels dialog box that pops up, look below the Input Levels histogram and drag the middle slider to the left until the foreground is suitably lightened. You can see the entire photo lighten as you drag the slider.

Pay attention to the foreground and ignore the sky which will become excessively bright. You can see the numeric value of the middle slider in the centre text box just below the histogram. I used a setting of 1.35

Darkening the sky

Select the upper copy in the Layers dialog by clicking on it. Turn its visibility back on by clicking on the where eye icon previously was.

The lower duplicate copy is lightened with the Levels command.

The lower duplicate copy is lightened with the Levels command.

The upper duplicate copy is darkened to make the sky more dramatic.

The upper duplicate copy is darkened to make the sky more dramatic.

Darken this layer using the Colors > Levels command.

In the Levels dialog box that pops up, drag the middle slider to the right until the sky is suitably darkened. Again, pay attention to the sky and ignore the foreground which will become excessively dark. I used a setting of 0.45.

Blending the two copies using a layer mask

Select the White (full opacity) option.

Select the White (full opacity) option.

Right-click the upper copy and choose Add Layer Mask command from the pop-up menu. Click the radio button for “White (full opacity)” option and click on the Add button.

A layer mask is now added to the upper copy. In the Layers dialog, you can see the thumbnail for the layer mask to the right of the image thumbnail in the layer containing the upper copy.

Activate the Blend Tool from the Toolbox. Reset the colour swatches in the Toolbox by pressing “D” on the keyboard. In the tool options below the Toolbox, make sure the “FG to BG” Gradient is selected.

Activate the Blend Tool from the Toolbox.

Activate the Blend Tool from the Toolbox.

Here’s the magic, click the cursor somewhere near the top of the yellow tree and drag the mouse vertically upwards until the cursor is just above the clouds in the sky before releasing the mouse button.

A black to white gradient is painted into the layer mask for the upper copy. The white parts represents the parts where the upper copy will be visible and the black areas represents the parts where the upper copy will be hidden. Grey areas represents areas where the upper copy is partially visible.

Where the upper copy is hidden or translucent, the lower copy will show through. The result is that the darkened sky of the upper copy will be visible while the lightened foreground of the lower copy will show through.

The layer mask shows the darkened sky and the lightened foreground.

The layer mask shows the darkened sky and the lightened foreground.

By painting in the layer mask with the Paintbrush Tool with black or white, you can further finetune exactly which parts of the darkened upper copy to remain visible and which parts of the lower lightened copy to show through.

You can further tweak the final result by adjusting the opacity of the two copies by dragging the layer opacity sliders for each of the layers. The layer opacity slider is found at the top of the Layers dialog.

You now have a pseudo-HDR (High Dynamic Range) photo which captures both the lightest tones in the sky and the darkest details in the foreground in a single photo.

Tags: , , ,

Leave a Reply