first line in the list is different
thank you
Please take that discussion elsewhere, preferably check github and raise an issue if not yet reported. Let’s keep this topic focused on the agx module.
I’ll check it out later today, but I agree with @kofa that you’re better off with the master build, unless you were specifically testing this experimental variant. A lot can go wrong if your not careful, and I say that with some unfortunate experience… ![]()
I just saw it as an easy way to get a build. I don’t know how to get the master build.
A new build is published daily here: Release Darktable nightly build 20250929 · darktable-org/darktable · GitHub - open Assets, locate the Windows installer / Linux AppImage / MacOS dmg.
I installed the 0925 release using innosetup-experimental, and it worked without any issues. I then used that to duplicate dt on another drive. Then I tried it out. AgX is really nice to work with. I’m no wizard, but I found it easy to come up with a satisfying edit.
Thank you, thank you to Kofa and everyone else who contributed to this awesome module!
_DSC9808_01.NEF.xmp (6.6 KB)
I’ve closed the poll on the documentation. The future documentation will be based on the rewrite, which was preferred by most of the voters. Thanks for participating!
@s7habo has reported an issue using the ‘reverse all’ checkbox. I’ve fixed it and updated the branch. No other changes, no refresh from master this time; hopefully it’ll be merged soon.
https://tech.kovacs-telekes.org/dt-agx/Darktable-5.3.0%2B481~g8cb57b86c8-x86_64.AppImage
Thanks a lot for this great module! I really like how the curve can be controlled and by having the curve visualised, it’s very easy to understand what each slider does.
I’m late to the game (waited for it to reach master) and didn’t follow all the discussion, so apologies if this has been discussed already:
According to the docs, the “Look” section is applied after the tone mapping. That makes me wonder, does it actually need to be part of the module or could it also be a separate module, independent of the tone mapper (thus also reducing the UI space needed by agx)?
In either case, the controls seem to be very similar to color balance rbg. So could I also use that module instead to achieve the same (or at least very similar) effect? Or is there some fundamental difference?
I think you can hide it with a preference setting and you can collapse it so I don’t think its much of a UI burden. I find it really useful where as @kofa says he rarely uses it so both workflows could be supported ie hide it or use it… I’m sure I could further tweak the curve but sometimes a small and simple tweak to the offset or slope just adds a nice little touch…but that’s my use of it…I’m sure after some wider use there will be some room for streamlining or changes that become evident after an expanded set of testers… ![]()
color balance rgb is a very sophisticated module, and supports scene-referred editing. By default, it comes before the tone mapper, but if course can be dragged above. It expects linear scene referred input, so feeding it display-referred data may not be optimal.
As for separating out the look: moving it outside the agx module would create different results. Here is the order of operations and adjustments – notice that look is not the last element, and its location cannot be modified without altering the effect:
- linear, scene-referred data arrives in the pipe’s working space (e.g. Rec 2020 or whatever is set in the input color profile)
- if needed, it is converted to the selected ‘base’ space
- colours that are out-of-gamut for the ‘base’ space (RGB triplets that have any negative component in that space) are ‘slid’ into gamut (I use this term instead of compression, because in-gamut colour are not modified; it’s possible that a previously out-of-gamut colour ‘lands on top’ of an in-gamut colour). sigmoid does something like this, too, but the method is different.
- the ‘inset’ matrix is applied: this desaturates the colours (mixing channels into each-other), and rotates the primaries. This is the same as with sigmoid.
- the HSV representation is calculated from the inset+rotated RGB; we keep only the hue as reference. I didn’t check at what point sigmoid records the original hue.
- for each component, the same processing steps are executed independently (but, since the desaturation mixes channels into each-other, this means that in terms of the original colour, the processing is not independent at all):
- for input_x, log2(x) is calculated (log encoding) (x would be the value of the red, green or blue channel)
- the log value is scaled and shifted according to the selected exposure parameters, so the selected black point becomes 0, the white point 1, and incoming mid-grey (18%) ends up on the x-axis of the curve in a ratio BLACK_RELATIVE_EXPOSURE : WHITE_RELATIVE_EXPOSURE (by default, 10 : 6.5) (well, it’s not really grey, as we are processing a single channel…)
- the curve is applied; this produces and output that’s considered to be encoded according to the ‘gamma’. If you wish, think of it as a ‘virtual monitor’.
- the ‘look’ is applied (this is pure ‘display referred’, and is not even display-referred but in linear RGB encoding, but in ‘gamma’ encoding, like old-school editing in non-linear sRGB, but the gamma is whatever is set in the module):
- first the slope and the offset
- then the power
- finally the saturation
- these are inspired by the ACES CDL operations, but I’ve modified offset so it does not push the whole range up: it acts strongest on blacks, and becomes weaker for higher values
- the gamma-encoded data is linearised by applying linear = gamma_encoded ^ gamma (so it’s scene-referred 0…1, BUT the encoding is linear, like always in darktable’s pipeline; mid-grey is at 0.18)
- the HSV representation is calculated; its H and the original H are mixed together according to the preserve hue setting to produce the final hue. This does not guarantee complete preservation of colour, as the ‘original’ hue was already recorded after the input matrix, and after this mix, we apply the output matrix (see below), which again twists colours.
- the output matrix is applied, which:
- performs the rotation reversal (this is a difference with sigmoid: the latter always completely reverses the rotation, in agx, reversal is up to you)
- applies the purity boost (just like sigmoid)
- converts the result back into the pipe working space.
I hope that was detailed enough, without being too detailed.
If too complicated:
- conversion to ‘base space’, including gamut handling
- inset (desaturation) + rotation
- input hue is calculated
- log encoding
- curve
- look
- convert to linear encoding
- restore hue by mixing resulting hue with original
- rotation reversal, purity boost
- back to pipe space
Thanks for the detailed explanation, now it makes total sense to me.
Thanks for this in depth explanation. Could you comment on what the purpose of the insetting and outsetting matrices is? Sorry if the answer is in this thread and I missed it.
As stated above:
the ‘inset’ matrix is applied: this desaturates the colours (mixing channels into each-other), and rotates the primaries. This is the same as with sigmoid.
Rotation then means changing the hues.
And:
for each component, the same processing steps are executed independently (but, since the desaturation mixes channels into each-other, this means that in terms of the original colour, the processing is not independent at all):
This then ensures a nice path to white, so you don’t get weird colour changes, but rather everything goes white when exposure levels are high.
The outset (purity boost) can be used, as the name implies, the restore saturation (purity). The rotation reversal can be used to move the final hues where you want.
I am trying to understand and use the Agx in my test images. Reading the latest @kofa description and explanation of these new addition to the Agx, I rather see “after tone mapping” sliders when “revert all” checked.
This allows me to see the effect of the “revert all” check box. It also allows me to have yet another starting point for further tweaking. If intend is to save space provide a button/checkbox to hide.
I’m sorry, I don’t understand what you mean. Would you like to make the checkbox ticked by default, hiding the sliders? I won’t do that, as the idea is to provide a Blender-like experience out of the box. Create a preset with the checkbox ticked, and save it, have it auto applied.
Everyone: the internal data structure of the module will change a bit when itv gets merged. If you used this experimental branch, your agx settings will have to be discarded, the module will have to be reset. Sorry about that, but it is an experimental branch.
Sorry for not being clear. What I meant was: If I click the “revert all”, I rather see the post/after tone mapping slider but only revert them. This allow these sliders to be modified further and their actions.
There is a button for that: set from above.
