darktable's filmic FAQ

Don’t you mean 50% here? As I understood it, 18% middle gray is the value before the view transform…

1 Like

Once you apply the display encoding, usually a power 2.2 or 2.4, 18% becomes 46-50%. The view transform does not necessarily contain the display encoding, it depends (and filmic does not by default), but the display encoding is decoded anyway before it enters the screen, so it’s a no-op over the whole pipeline.

So, display-referred middle grey is always 18%. Then, you add or remove the display encoding at your convenience, and the blending modes indeed expect that display encoding on.


First of all, many thanks for the explanation.

If I have understood it correctly, channel mixer is also one of the scene-referred modules that should be placed before the filmic

And now let’s look at this case:

This is how the photo looks with the channel mixer switched on (destination lightness) - as it is set by default - before the filmic:

And this is what it looks like when you put it after the filmic:

What is going on here?

I would just guess, as it’s known that the old channel mixer has issue - clipping, that this won’t happen with the reboot-channelmixer.

1 Like

Yup. The current channel mixer has a faulty implementation that clips RGB at 100%, and various other internal mistakes (wrong parenthesis in the computation, use of HSL instead of HSV, etc.)


I have found that I can preserve more colours in highlights if I switch filmic to
look: contrast: 0, latitude: 50%, shadows/highlights balance: -50%, middle tones saturation: 0, options: contrast in highlights and shadows: soft
This results in a flat tone mapping ‘curve’, with colours retained for all but the brightest spots.
I set scene white/black as usual.

Then, in colour balance, I adjust saturation and contrast, darken the highlights if they’re blown by the contrast change, and adjust midtones if they got too dark because of the highlights change.

@anon41087856, is this a technically valid way, or is it going to bite me? I’ve only tested it on a couple of shots (cloudy mountain landscapes, lots of haze). I seem to get better details in the clouds, and more saturation in the sky.

1 Like

Filmic with contrast = 0 falls back to a simple log/gamma tone mapping. Basically, you disable the tone curve. If that’s the look you are after, then ok, but mid-tones will usually lack local contrast, especially for large input dynamic ranges.

1 Like

OK, thanks.
Speaking of contrast:

We know from statistics that roughly 50% to 80% of the details (and likely the subject of the picture) will reside in the tonal range [middle grey - 2 EV ; middle grey + 2 EV].

If I have a picture with 8 EV dynamic range, and another with 13 EV, and I set the same contrast in filmic, I’ll end up with much more contrast around mid-grey in the 8EV picture (the same 0% - 100% output range is distributed over 8 EV, with let’s say 1 EV toe for shadows and another for highlights, each (just an arbitrary number) with a 10% total output range, leaving 80% linear spread across 6 EV, so the slope of the curve is 80%/6EV ~= 13%/EV; whereas for the 13 EV case, it’s 80%/11 EV ~= 7%/EV). Is this correct? Would it make sense to alter filmic in a way that one sets the contrast around mid-grey in %/EV instead – would it be more consistent in terms of mid-tone contrast? Or is this achieved (more-or-less?) by auto-scaling hardness (keeping in mind that hardness is not the same as contrast)?

I tried to clarify myself how the different parameters in Filmic impact the mapping and created the following picture. Have I understood things correctly? (The compression of blacks and whites caused by the S-curve doesn’t show well.)

1 Like

(global) contrast is related to the slope (or gradient) of the curve, not to the width of the latitude section. The latitude defines the portion of the curve that is linear, ie. which has constant slope (you could say the global contrast across that region is constant). Outside that latitude region, the slope becomes less, meaning that the contrast will be decreased in the shadows and highlights. This is what we mean when we say the highlights and shadows are “compressed”.


Also, outside the ‘latitude’ region, desaturation kicks in.


In the S-curve it is the slope, but in this view, doesn’t the slope translate to the width on the source side? More contrast means steeper curve and that translates to shorter section of the source is mapped to the target latitude and when the slope is less larger section of the source is mapped to the target. I tried to illustrate the compression but I should have had more “boxes” on the source side. Now the compression is hard to notice.

You are right. I tried to illustrate only the luminosity, and I intentionally ignored the saturation from my picture. I should have commented that.

What you say is true, but that is not clearly indicated on the diagram. Really, when we talk about these sorts of mappings and gradients, the normal tool we use in maths is calculus, and typically we will plot a curve where we show the rate of change of one variable against another (basically a transfer curve). This is what the original basic “look” curve of filmic is trying to illustrate. The “zone” visualisation is really just to give a bit of an intuitive feel for what filmic is doing in qualitative terms, but if you want to analyse the behaviour in a more quantitative way, it might be better to stick with the traditional transfer curve representation and use the basic types of analysis techniques that we learn in high school when dealing with these sorts of functions and curves.

1 Like

You want me to materialize the bounds of the latitude on the graph ?

I wasn’t thinking of that. I tried to clarify the logic to myself. Will the graph become too crowded?

I’m an engineer myself so the x-y graphs are very familiar. I tried more to create a qualitive visualization how Filmic operates.

It will become crowded. Question is : is it worth it ?

Like that ?

1 Like

Ok merged.