Blender AgX in darktable (proof of concept)

A new build is available. Updates:

  • I’ve added a new checkbox, keep the pivot on the identity line. I’ll rename it: it does the same as auto adjust hardness in filmic rgb: it adjusts the power/gamma used by the curve so the selected pivot (by default, mid-grey, subject to the pivot x/y controls) is on the ‘identity line’ of the graph. With it on or off, mid-grey is mapped to mid-grey (unless you changed the pivot x/y), but it does control the distribution of the contrast. You’ll see it moves the curve y gamma slider. So its effect is nothing new, but does the adjustment automatically. I’d like to ask that you try editing with it, and tell me if it improves your workflow for most images (it can always be turned off, and is not enabled by default, but I can do that if we agree it’s useful). If not, it’ll be gone.




    It keeps the pivot on the line when you drag the pivot x/y sliders or the relative exposure sliders, or when you use the corresponding pickers. Caveat: when you use a picker, and you don’t disable the picker before unchecking the checkbox, the gamma will jump. You can check and uncheck the checkbox to fix that; I hope I can find a way to remove this glitch.
    With images of extreme dynamic range, you may find this sets very high gamma, and you need to reduce contrast. An example:

    Blender defaults:

  • The log-only mode now preserves mid-grey (by applying a power function that makes sure 0.18 is mapped to 0.18 – pivot controls are ignored, as they belong to the curve, which is disabled by this option). Maybe that way this mode can become useful; what little feedback I have seen has generally been negative, so far. Let’s see if that changes; I will remove the log-only mode if there is no convincing reason to keep it.



    Note that the preserve hue option now affects the log-mode.
    Without (‘notorious 6’):

    With:

    That image from above:

Just like previously, the primaries are also effective in this mode, too.

As usual, the build has been updated with code from the master branch.

The Linux build:
https://tech.kovacs-telekes.org/dt-agx/Darktable-5.1.0%2B952~g78cc81807f-x86_64.AppImage

@MStraeten, @Dave22152, @priort: please update your builds.

11 Likes

Note: the log-only option probably does not make much sense.

vs


Why not? You can apply the curve after agx:

I don’t have to have it myself, but for others…

1 Like

If you are replying to:

Then because one can achieve identical results without the extra checkbox (see the comparison screenshots). It is no longer a pure log tone mapping, but one where the curve is replaced with an output = input identity mapping, which, it seems, is easy to achieve by manipulating the curve.

1 Like

Oh yes, I have understood it now :slight_smile:

2 Likes

Windows executable for build #952:

https://www.dropbox.com/scl/fi/1vrw8ifprfau65rc3rq7b/darktable-5.1.0-952-g78cc81807f-win64.exe?rlkey=kotem0m3m6bqqx5d7f6ny6hir&st=yfnwdblu&dl=0

3 Likes

recent macOS arm64 build (removing log only mode with Commit 8ba70c9):
darktable-5.1.0+825~g220bfc4f79_arm64.dmg

same comments as in Blender AgX in darktable (proof of concept) - #181

maybe provide a log preset, which is defaults + “keep pivot on the identity line” and contrast around the pivot = 1,00

2 Likes

At least on my ancient win10 PC, this version yammers about an unhandled exception. If necessary, I can provide the backtrace.

I’m afraid my knowledge of the code is very limited. I can say that it runs ok on my Win 11 machine. I hope someone can help with your issue

1 Like

A reproducer (raw + xmp), plus a description (what were you doing that led to the crash) would be useful.

1 Like

Good for me as well…

1 Like

It works fine on my win11 laptop now, if nobody else has issues, I would not waste anybody’s time on this. Thank you very much!

1 Like

It works on my Win 11 as well.

I’ve tried the ‘keep the pivot on the identity line’ on a few images I had previously treated with earlier versions of AgX. I found it gives a good starting point and I needed fewer adjustments to get a similar effect. Not a huge difference but still.

1 Like

Again, it would absolutely awesome if darktable users could use common high quality LUTs (which ain’t possible now). These usually expect Arri LOG-C, Sony S-LOG 3 or some other common log.

1 Like

Is the issue not with the 3-D Lut module ie it will convert the working space to one of the colorspaces it supports for use with what the lut is expecting so it won’t matter what you do in AGX…this module (3D-LUT) would need those log options added to the front end…

Nice work — the new module looks amazing!
There are really a lot of sliders, but for now, I’m using the approach from this post:
:link: Blender AgX in darktable (proof of concept) - #669 by s7habo

Maybe someone could make a short tutorial for the latest version?

I don’t use Darktable for cataloging, and honestly, I recently realized I wasn’t enjoying photo editing anymore — mostly due to lack of time. But with this new module, editing feels fast and fun again! :open_mouth: So I’d like to keep using it before version 5.4 is officially released.

I’m currently testing it with this approach, but it feels a bit slow.
What’s the best and safest way to install and run two versions of Darktable on Linux?

XDG_CONFIG_HOME=~/darktable-test-config \
XDG_CACHE_HOME=~/darktable-test-cache \
/home/grega/Darktable.AppImage

There are a bunch of cli switches you can run that specify the cache, settings, database, etc. locations. It is in the manual darktable user manual - darktable

4 Likes

The module was not intended to implement such support. The fact the it includes log and power steps, which, with a ‘straight curve’, allows it to do something log-like, may make it useful to apply other curves or LUTs on top, but that’s just a happy coincidence. All those additional ‘log’ encodings would need specific development, which will not happen in this module, I’m afraid.

3 Likes

Many thanks for this new build @Kofa.
I’m not sure I can give feedback on this new checkbox yet because I’m still working out how best to use the pivot controls. I understand conceptually what the pivot is doing, but I’m not sure when it’s best to move it, and what specifically the pivot Y slider does.

The pivot is by default set to middle grey, and the advice for Filmic RGB is to set your middle grey with Exposure rather than mess with it in AgX. Does this advice still stand for AgX?

I understand that the pivot X slider moves middle grey (0.18) towards either black or white. So, rather than at 0 EV, you can set it at a lower EV to brighten the image, and higher to darken the image.
As for the pivot Y slider, is that essentially saying that middle grey is no longer 0.18 but rather a different value? And if so, when might you want to do this rather than just move pivot X?