You probably already know the term mid-grey, or midtones: stuff that we perceive as neither ‘dark’ nor ‘bright’: the sky, away from the Sun; grass; many wooden surfaces. When Ansel Adams developed his ‘zone system’, he centred it around mid-grey (German Wikipedia: Neutralgrau – Wikipedia), which is defined as a surface that reflects 18% of the light. Here 100% would be defined as a surface that reflects all the light in a diffuse way, like white paper or a white wall; not like a mirror. However, in the world that we photograph, there are areas that are brighter than 100% diffuse reflections: light sources, or surfaces such as metal, water etc. that are almost like mirrors (called ‘specular’ reflections (German Wikipedia link: Reflexion (Physik) – Wikipedia)).
While our displays clearly emit light, so they are light sources, they cannot be as bright as the Sun, or the surface of the filament in a traditional light bulb. When printing, the situation is even worse, as paper is clearly a reflective surface, it cannot be brighter than 100%, by definition.
If we tried to represent light in a linear way, without compression, we may end up with something like this. Parts that are brighter than the display can handle are ‘burnt out’.
What we want is to be able to create a picture between 0% and 100% brightness that somehow resembles reality, even though in reality the contrast between the darkest and brightest parts of a scene is much larger than what paper or a display can produce.
If one were to simply scale the values equally (multiply pixel values by a number < 1), making sure that the brightest part of an image becomes 100% white on the display or the paper, the scene would be too dark. Here’s a screenshot using ART:
We could then add a curve on top to bring up the shadows. That is the traditional ‘base curve’/‘camera curve’/‘tone curve’ approach. A very bad attempt:
Luckily, our senses (sight as well as hearing) are (as far as I know, and probably only approximately) logarithmic in nature. That means, when the signal (light or volume) is multiplied by an amount (for example, doubles), we sense it increased by some amount (we perceive addition), not multiplication (for example, doubling). When the signal doubles again, we again perceive an increase by the same amount. So, it went from ‘10’ (whatever the unit is) to ‘20’, then from ‘20’ to ‘40’ (so it increased first by ‘10 units’, then by ‘20 units’), we feel it changed ‘x’ both times.
For sound volume, you are probably familiar with dB. That is also a logarithmic scale; the threshold of our hearing is defined as the base line 0 dB; a quiet room is 30 dB, a normal conversation is about 60 dB, a hairdrier 90 dB, a rock concert 120 or above. Even though physically the power levels moving the air are not 1:4 in ratio, we feel that if we take the difference between the threshold of human hearing to a quiet room, we then go again ‘as much’ from the quiet room to 60 dB (about the loudness of a normal conversation), then again to 90 dB (the sound level of a blender or hair drier), and once more to 120 dB, the rock concert.
Here is a plot of the ‘natural’ logarithm function:
At x = 10, the value is 2.3; at 20, about 3, so it increased by 0.7. At x = 40, the curve reads about 3.7; again, it increased by 0.7; at 80, it’s at 4.4, so it went up by 0.7 again.
With log tone mapping, you get this gentle curve that becomes less and less steep. There is more maths involved, but that is not so important.
Instead of darkening the image as shown above, we can apply the log tone mapping to keep the shadows visible, and map those bright parts (the sky, which is a light source) into the displayable/printable range:
However, you can also see that it also means you lose contrast. There is only a small portion where contrast is close to 1 (the black line is contrast = 1, the blue is the log):
.
One solution is to use a traditional S-curve, like the one I gave above, to place contrast wherever you need it. The other is a parametric curve, like Sigmoid. (filmic is another such curve, originating in the animation software Blender, I think, and also used in darktable in a modified form.)
If you open the curve explorer (also posted above), and only plot sigmoid (log-logistic), using contrast you can control how steep the straight part of the curve is. Contrast 1 vs 2:
With skew, you can control how much the shadows and the highlights are compressed. Notice when the line ‘leaves the ground’ and ‘hits the ceiling’. Skew: -2 vs 1:
(Edit: contrast is contrast (slope of a tangent, a straight line touching but not crossing the curve) at 0 EV; the slope at other points depends on the base contrast one sets, but also on the skew.)
How is that different from a traditional S-curve? The tricky part is that the y axis is in screen/paper brightness percent, but the x, the input, is in EV (so, at the bottom, you don’t see 1%, 2%, 4%, 8%, 16%, 32%, 64%, 128%, 256% and so on; 0 EV is mid-grey, the others are the given number of EV above or below it, so for each step the amount of light doubles or halves). That is where you can see the logarithm at play: a difference of 1 EV is doubling the amount of light, which we perceive as ‘it got brighter by the same amount each time’.
I do not know if this helped or confused you even more. Please let me know.