Creating a false fog effect with the Haze Removal module

I have made a short You Tube video showing how I use the Haze Removal tool with a division blend mode of a mask to create a fog effect.
Enjoy! :grinning:

9 Likes

Nice. Wonder if this would work with diffuse & sharpen, though that’s quite processor intensive. Also wonder if mask can be adjusted further with details threshold or that would just break the fog effect. Cheers

Thanks for your comments. I frequently use the detail threshold with masks to increase contrast. I think that would be counter productive for this effect as fog tends to soften detail and contrast. I have seen a video ( I think it was one by Aurélien PIERRE) using the diffuse and sharpen but (IMO) was not as convincing or effective.

Yeah, that makes sense

1 Like

Have you compared it to just using negative dehaze instead of using positive dehaze and then the divide blending mode? I’d be interested to see if there’s a big difference.

Edit: Just tried it myself. Negative dehaze doesn’t do anything particularly realistic. And I actually had strange behaviour using the Divide method showed in this video. Some of the colours were inverted.

But I did get a convincing result from using the Addition blending mode along with the Diffuse and Sharpen Bloom preset (with some extra iterations), and Contrast Equalizer with all the nodes pushed down to smooth.

Contrast Equalizer:

Diffuse or Sharpen:

2 Likes

@europlatus Thanks for your comment. I have tried the D & S module without great success. If you watch my video to the end and look closely, you will see artifacts when cranking up the dehaze strength slider positively whilst using the divide blend mode. I have used this technique since making the video and It seems to work best by using the blend fulcrum and opacity sliders and leaving the strength at its default. I have also tried to use the strength slider toward the negative without any blend mode of a gradient but it was not convincing.
However, I will try the addition blend mode. Thanks.

@europlatus I have just revisited this technique and found using the addition blend mode does nothing when using the dehaze module. Also it’s best to leave the strength slider at its default setting and just use the fulcrum and opacity sliders.
you can also produce a ‘layered fog’ effect by using a 2nd mask above the gradient and setting it to ‘difference’ in the mask manager.
I did try the D&S module with bloom preset, extra iterations and addition blend mode which just seemed to adjust the brightness. Using the divide blend mode produced ugly artifacts .

I’ve found D&S to create quite convincing results.
Here is a version using the Addition blend mode. This creates a brighter, more misty effect:

And here’s another not using any blend mode, which creates a more foggy look:

Notice how this is NOT using the Bloom preset, but using more aggressive diffuse parameters. It can be adjusted using iterations or the opacity slider.

Admittedly, I’ve spent about 10 mins in total testing all this, so I don’t know how robust any of these techniques are on multiple photos. But from what I can tell, I’m not convinced that the Dehaze module is best.

if it’s just the effect then of course it doesn’t matter if it’s realistic or not :wink:
if it’s about a quite realistic result then the d&s approach is better since that module mimics the physical processes by fog: diffusion
so it’s not about better or worse but about approriate or not.

Many tutorials have the flaws of merely demonstrating one method to achieve a result without explaining why this specific approach was chosen over others.
Especially most of those “how to do <…> with darktable” tutorials / books - often resulting in a quite unsatisfying results since it’s done like in Lightroom using modules named similar to Lightroom …

the more important ist discussing those different approches here in context of the expected result …

@ europlatus and @ Mstraeten I don’t think the D&S does look like fog, more like a light mist. With a heavy fog, the very distant mountains would be invisible which is what I was trying to simulate. The reason why is to create minimalist compositions and remove the distracting background. However, if mist is what you’re aiming for… :grinning:

Perhaps you have produced better tutorials?

Here it is with iterations bumped up to 4:

But ultimately, you should use whatever gives you the effect you want and which module you prefer to use, of course. That’s the beauty of darktable.

I’m just playing around to see what works and what doesn’t. The Divide blend mode with Haze Removal can give some weird inversions:
image

Yes, using the dehaze strength slider does give these artifacts some times, that’s why I on;y use the fulcrum and opacity sliders. :slight_smile:

The screenshot I posted of the artifacts was using the default Dehaze strength (not touching it) and only using the fulcrum and opacity sliders. I haven’t tested it much, but that’s my experience so far.

A tad abrasive, no?

Sometimes an option when the opacity will be significantly less than 100 is the reverse blend mode as well…

I have just spent like 30s of curiosity to see what it would look like and to see if it might be an option as well to modify the effect… I remember Boris @s7habo at one time used reverse multiply in his edits…nothing to do with fog by the way but I thought I would check reverse divide …

Start…

Add a little mist or fog

Switch blend mode to reverse…socked in…

These are not in any way examples of a great edit just showing trying to show the potential impact for trying to use reverse blend mode when you are working with lower opacity for a modified outcome…

2 Likes

Thanks Todd. I looked up reverse blend mode and it implied the multiply blend mode. Is that what you mean?

No its reverse divide… the blend order of input and output is reversed for the selected blend mode…

I found the ‘toggle the blending mode order’ button. Never noticed it before. In any case it seemed to have no effect when using divide blend mode.

Yep…its in the manual but not very clear to the casual person I guess… there is a little icon to activate it….

https://darktable-org.github.io/dtdocs/en/darkroom/masking-and-blending/blend-modes/

Change opacity…you will see a difference then between modes or you should…

Usually the visual effect is something like standard blend mode state impacts only the masked region where as when you reverse it you can see an impact outside the masked area as well due to the order of the blending…