Clarity in darktable

Since I have a lot of time because of this crisis, I am experimenting quite a lot with different modules in the darktable.

One of the last things I miss in the darktable is a module to emphasize the local contrasts in highlights. What appealed to me was the combination of local contrast and haze removal modules. The problem with haze removal is that you have to be very careful or you will get unwanted artifacts.

I have just found a better way to improve local contrast by combining the local contrast module with multiply blend mode.

Depending on the image, sometimes it is necessary to have two instances of the module and second instance with multiply blend mode.

Here are some results:

Important controls are detail and midtone range which can be adjusted to the particular image. Also the opacity of the module should not be more than 50%. Optimal results, depending on the image are between 25 - 30% opacity.


Those are really interesting and I am going to experiment with them.

Not sure if it is one of yours to begin with but I use local contrast with a parametric mask as starting point to get this clarity thing working:

1 Like

I use the equalizer module with the clarity preset and the mix between 0.2-0.6.


In this case that is good. And in many cases the local contrast alone is sufficient. However - especially after using Filmic, the image often looks flat and hazy and multiply blend mode helps to improve this.

1 Like

Yeah, I noticed the flatness too. Not always easy to get that back and make it look natural.

I’m really curious about the examples you posted just now. Definitely going to experiment with those myself.

Thanks for doing the digging/hard work (again…).

1 Like

This is also a nice method which I like to use, but it lacks the possibility to additionally improve the hazy, flat appearance of highlights.

1 Like

I haven’t noticed flat highlights from filmic. Most of my raw files are quite flat to begin with, but I feel I’ve had no problems using exposure + filmic to get the image overall to a good point.

The images you posted all have two instances of the module. Did you use the default settings for the first instance?

Thanks for this @s7habo. I was just trying it with the girl and snow. You said at the start this was about highlights and I noticed this slider is at zero, which struck me as odd. Playing with this value, it seems to make little or no local difference to the snow to my eyes. And similarly with normal blending.

Is this to be expected with the local contrast module, or am I missing something?

I see now, I must actually correct myself. It’s not just about local contrast in highlights, but how the rest of the dynamic range and colors are affected. Let me demonstrate this with an example.

Here you can see a section of a wall of a house after the usual processing with exposure, filmic and contrast correction with color balance modules:

The image looks a little “washed out”; local contrast is very low and the image looks a little " hazey" (this can be seen very well on the window glasses, which have a white layer as if they had a very fine layer of dust)

If I now use the local contrast module to highlight details and darken windows, I get this HDRish look:

But if I just boost the local contrast in the midrange…

…and add a multiply blend mode, I get a visually pleasing result:

Please note the colors and brightness on the roof, walls and windows. Now you can see the flower relief on the wall even better, because it not only differs in contrast in brightness but also discreetly in color.

If I now increase the detail slider in the Local Contrast module, I get even more local contrasts in the picture without it looking very unnatural:

Actually I try to achieve something similar to what @heckflosse does in his thread here:

No. I’m still experimenting with the best way to combine this.

That was actually my mistake. It’s still about the highlights, but the other areas have to be influenced as well. I believe multiplication blend mode eliminates the changes that can be made with the highlights slider.


Thank you, @s7habo, for a brilliant advice!
I adopted it to this morning’s shot through the kitchen window,
showing an anemone hupehensis, ready to propagate.

Thanks to Boris’ advice, I was able to develop the structure of the “cotton”
much better.

Danke Vielmals!

Claes in Lund, Schweden


Thanks Boris for this amazing tip! :grin: This is working better than the clarity preset of contrast equalizer for me. Using a second instant in multiple mode also saturates the colours nicely.
I still have to play around with the sliders in this module.

Sorry, I just work up, so I’m not sharp yet, but what is your “preserve chromiance” (or similar) setting in filmic?

1 Like

Just playing with this some more by drawing a mask over a face in the second Local Contrast instance, i.e. the one with Multiply blending. This works nicely, however, experimenting with the blend modes, Difference is being applied to the whole image rather than just the mask. Other blend modes I’ve tried are restricted to the mask as I would expect. Anyone else getting this? Bug?

In the short time I’ve been playing around with this approach I have noticed it does does give good results but also adds more saturation. On previously processed images I’ve gone back to the colour balance module to reduce saturation.

Normally I add local contrast after the filmic/tone eq/colour bal. modules but will start playing with local contrast ahead of colour balance so final saturation levels can be fine tuned.

Many thanks Boris for the excellent discovery!

Interesting technique and convincing results in the series of images of the building……!

I some situations I think that it’s a problem that the multiply blend mode turns the whole image darker. This is especially a problem in winter shots. The snow should be white not grey (that is if you don’t have a coal burning power plant in the neighbourhood).

Look at the screen shot below. In this case the multiply blend mode (on the left) doesn’t do anything good.

But I realize, thanks to you, that it’s a great idea to combine the use of the detail and opacity slider in the local contrast module.

I rarely change it. It is default RGB power norm.

Might be worth a try if you’re not satisfied with the saturation after applying filmic rgb.

1 Like

Yes, it always depends on the subject, whether you use it or not. In your case, it doesn’t actually make sense.

I start to wonder if having a local laplacian working in scene-referred and blended with multiplication, by default, wouldn’t be more color-stable than the one we have now.