Introducing a new color balance mode in darktable


(Elle Stone) #66

What does grading involve? I think by grading you mean applying a look to the scene-referred image/footage? Perhaps using a LUT?

And I think you are saying grading is done?/is best done? on log-encoded data rather than linearized data?

What does “display-ready transfers” mean? I think you are talking about taking the already-graded image/footage and applying a LUT to map the graded output to make it suitable for display on a preselected display device?

(Aurélien Pierre) #67

grading is that powerful technic :

(Alberto) #68

Hi @aurelienpierre, thanks for the link! Very informative. I think it would be very interesting to see how this translates into a darktable workflow using the new tools that you are developing. A little demo would be a great way of highlighting the advantages over a more “traditional” (“display referred”? “wrong”?, I don’t know how to call it actually :slight_smile: approach.

For my part, I tried to work with the tools that I know, which is essentially just RawTherapee. Here’s my way of trying to emulate what is shown in the tutorial you posted (just to be clear: without any ambition of being comparable!):

And here are the before and after pictures. The raw file is at I think it should be free to use, it’s part of the RT test images – if not, I hope @Morgan_Hardwood will clarify.

What would be the darktable way? Thanks!

(Morgan Hardwood) #69

@agriggio very good video! Demonstrates how to use the new tool in an easy way using a real-life example.

Note that the video wouldn’t play the way it is embedded in the post. I had to right-click on it, “Copy video address”, then go to that address.

I took the photo and feel free to use it for open-source testing purposes.

(Alberto) #70

Thanks for confirming! :+1:

do you know the proper way of doing that? I simply added the link, pixls did the rest… but if there’s a trick to make it work, let me know and I’ll edit the post.

(Morgan Hardwood) #71

I think you did it properly, the forum software just failed to work properly.

(Aurélien Pierre) #72

It translates in darktable straightforward, the only difference is the 2.5 D color wheels of Resolve are 3 × 1 D sliders in darktable. I hade even embedded a default style to produte just that teal-orange look.

(Alberto) #73


I’d still love to see it in action… do you have examples that show to the uneducated (that would be me) the benefits? I’m trying to understand. I know you posted some examples earlier (or maybe in a previous thread) but iirc there was no raw/source pic attached to try things out. thanks in advance!

(Aurélien Pierre) #74

@phweyland, are you using colord or xatom to fetch the system display profile ? I think I have spotted a bug with xatom that applies the gamma correction of the display twice on the same picture. Using colord, I still get wrong color picker values (but that’s expected, and I know why - bad but under control), but the image looks as it should. Can you reproduce ?

@agriggio sorry, no time for that at this point, feature freeze is coming, and big colorimetric errors need to be fixed asap. Critical stuff (at least for me).

(Alberto) #75

no worries, I understand. fwiw, I just implemented a basic log compression in (my copy of) RT, so I can experiment while trying to understand what’s going on… I’ll report here when I have something if anyone is interested

(ph. weyland) #76

Sorry, I don’t know and I cannot check for few days. Not sure that I can choose on Windows, but in any case I’ve kept the default value. I’ve tried to select the specific monitor profile but dt doesn’t retain it from one session to the other.


Some little info ? :slight_smile:


Grading could be just the simply rgb curves or brightness/contrast sliders.

I interpret it in this way:
“You can grade on Log too with benefits compared to grading rec709 gamma transfers where the tone distribution is intended for viewing and not for processing( with a base curve and a lot of post processing like jpegs from camera).”

(Pat David) #79

@Morgan_Hardwood, @agriggio - I’ve manually just dragged and dropped the video into @agriggio’s post so the file is hosted here now and should embed fine.

I’ll investigate why it didn’t fetch it.

(Aurélien Pierre) #80

What about some results ?

This is with default orange-teal colour-grading I have added as a preset in the color balance, + the filmic module I have developped these last few days with the help of Troy Sobotka (who is now estranged from here and yet was one of the few helpful, accurate and relevant contributors).

(Alberto) #81

@aurelienpierre, really good! :clap: :clap:
looking forward to trying this out

Introducing the filmic module in darktable
(Carmelo Dr Raw) #82

I have started to code a color correction module in photoflow, based on the ASC-CDL formulas, with the idea of making it compatible with the DT tool (I.e. same parameters = same output).
However, the DT code seems to deviate from m the recommended implementation in at least two places:

  • if I understand correctly, the RGB parameters are always re-normalized to keep the luminance unchanged. Is that correct? Would it makes sense to make this optional?
  • looking at the code it seems to me that the saturation step is applied before the SOP. However, all the documents I have found recommend the saturation adjustment to be the last one. Maybe I have mis-interpreted the code?

(jo) #83

oh wow. if that is the case i think we very much want to get things straight before a release :slight_smile:

in either case can’t hurt to discuss this exactly. can you point us exactly to the text of the spec and the lines of code you think are not in line?

(Carmelo Dr Raw) #84

I am mostly referring to this post, where Troy mentions:
Also note that blender does not provide functionality to affect saturation as part of the CDL node.To control saturation on scene referred data a custom node group needs to be created to operate after the CDL node. Maybe a topic for a new question

Conversely, the saturation is applied at the beginning of the operation in DT:

Here are a couple of examples of the re-normalization of RGB SOP parameters:

Hope this helps…

EDIT: another document describing the reference implementation:

(Aurélien Pierre) #85

The CDL transfert function in darktable is the standard one.

What you have seen, the luma correction, applies on the user input (interface) since we have HSL and RGBL interfaces, you want your HS/RGB parameters to affect only the color since you control the luminance separately. That would be super weird to control the module from the HSL interface and see the changes on HS affect the luminance.

The ASC CDL normalizes the transfert function, it doesn’t say anything on the UI implementation.

As for the saturation, darktable has other modules to control the saturation after the color balance. The interest of the saturation before the CDL is it allows split-tonings effects, by desaturating first, then changing the colors selectively.

darktable 2.6.0rc0 released