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ā€¦