Nuke Custom LUTs


Our post-production facility recessives DPX plates with .3dl LUT file from DaVinci Resolve. The LUTs were for two different cameras one of which is ARRI Alexa and another is RED. The task is to apply this LUTs to every dailies rendered by all artists.


First, we need to create a gizmo for each LUT which contain Vector Field Nuke node with the following expression in the “fectorfield file” field.

[getenv NUKE_LUT]/A_CAM_ArriLogC.3dl

where “getenv NUKE_LUT” will grab session environmental variable with name “NUKE_LUT” which contain path to the LUTs folder.




Now create a “” file inside you .nuke directory.

 C:\Users\User name\.nuke

The “” file should look something like this

import nuke
import os

# Path to executed file
cwd = os.path.dirname(os.path.realpath(__file__))

# Provide env variable for use in vectorfield node as a relative path
os.environ['NUKE_LUT'] = os.path.join(cwd, 'BB_LUT')

# Paths to viewer gizmos
RED_Viewer_LUT = os.path.join(cwd, 'BB_LUT', 'BB_RED_Viewer_LUT.gizmo').replace("\\", "/")
ARRI_Viewer_LUT = os.path.join(cwd, 'BB_LUT', 'BB_ARRI_Viewer_LUT.gizmo').replace("\\", "/")

# Paths to node gizmos
RED_LUT = os.path.join(cwd, 'BB_LUT', 'BB_RED_LUT.gizmo').replace("\\", "/")
ARRI_LUT = os.path.join(cwd, 'BB_LUT', 'BB_ARRI_LUT.gizmo').replace("\\", "/")

# Register custom LUTs
nuke.ViewerProcess.register("BB_ARRI_LUT", nuke.Node, (ARRI_Viewer_LUT, ""))
nuke.ViewerProcess.register("BB_RED_LUT", nuke.Node, (RED_Viewer_LUT, ""))

# Regester costome meny for creatin LUT gizmos'Nodes').addCommand( 'BB_Tools/ARRI_LUT', lambda: nuke.createNode(ARRI_LUT))'Nodes').addCommand( 'BB_Tools/RED_LUT', lambda: nuke.createNode(RED_LUT))


Beside registering gizmo for Nuke Tab menu I also register them as a custom  Nuke display LUTs.



Note how the “” script setting a ‘NUKE_LUT’ environmental variable which is hold the path pointing to the current directory plus LUT sub-directory.

After that we should be able to access that variable through the following TCL expression inside of Nuke.

getenv NUKE_LUT

Now we can copy the folder with our LUTs and gizmos within “” to any Windows or IOS machine without worrying about hard-coded path to our LUTs.