3.4 Scene-referred workflow bad bokeh highlights reconstruction

clipping means - information is gone. So don’t use this if you want to reconstruct something later.
reconstruct in color, if the clipped channel is not that important - reconstruct in Lch if very bright highlights near white can contain remaining structure

2 Likes

Thanks for the helpful clarifications!

“Well thanks for pointing that out! I have been quite unsure recently about the two methods to reconstruct highlights (the module, and the options contained in filmic rgb) and after reading your post I went to the new manual and I have “discovered” that in fact it’s better to deactivate the module if one wants filmic to work better in terms of hl reconstructions:”

Actually not entirely true…See AP’s comments in this thread…sounds like this would be true only if set to clipping otherwise it can be useful. I recall he had stated that in one or two of his videos…but he comments here with explanation so no need to go and look those up…

1 Like

@garrett
“I gave it a try in freshly-released darktable 3.4.0 with the scene-referred (linear RGB) workflow & new-style color balance (using color calibration).”

While it may not reflect the actual scene given all this light…I like these skin tones on the subjects the best…nice edit…

1 Like

I have read through all the replies of this interesting thread. Thanks to everyone. I learned a few things.

Now, the default in Highlight Reconstruction module is clip highlights, should it be changed? AT least if the user’s default is scene referred.

1 Like

IMHO, no. It’s a sensible default when you are not using highlight reconstruction in filmic, and it gives a decent results when you have small clipped areas (like lamps) that you might not want to bother to correct.

As larger clipped areas are either an error while taking the image, or a (necessary) trade-off, highlight reconstruction should be rather rare. No reason to have a default adapted to a less common situation.

you can define a preset to be applied as a default:

1 Like

Remember it’s always harder (and sometimes impossible) to recover clipped highlights than underexposed shadows or midtones.

ART
exposure -1.3EV, tone curve, some local contrast on heads

detail

2 Likes

huh, the ART/RT color reconstruction is quite good. @agriggio could you point me toward the source code of that feature ?

Happy New Year !

3 Likes

This comes straight from RT:

Although I can follow the basic idea of the algorithm (well, easy since the main steps are documented…), I could never figure out its details sufficiently well to be able to fix some of the artifacts it produces in some cases… :frowning:

1 Like

It’s also in librtprocess, which is probably easier to use stand-alone:

1 Like

Thanks ! From afar, the box blur - image is actually an highpass, then it deals with RGB ratios and propagate gradients in the clipped areas, so it’s very similar in principle to the filmic reconstruction. I wonder why the results are so different.

My half-drunk guess (oops, the bottle of Champagne is dry adready ?) is:

    constexpr float threshpct = 0.25f;
    constexpr float maxpct = 0.95f;
    constexpr float epsilon = 0.00001f;

should probably not be hardcoded if you want to adapt to any case. But then… you would have to add more technical GUI sliders, which is not ART’s philosophy.

What I’m interested most is avoiding the harsh transitions that sometimes occur from unclipped to clipped. I tried various sorts of blurring, but that’s a sort of band-aid which works only in some cases… so far, I have not managed to pinpoint the actual cause of the discontinuities, which would be the first step towards a proper fix.

Indeed, I’d prefer to avoid that. But first, I need to have a deeper understanding of the code, not just a superficial one like I have now

It seems that this transition is driven by the threshold:
float hipass_ave = 2.f * hipass_sum / (hipass_norm + epsilon);
in which epsilon is hardcoded, so I bet you need to change the epsilon value.

1 Like

I had a stab at it, thanks for the practice image! XMP attached, Darktable 3.4:

Bokeh details:

hilights2

hilights1

XMP:

A7C02846.ARW.xmp (25.5 KB)

3 Likes

I tried as well, seems I still struggle to get a good colorCal…
Besides lights are ab tad too yellowish (compared to other renditions, anyway I havn’t been on scene), I am quite satisfied…

darktable 3.5.0+291~g204bf8a7b


A7C02846.ARW.xmp (15,8 KB)

Hi again,

Hmmm…my understanding was that epsilon here is only a safeguard against div by zero, but of course I might be wrong. However, I tried changing it and it doesn’t affect the kind of artifacts I’m after. I’ll post a few examples asap to show what I’m talking about