OCIO Color Management
Nuke uses OpenColorIO for color management. All of the colorspaces in Nuke, whether those shipped with the application or custom colorspaces, are defined in OCIO config files.
Depending on the OCIO config file that you are working with, there are a number of colorspace options and roles (aliases to colorspaces) that you can set in Nuke. There are also default options, which change depending on what file type you are working with. When the default option is selected, the colorspace that Nuke has set for it is listed in brackets.
Tip: Use the options in Preferences > Project Defaults > Color Management to apply them to all new projects.
1. | The color management dropdown determines whether Nuke uses the LUTs read from the configuration specified or the Nuke native LUTs. Selecting OCIO makes the relevant OCIO LUTs available to the Read and Write nodes in scripts on a per project basis. |
All OCIO configurations except nuke-default automatically switch this control to OCIO.
2. | Set the OpenColorIO Config you want to use for this project. |
Nuke ships with a number of default configurations, but you can use a custom OCIO config file by selecting custom from the OpenColorIO Config dropdown and then entering the file path.
Changing the configuration updates the Default Color Transforms accordingly. If the selected configuration is invalid for certain transforms, a warning displays.
3. | The working space transform determines what colorspace files should be converted to (Read) and from (Write) - it's the colorspace used by Nuke under the hood. |
Note: In earlier releases of Nuke, this colorspace was hidden because linear was always chosen as the working space. You may find that some operations work better in colorspaces other than linear. For example, some transforms work better in the CLog colorspace.
4. | You can use Default Color Transforms dropdown menus to override how clips in the Viewer, thumbnails, and so on are converted to and from the working space. |
When the Nuke is selected, Reads and Writes work the same as in previous versions of Nuke, with no integrated OCIO transforms. When OCIO is selected:
• Reads and Writes use OCIO transforms, with no Nuke built-in LUTs applied to the image.
• Read and Write colorspace controls are populated with the list of colorspaces defined in your currently selected OCIO config.
• The default LUT settings dropdowns are also populated with the list of colorspaces or display transforms defined in your OCIO config. The default value for each menu match the defaults in a Nuke Studio project with the same config. These defaults can be overridden using Python callbacks. See the following path for the default implementation that ships with Nuke:
<install_dir>/plugins/nuke/colorspaces.py
• The working space dropdown allows you to change the colorspace that Nuke uses internally for its image processing. This automatically sets the output transform colorspace of Write nodes, and the Input Transform colorspace for Read nodes. This defaults to the scene linear role defined in your OCIO config.
• Nuke Studio-created comps no longer contain automatically injected OCIOColorspace nodes. Instead, OCIO Color Management is automatically set in the comp’s Project Settings, and the correct OCIO colorspace is set directly into the Read and Write nodes.
Adding OCIO Roles
OCIO roles allow you to set custom role names for different colorspaces to make it easier for artists to instinctively know which LUT to use for any shot. For instance, if an element is coming from your matte painting department and should always be brought into Nuke as sRGB, you can create a matte painting role, which is associated with the sRGB colorspace for your artist to select.
OCIO roles are the primary method for selecting colorspaces. All of the colorspaces in the OCIO config file are still accessible, but they have been grouped together into a Colorspaces menu under the roles.
OCIO roles are stored in config files, some of which ship with Nuke in the following directory:
<install_dir>/plugins/OCIOConfigs/configs/
For example, the aces_1.1 config file includes the following roles:
roles:
color_picking: Output - Rec.709
matte_paint: Utility - sRGB - Texture
scene_linear: ACES - ACEScg
texture_paint: ACES - ACEScc
The first part of the role defines the name of the role displayed in Nuke and second part describes colorspace family and name. The family and name define which colorspace is associated with the role. For example:
- !<ColorSpace>
name: ACES - ACEScg
family: ACES
equalitygroup: ""
bitdepth: 32f
description: |
The ACEScg color space
ACES Transform ID : ACEScsc.ACEScg_to_ACES
isdata: false
allocation: lg2
allocationvars: [-8, 5, 0.00390625]
to_reference: !<MatrixTransform> {matrix: [0.695452, 0.140679, 0.163869, 0, 0.0447946, 0.859671, 0.0955343, 0,
-0.00552588, 0.00402521, 1.0015, 0, 0, 0, 0, 1]}
Note: The LUT specified must exist in the luts directory in the same location as config file for the role to pick up the required colorspace.
You can edit these files to add roles or create your own custom config and then point Nuke to the file using the Project Settings > Color > custom ocio config field.
To add a role to a config file:
1. | Open the required config file or create a custom config. |
2. | Enter the role , family, and name of the role under the roles: line. For example: |
compositing_linear: ACES - ACEScg
3. | Save the file and open Nuke. |
4. | Open the Project Settings and click the Color tab. |
5. | You can now pick your role from the default LUT settings. For example, you can set the working space to compositing_linear if you want to work in the ACEScg colorspace. |