Skip to content

Latest commit

 

History

History
 
 

nuke

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

AgXc/nuke

Nuke native implementations of AgX.

Content

tool description
AgXcTonescale.nk tonescale algorithm of AgX (blink script based).
AgXcDRT.nk full image rendering pipeline for AgX
PrimariesInset (in external repo) gamut remapping algorithm, referred as "inset"

Instructions

installation

Common for all tools :

  • Open the desired .nk file in GitHub or download it locally
  • Copy to clipboard the whole content of the nk file
  • Paste into any opened Nuke scene

requirements

As of right now all tools are independent of each others and don't have external dependencies.

  • Tools were developed for Nuke15 but MIGHT work on lower versions.
  • Tools were developed on Windows but SHOULD work on other platforms.
  • Tools use the following nuke features :
    • blink script (compatible with non-commercial version >= 14.0)
    • python for some internal components but static (i.e only triggered on user press)

AgXcTonescale.nk

The tonescale is the per-channel "s-curve" algorithm that is remapping the luminance range of its input data.

The algorithm is the same as per originally defined by Troy: https://github.com/sobotka/AgX-S2O3/blob/daffcfa18edaa7172ce549cd25e80b7faadd8292/AgX.py#L192

screenshot of a 2D plot of AgXcTonescale in Nuke

PlotSlice node by Jed Smith

input/output

The tonescale expect log-encoded data as input.

pivot

The initial formula to calcule the x and y pivot specified by Troy was:

min_EV = -10
max_EV = +6.5
x_pivot = abs(min_EV / (max_EV - min_EV))
# >>> x_pivot = 0.6060606
y_pivot = 0.50

AgXcDRT.nk

Encode "open-domain" data to display.

Algorithm is based on the original Troy implementation with various additions, some personal, some from other AgX tinkerers (see credits).

For a full breakdown see my post on Blender-Artist AgX thread.

screenshot of AgXcDRT result in Nuke

input/output

Expect "open domain" data as input, with a linear BT.2020 D65 encoding.

Output a display-referred result bounds to the specified display that can be directly previewed or written to disk without any more processing (example: make sure the nuke view-transform is disabled when viewing its output).

plot

It is possible to visualize a 2D "slice" plot of the process by checking "Show Plot". A linear 0-1 ramp is being plotted and allow to visualize the effect of the tonescale and other grading operations.

  • The y axis is in [0-1] range and represent pixel "intensity".
  • The x axis is a 2D slice of the ramp where lower values represent dark values of the input and high values the white ones.

screenshot of AgXcDRT plot option result in Nuke

tonescale

"Luminance mapping" of the image with additional grading possibilities to emulate the color-shift of the analog film print process. Note the process MIGHT actually have no similarity at all with the film print process but the name was found to be pertinent and stayed, in lack of better term.

Original AgX implementation applied the tonescale a single time. This one can apply it 2 times, producing an extra softness that can be comparable to the look of analog film.

inset

Control the amount of chroma purity in bright values where higher values will produce a less chroma-intense look.

The default value of 0.4 might be a bit strong.

contrast

Control the contrast of the 2 tonescale curves. It is interesting to see them as working in tandem.

The contrast second only works when Apply Double Tonescale is of course checked .

print contrast

The tonescale section offer a creative control called "print contrast" that allow to shift the tones of your image. The intended use is to use different R-G-B ratios on the print contrast control, with the additional pivot control to refine further the look (do not hesitate to check Show Plot to have an alternative representation of your changes).

display

Pick the target display the image should be intended to be displayed on.

Developer

Check the ../.dev/implementations/nuke directory.

Credits