Ok, I’ll try to illustrate what the tool does in a simple, visual way.
For simplicity, I will not consider highlights precompression, regularization, and saturation control. These are just additional controls to fine-tune the tone mapper which do not change its fundamental behaviour.
For this, I will use a synthetic image, consisting of different bands of grey of different brightness. More, specifically, the image is in linear Rec.2020 color space, and the grey bands are exactly 1 Ev apart (meaning, that to get from band “i” to band “i+1”, when counting from the top, you simply multiply by 2 the value of the pixels). Here is the image:
mid.tif (3.4 MB)
There are 20 bands in the image, and the central one (the 11th) correspond to the “standard” mid gray with a value of 0.18.
Essentially, what the log tone mapping tool does is to remap the values of the image so that the following hold:
- the selected “white relative exposure” (i.e. the value that is obtained by applying an exposure compensation of the given Ev stops to the middle grey value of 0.18), is remapped to 1
- the selected “black relative exposure”, corresponding to the user-selected number of Ev stops below middle grey, is remapped to 0
- the input middle grey, obtained by applying the selected “gain” to the standard mid gray of 0.18, is remapped to the “target grey point” value.
In its default configuration, this is essentially an identity operation, because:
- the default “black relative exposure” is -13.5, and 0.18 * 2^{-13.5} \approx 0
- the default “white relative exposure” is 2.5, and 0.18 * 2^{2.5} \approx 1
- the default target grey is already 0.18, and the default gain is 0, so both the source and the target grey are already 0.18.
If you move the sliders, the following will happen:
- increasing the “white relative exposure” will shift the white point, causing a higher compression of the highlights, leaving the mid gray unchanged;
- changing the gain will move the source gray point, and as already discussed is equivalent to apply an exposure compensation to the input;
- changing the target gray point will affect the brightness of the midtones, leaving the white and black points unchanged.
I made a video that tries to illustrate all of the above. Hope this helps.