Recovering details in sunset photos: a darktable example

posted in: darktable | 0

When shooting a scene with very bright and very dark colours (a “high dynamic range”), it is hard to capture all the detail that your eye can see.

Sunsets are an extreme example of this. The sun is usually blown out, and any object between you and the sun is reflecting very little light and so is massively under exposed.

To a certain extent, this limits how much we can recover from a single sunset photo. Many sunset photos on sites such as 500px use a mix of multiple photos taken at different exposures.

However, if you only have one photo, you can still improve it a lot with clever post-processing techniques.

darktable’s Shadows and Highlights Module

Your host’s favourite Raw editor, darktable, comes with a nifty module for bring back these details. The Shadows and Highlights module can be found under the Basic group (as befits its usefulness).

darktable - shadows and highlights
The shadows and highlights module in darktable

Let’s take this not so great picture of the US flag at sunset from a recent trip to the USA:

darktable - shadows and highlights - pre

Because I shot the sun through the flag, this has reduced how blown out the sky is. However the mid-grounds trees are very dark.

After application of the shadows and highlights module:

darktable - shadows and highlights post edit

You could argue (and I would agree) that I have overdone this a bit. However I trying to show the power of this module. Here are the settings that I used:

darktable - shadows and highlights post edit settings
Shadows: 90, highlights: -30, radius: 50, compress: 87

The shadows and highlights sliders control the brightness of those parts of the picture. Positive values lighten, negative values darken. You can see that I bumped up the shadows to get more detail out of the trees.However I actually reduced the default setting of the highlights, because the brighter parts of the picture looked OK.

darktable - shadows and highlights - radius halo
Halo effect when radius of blurring is set too high.

The radius slider controls the amount of blurring of the areas whose colours are being changed. If the shadow/highlight sliders are only set to small amounts, you can get away with a higher radius. However, because I am trying to recover so much detail from the shadows, I had to massively reduce the radius, otherwise I got a huge halo effect at the transition from sky to trees.

You’ll notice I also increased the compression. This controls the percentage of midtones that are unaffected. Because I only wanted to adjust the very darkest areas I set it pretty high. Lower values meant that the highlights started brightening the flag which looked rather funny. A compression of 0% means the whole picture is affected; 100% means that none is.

The last two sliders have very minor effects and are usually just fine left where they are – they just control how darktable saturates the colours as they are pulled away from white (highlights) or black (shadows).

Further information

The darktable manual entry on this module.

Robert Hutton has a great instructional video demonstrating the use of this module:


Leave a Reply