Magenta highlights vs raw clipping indicator vs filmic white level

The following image displays the tell-tale ‘magenta highlights’ sign of raw clipping:

However, as you can see, only the lamp(?) is shown as having blown pixels:

I know that there have been changes to the raw highlight clipping indicator recently, to avoid it being influenced by white balance multipliers. Do you think this is a bug?

(rev. ae5b7bd9c from the master branch)

(Licence: CC0 - Creative Commons)
2022-04-25_16-55-25_DSC_0524.NEF (17.9 MB)
2022-04-25_16-55-25_DSC_0524_02.NEF.xmp (5.9 KB)

@kofa I honestly cannot say, but
changing raw white point
from 15892 to 16384 gets rid of the

It gets rid of the raw clipping indication (since there are no pixels reaching that value), but the magenta stays.

I’ve also found that filmic with color science v6 is unforgiving with blown highlights. Here is a sunset with filmic defaults:

Simply adding desaturation using the extreme luminance saturation does not help, as the spot remains dark (darker than surrounding, not clipped areas, like the sky):

Here is the raw clipping indicator turned on:

v5 with its 3.8 default preserve chrominance = power norm looks like this:

v6 with preserve chrominance = luminance Y:

Of course, filmic does not know what’s clipped at the raw level; for it, highlights are values just below, and those above, the white level one sets. The sun disc is obviously considered to have ‘extreme luminance’, since it’s affected by the saturation slider; however, it gets mapped to something that is not extreme luminance at all:

(The dashed outline belongs to sample the area shown in the color picker; the one inside, the rectangle with solid lines, shows the white level picker of filmic.)

@anon41087856 – help me Mr Wizard, what’s going on?

Does filmic figure that the blown sun disc is an extremely bright, saturated magenta, and drop its brightness to keep the colour? But that means that relative brightness is not preserved in the image, does it not?

I can lower the white point, so the disc turns white:

But that’s quite ugly, still. I can tweak reconstruction to add a bit of blur, but…


Can’t access DT at teh moment…but these things are alway magnified by the default color pres norms…setting it to none usually brings the channels in line closer to neutral in extreme hightlight which is easier to manage…just watch how the parades or waveform shift in that area…do a restrict to selection…this shows it the best…and then cycle through the norms…

I know about the norms. Still, when I click a white level clicker, I expect that whatever I clicked will become white (v5’s desaturation took care of that). Aurélien will kill me if I utter the ‘i-word’, so I will not. :rofl: I’m just looking for the right way to use the v6 colour science. It took some time to get the hang of filmic, and what I learned with v5 is not (directly) applicable to v6, it seems.

Use highlights reconstruction module, guided laplacian, 5-10 iterations at radius 256 px.

Then in filmic highlights reconstruction, set threshold to 0 or -0.5 EV, bloom or reconstruct at 0, grey/colorful at 0, and possibly increase the number of “high quality reconstruction” iterations.

Somewhat better, but v5 or v6 + luminance Y are still better:

Could you please explain, why the bright sun disc gets mapped to a low brightness in Magenta highlights vs raw clipping indicator vs filmic white level - #3 by kofa ? Is that done to preserve the strong magenta colour caused by the raw clipping (the only way to preserve the hue is to reduce brightness and maybe saturation)?

Here is the raw file (CC0 - Creative Commons)
2022-05-01_20-04-21_P1070278.RW2 (10.5 MB)

The sun disc gets mapped to the norm of that shade of magenta. There is nothing done in particular, it just so happens that this shade of magenta appears dark in some norms.

If clipped areas do not have all the data I am wondering is no not the best option. Whatever the norm does to preserve hue must be based on having data from all the channels. In the blown areas you don’t so maybe a question is …is there accomodation for that or do the norms just make extreme highlight worse…often magenta

Or just use the real highlights reconstruction later. I tried the settings I gave you and I was only wrong on the number of iterations of guided laplacian (need 20 instead of 10), but it works great otherwise. Then filmic adds the extra smoothness

Could you please post your sidecar?

2022-05-01_20-04-21_P1070278.RW2.xmp (12,0 Ko)

Merci vielmal! - as they say it in crazy Swiss German. :smiley:


Funny I never rule out using the color reconstruction module (not highlight color reconstruction)…sometime is is absolutely of no help but in the case of this image it does a nice job on the sign where as fiddling with some of the others or a combination is not even as good… and with filmic sometimes the old legacy Euclidian norm can give a better result than the others…

Why am I not seeing these settings im my highlights-reconstruction module, I am running the current git version.

Show us a screenshot of what you have.

Bottom one…been there for some time now…


Yet, the same area is affected by the extreme luminance saturation slider. Shouldn’t those two be made consistent?
Or are the pixels to be desaturated evaluated first, and then the chrominance preservation code darkens it, and the desaturation is only applied afterwards?
Or is this not the issue that filmicrgb: fix norm handling in v6 by flannelhead · Pull Request #11480 · darktable-org/darktable · GitHub was meant to address:

Gamut mapping will preserve the color of the blue pixel and it results in a nasty-looking dark patch in the middle of a bright surrounding (think of e.g. lights where the center is clipped in raw).

The problem you have is clipping. Fix it with stuff made to fix it. The desaturation slider is not designed to fix it. If anything, favour the grey reconstruction in the HL reconstruction.

The fact that power norm and luminance behave better indicates that the fault comes from the norm (aka the 1D energy metric used to represent the full pixel), but since the desaturation itself applies the same no matter the norm, I doubt the error comes from there.

The scene-referred pipeline is becoming less and less compliant with mistakes as it becomes more accurate.

1 Like

Letting the Sun clip is hardly a mistake in exposing the photo, unless one wants to study the Sun.

I’m still puzzled by the extreme luminance saturation slider affecting those magenta highlights if they are dark according to the norm. But well, there are many things I’ll never understand, so I can live with that.