Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nuke] AgXc DRT investigation #28

Open
MrLixm opened this issue Jan 5, 2024 · 3 comments
Open

[nuke] AgXc DRT investigation #28

MrLixm opened this issue Jan 5, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@MrLixm
Copy link
Owner

MrLixm commented Jan 5, 2024

This will act as a logbook for the further investigation of the AgXc DRT for Nuke that was release in v0.10.0.

I will note anything that I found that could help improve it.

@MrLixm MrLixm added the documentation Improvements or additions to documentation label Jan 5, 2024
@MrLixm MrLixm self-assigned this Jan 5, 2024
@MrLixm
Copy link
Owner Author

MrLixm commented Jan 5, 2024

print contrast

Test around the "print contrast" options.
The initial release put it after the second tonescale but before it is linearized.

testA

put the Print contrast sigmoid parabolic after the linearisation.

  • result: the pivot need to be adjusted to 0.355 to get a similar match with the original 0.65 pivot. A small difference is noticeable in the shoulder.
  • conclusion: I find it more intuitive as putting 0.18 as pivot is clear that anything midgrey will be neutral

image

test B

sandwich the sigmoid parabolic between Log Shapers (still after linearization)

  • result: create some weird bumps in the 2D plots around the toe part.
  • conclusion: forget about it

@MrLixm
Copy link
Owner Author

MrLixm commented Jan 6, 2024

outset

The outset is currently behind a linearize sandwich and applied after the first tonescale.
The amount is driven by a simple lerp (NodeWrapper node) between the input of the outset and its output.

testA

remove the linearized sandwich

  • result: the outset at maximum amount produces much softer result and avoid skews on problematic areas
  • conclusion: that should be the new default

testB

Test the effect of the second Inset (part for the second tonescale section).

For that we disable the second log shaper + tonescale.

The second inset has default value of inset:0.4, r: 0.06, g: 0, b: 0.06 while first inset has values of inset: 0.4, r: 0.125, g: 0, b: 0.15

  • result:
    • when the outset is at maximum amount, removing the second inset reintroduces skews around problematic areas
    • when the outset is at maximum amount, reducing the second inset with a lower valuer than the first inset reintroduces skews around problematic areas
    • swapping the outset and the second inset of order when the later has the same values as the first inset doesn't produce any difference

nuke screenshot without second inset

^ without second inset

nuke screenshot with second inset

^ with second inset, same global inset values as first inset (r,g,b inset are different)

nuke screenshot with no outset

^ removed the outset and the second inset

nuke screenshot with no outset

^ changed the second inset so its value perfectly match the first inset. It's a perfect match as if we remove outset+second inset.

  • conclusions: the second inset and the outset are actually not useful when the second inset match the first inset. An interesting result can be produced if the second inset use different r,g,b inset

@MrLixm
Copy link
Owner Author

MrLixm commented Jan 11, 2024

luminance compensation

Something I wanted to tackle since the beginning. I'm not even sure those words are accurate to describe the issue but again keeping in lack of better. This is of course in reference to the Eary and other Blender-Artist folks implementation: https://github.com/EaryChow/AgX_LUT_Gen/blob/main/luminance_compenstation_bt2020.py

While experimenting with grading under the AgXcDRT I stumbled on a cool side effect of operating on chroma in isolation of luma.
Let me showcase it :

nuke screenshot, no compensation

^ default AgXcDRT with no compensation

nuke screenshot, with compensation

^ default AgXcDRT with compensation applied

The effect is most visible on the green dragon cg render.

The algorithm consist in :

The algorithm is as follows :

  1. find luma using R-G-B weights computed from colorspace primaries and whitepoint
  2. extract chroma by dividing luma
  3. apply +1 offset on chroma
  4. apply 0.5 power on chroma
  5. apply 0.25 gain on luma to compensate for chroma change
  6. multiplying back chroma with luma to recombine image
  7. lerping 6. with luma calculated in 1. to only apply changes on higher values

Again no idea why it works, but it does.

issues

The observed issue with the current implementation are that it fix high values, but not low values as you can see on the green dragon. This can be addressed by removing the lerp with luma, but which create highly natural "brilliant" colors, especially the blue.

MrLixm added a commit that referenced this issue Feb 18, 2024
MrLixm added a commit that referenced this issue Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant