Blender AgX in darktable (proof of concept)

Got some matrix / matrices wrong. Thanks for testing!

2 Likes

Here is the latest Win 11 executable:

https://www.dropbox.com/scl/fi/ghly9cbadomsfkz2f8vbr/darktable-5.1.0-799-gacd32886e8-win64.exe?rlkey=dc8o0lf0r7fq5vzgqmue9xfi7&st=i6yfswey&dl=0

I’m still getting the purple tones with the Lady in the Red Dress photo, but setting Preserve Hue to 0.01 corrects that, as before.

@s7habo

1 Like

Default settings + auto-tune levels now, after fixing the matrix issue I found tonight:

And ‘blender-like|punchy’:

And ‘smooth|punchy’:

4 Likes

The new build is here:
https://tech.kovacs-telekes.org/dt-agx/Darktable-5.1.0%2B800~g8927432265-x86_64.AppImage

@MStraeten , @Dave22152 , @priort : I’m sorry to bother you again; please update your builds.

1 Like

I had a feeling that was going to happen :wink:

1 Like

Yes, a syncing feeling, I know.

2 Likes

Yessss!

Now it’s working as expected. Good work @kofa! :+1:

Time for intensive testing… :wink:

1 Like

It’s trivial but doesn’t color calibration add a touch of gamut compression…would this interact or impact your results at all…I haven’t tried to see if anything is noticable. I guess AGX will just work on the input it gets and that would be part of it so no real issue

Hot off the press! Build 800 executable for Win 11 is located here:

https://www.dropbox.com/scl/fi/bd3dcet0p0azd5zdy545v/darktable-5.1.0-800-g8927432265-win64.exe?rlkey=j95gpit0cn0u74o91msor5yd8&st=xzkldubn&dl=0

5 Likes

These might be a few good test ones also from signature edits…

I don’t know what color calibration does. There is also some ‘sanitisation’ in color balance rgb, which tries to get everything inside Rec 2020:

At its output, color balance RGB checks that the graded colors fit inside the pipeline RGB color space (Rec. 2020 by default) and applies a soft saturation clipping at constant hue, aiming to retarget out-of-gamut color to the nearest in-gamut color by scaling both chroma and lightness. This prevents the chroma and saturation settings from pushing colors outside of the valid range and allows more drastic adjustments to be safely used.
(darktable user manual - color balance rgb)

In agx, I try to get colours inside the space selected in the output color profile module.
I can check if what color balance rgb does could improve the colour handling in agx. I’d also like to check Eary_Chow’s final solution for Blender.

3 Likes

Everyone: please, if you find a problematic image on signatureedits.com, share the download link (it seems to work just fine, e.g. https://drive.usercontent.google.com/download?id=1aUbaUq8TArNxWmjFSC-cE9uW8eUO-vVM&export=download&authuser=0), or (if you find you cannot repeat the download via the link), share the raw file via some cloud storage. Their licence explicitly allows that:

Signature Edits grants you an irrevocable, nonexclusive, worldwide copyright license to download, copy, modify, distribute, perform, and use raw files from Signature Edits for free, including for commercial purposes, without permission from or attributing the photographer or Signature Edits.

If you just share a screenshot of the image here, I have to spend minutes scrolling their site – or did I miss something?

1 Like

This photo is actually not problematic, but here it is difficult to get a good balance between saturation and good contrasts:

https://www.signatureedits.com/wp-admin/admin-ajax.php?action=useyourdrive-download&account_id=103498887174941726250&id=1etwSzt71blY-Ko2l8VYI3ZmVpsQFsJ98&dl=1&listtoken=d8b65b66692c59f215d41b174d2a67af

What I mean by that is the contrast in the face. Because the face is strongly illuminated by the red neon light, it is difficult to enhance the details in the face.

This shows the strength of the manipulation of primaries in agx. With attenuation and rotation of red, you can achieve very good results:

Before:

After:

2 Likes

here the macOS arm64 build:
darktable-5.1.0+704~g1acda16091_arm64.dmg

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

3 Likes

The current code has the following order of operations:

  • convert the RGB from pipe (usually Rec 2020) to output (usually sRGB / Rec 709)
  • make sure no values are negative (gamut compression)
  • apply the insetting and rotation (this reduces saturation)
  • apply the tone mapping curve; this usually also reduces saturation)
  • undo the insetting and rotation
  • return to ‘output’ space
  • make sure no values are negative (gamut compression)
  • convert back to pipe space (because subsequent modules expect that).

I’ve been experimenting with an alternative:

  • convert the RGB from from pipe (usually Rec 2020) directly to inset / rotated space
  • make sure no values are negative (gamut compression)
  • apply the insetting and rotation (this reduces saturation)
  • apply the tone mapping curve; this usually also reduces saturation)
  • the rest is the same

So far, I have found a single image where this makes a visible difference:

Details:

Any preferences?

The idea is that we have a lower change of negative values after the insetting (attenuation / desaturation), so we’d have to ‘fix’ less.

From the user’s perspective, without having tested it, it is difficult to make any statements. :man_shrugging:

Do you want a build with a checkbox to toggle between the two? :slight_smile:

Sure!