Editing moments with darktable

There is a pretty good one here…

https://discuss.pixls.us/uploads/short-url/qYoPNYBD23KtAvOwxhkBgy4qSPf.tif

1 Like

I think it is the same as the one I downloaded from here before sometime:

I think Boris mentioned in the previous episode that he had gotten it from @kofa , so that’s likely what I also have done, so I believe @kofa put that out in the open.

This grey scale appears to me, and I think the histogram confirms that, to have some local contrast added. Could be interesting to have such a gray scale also without it.

3 Likes

New episode: local contrasts in the highlights:

Many thanks to @europlatus, who provided me with some raw files for this video!
Two of them have been used in the video.

31 Likes

Alright I have a new @s7habo video and a new @nwinspeare video queued up. Time to strap in for a wild Saturday night! :sunglasses:

5 Likes

Another one, so soon! Many, many thanks. :smiley:

2 Likes

Boris ( @s7habo ).

First of all.
I fully agree with all the paeans about your videos, I think they are incredibly useful.

Now a small and very shy suggestion, a request.

I think it is not convenient for you to say the full names of some sections and it is not convenient for me to listen to the full names.

I will use an example. In the “Color balance RGB” module there are sections “Linear chroma grading”, “Perceptual saturation grading”, “Perceptual briliance grading”.
Instead of saying the full name “perceptual saturation grading - shadows” you could say “saturation - shadows”. In my opinion it would be much neater, simpler and clearer.

Thank You very much.
Darek

1 Like

Thanks for another great series of videos!

If I wanted to summarize all three in a single sentence, the gist is that one has to think about the tonal range that goes into the tone mapper. The tone mapper (either filmic or sigmoid) just maps a (potentially) infinite range of positive real numbers into a finite interval, the slope of this mapping is the “contrast”, but there is only so much slope to go around.

The default of sigmoid is a catch-all curve that can cope with everything, including extreme shadows and highlights, but it is not tailored to narrower tonal ranges.

IMO the sweet spot is around 5–6 stops of range for the key subject of the image and maybe ±2 stops around that for areas the photographer considers less relevant. Indoor images with diffuse light sometimes have this much tonal range, but outdoors on even an overcast day usually have much more.

Tone equalizer is a great tool for manipulating the tone range, my only gripe is that it would be great to automate the compress-expand pattern you use so often. It is not a big deal to have two instances though.

One area where the Darktable UI could be improved substantially is assessment of the tonal range. The tone equalizer has a histogram but it would be useful to see it (1) mapped to the image (eg with false color), (2) for each module. With experience once can usually figure it out (a lot of modules to leave it alone, more or less, and the decile markings in the waveform help a bit) but it is still indirect.

2 Likes

You don’t really want that. For me, the tone mapper plays major role in protecting the gamut, as you described above.

The possible compression should take place earlier, because sometimes you need the entire dynamic range to increase the contrast exactly at certain points where we actually need it.
This can sometimes mean that you even have to extend the dynamic range at a certain point in the brightness spectrum.

Let me clarify this using the example of the sea coast from the last episode:

The highlights with the clouds were completely out of the gamut. (Shown here schematically in blue):

The difficult task is not only to bring them into the gamut, but also to increase the contrast there in order to enhance the details in the clouds.

So, any compression would now be counterproductive, as we would have lost even more of the contrasts in that area.
This means that we first have to reduce the exposure of the entire photo without any compression until we have enough room to increase the contrast only in the highlights:

Now we increase the contrast only there to get enough details in the clouds. In this way we have effectively increased the overall dynamic range of the photo:

Now we have enough detail in the highlights (clouds) and can apply compression with a focus on increasing the brightness in the shadows. We already had enough detail (contrast) there from the beginning so we don’t lose a lot of detail through compression.:

Essentially, we had to dynamically control both compression and contrasts before passing the data to tone mapper. Tone equalizer is exactly the right tool for this.

11 Likes

After lens correction, denoising and adjusting exposure, I generally set filmic so that the white point is a little below max and the black point as high as possible, before the filmic curve shows the orange warning, in the thought that would give the most potential detail in the shadows. Then I’d use tone equaliser, Color Balance RGB, etc to adjust overall contrast and local contrast. But from what you’ve been saying, maybe that’s not the best way to handle things. I guess I’m slightly confused now on how the tone mapper provides guardrails on luminance levels while also managing contrast

1 Like

That “orange warning” depends also on other settings:

  • “contrast in highlights”, and
  • “contrast in shadows” (both in the “options” tab);
  • “contrast” in the look tab

If you use the “safe” option for the curve fit, or lower the contrast, you’ll see that orange warning much later, if ever (that warning only tells you that there is no monotone curve possible with the combination of settings you give, not that any individual setting is wrong).

Filmic forces three points: “middle gray”, black and white (which you set), then it fits a curve, with the slope at middle gray corresponding to the contrast setting. As the curve also has to be monotonous (it can only stay horizontal or increase going to higher inputs), the slope of the curve usually decreases towards highlights and shadows. That means that contrast decreases towards highlights and shadows. How much the contrast decreases towards the ends depends on the contrast settings, the range between middle gray and each end, and the type of fit you pick . That’s how contrast is handled.

The range is controlled by forcing input values not between the black and white limits to 0 or 1 (resp.)

3 Likes

Together with the two episodes before it, this episode fills a big gap. Thank you for that.

3 Likes

Thanks a lot. That’s some useful info. I understand in principle what filmic does. My main question is whether I’ve perhaps been using it in an inefficient way. I realise that’s a matter of opinion, somewhat, but was interested nonetheless what Boris, or anyone else thought. Cheers

2 Likes

This confusion comes from the fact that with Filmic you can control both compression and contrast and at the same time move both up and down along the dynamic range. And depending on what the scene looks like, you have to know where to put the emphasis.

In the scene I described above, you can use Filmic to compress the highlights more and thereby bring them into gamut. This solves the problem of overexposure, but leads to the loss of local contrasts or even the reduction of saturation in that area.

In the scene where the highlights do not play a role in the overall impression because the subject is in the middle gray range and the contrasts have to be good there, this is a quick and good solution, but in the example above it becomes difficult.

There are two ways to do this: either you have to adapt the tone mapper to the particular scene, or you use it in a “neutral” preset, practically as a “hard limiter” (like “neutral gray” in Sigmoid) and control everything else with other modules (tone equalizer, cb RGB, etc.) before the data comes to the tone mapper.

2 Likes

I don’t remember who to thank, but many, many thanks anyway to…

Whoever pointed out (perhaps in another thread) that one’s youtube resolution should be at least 1080. I had been struggling so hard to see the the darktable text. I guess I was probably missing a lot in the pictures too.

I think I set it much lower, a long time ago, when I had considerably less internet bandwidth, and never thought of looking.

[i’m-stupid]

3 Likes

Other than DT related matters, I have to thank @s7habo for making me realise I needed reading glasses. I thought for ages that it was just the resolution on my tablet screen…

3 Likes

Yes, I think I’ve been unconsciously oscillating between these two

2 Likes

I think there is a fine line between tone (brightness) mapping and gamut control. One could say a pixel (0.1, 0.3, 1.2) is not out of gamut: it is simply ‘too bright’, in a sense (the x and y coordinates still fall inside the gamut triangle on the xy chart (xyY = 0.1956835149, 0.1728201858, 0.32246).
This is true even though its brightness (Y coordinate) is only 0.1 * 0.2126 + 0.3 * 0.7152 + 1.2 * 0.0722 = 0.32246 – it is fairly dark, in fact. That is because its dominant component, blue, contributes little to perceived brightness: the blue primary (0, 0, 1) only has a Y value of 0.7152.

The values can be simply scaled (after linearising, if not yet in linear representation), and the pixel can be brought inside the gamut → e.g. RGB = (0.083, 0.25, 1), xyY = 0.1956221257, 0.1727984766, 0.2686458 (using those rounded RGB values, so there was a slight change to the xy chromaticity coordinates). Since it is not overly bright (see the Y value), another way to bring it inside the gamut is to desaturate it (bringing it closer to the neutral axis).

On the other hand, RGB (-0.1, 0.3, 0.9), xyY (0.1660477454, 0.187696668, 0.25828) is out of gamut: it falls outside the gamut triangle, and no amount of scaling will change that (well, apart from scaling all to 0). Desaturation (pushing it towards the xy values of D65, xy = 0.3127, 0.3290) works, without making it black.

If I understand it correctly, moving on a straight line from e.g. the red primary towards the neutral point, at first, only the primary is present, then we gradually increase B and G (adding the complementary colour, cyan), until they are equal at the D65 neutral point; after that, the primary starts decreasing, until it hits 0 at the gamut boundary, arriving at the pure complementary colour (cyan, in case of the red primary) - I tried to denote that using the thick purple line.

On the side opposite the red primary, beyond the B - G gamut boundary line, R values would have to be negative. Same for G and B, of course.

4 Likes

Thanks for the clarification @kofa !
One can see that you have immersed yourself in the subject. :wink:
I am looking forward to your AgX implementation in darktable. That will be awesome!

1 Like

I have not watched the latest episode yet but will hopefully get a chance today. But given the importance of Tone Equalizer in the Darktable workflow, I just wanted to point you to a potential redesign of the module here on Github: Some thoughts on improving the Tone Equalizer UI · Issue #17287 · darktable-org/darktable · GitHub

As a master of the software and one of the community’s tutors, it would be great to get your input on the design of this important module.

2 Likes

Thank you @europlatus, I am following the discussion. I have to digest all the suggestions there before I can participate. :wink:

2 Likes