Fog in Darktable

DT 3.4.1

Contrarily to many people, I want to add fog in some forest photos.

I’ve been experimenting with the haze removal and the minus strength, but I can’t get it to be realistic.

Is there a better way?

Thank you

First this one:

Yes, use GIMP or Krita :wink:

You can (mis)use the watermark module to do some poor mans compositing. This does have a few drawbacks though.

  • The watermark module needs an svg (vector) file as input. So you need to convert your fog image to svg (inkscape seems a good choice),
  • The svg file is limited to max 9Mb (not entirely sure about the actual size, but it is around that mark),
  • The file has to be located in $HOME/.config/darktable/watermarks

Once you have imported it you can apply all the available masks and/or blend modes to massage it into place.

Here’s a quick and dirty video to show you how to do this using the watermark module:

Handy little module that you can use for all kinds of tricks.

5 Likes

The old free version of NIK that Google had worked as plugin in Gimp and they have a fog filter…it sounds like something gmic might have as well

Thank you. I downloaded your demo.

BTW, nice photos…

Thank you

The GMiC module looks interesting, actually the rain section…

Thank you

You might find this useful… https://www.youtube.com/watch?v=0CyFbDc3c3o

The lighthouse shot isn’t mine, credit goes to @Wocket. Taken from this pixls play raw.

It is a nice shot and lends itself well for doing experiments. I’ve used this image before (this color balance related topic).

darktable is not really designed for adding things. You want something like Photoshop, Gimp, Krita, Affinity…

Someone could create a simple module to do compositing on purpose in darktable…

To some extent, you can create the fog with the help of lowpass module by layering several instances using low opacity:

before:

fog1

after (in this image you can also see the setting for lowpass module):

fog2

A more realistic version can be obtained by first darkening the area where the fog is located:

fog3

5 Likes

Very interesting.

Upon thinking, I would have thought that lightening the fog are would be better, but obviously my thinking was wrong.

I will have to experiment with the fog.

Thank you

It depends on where the light source is located.

In cloudy, foggy skies the fog disperses the light in all directions and distributes it evenly so that the objects under the fog lose contrast and brightness. This in turn makes the fog appear brighter. The stronger the layers of fog, the brighter it appears.

1 Like

:slight_smile:

Thank you

1 Like

I’ve had some luck using Local Contrast but setting the Detail below 100% such as 90 or even 80%.

Could be worth having a play with the proposed “diffusion” module: