Q100197: How to modify the OCIO configuration file to adjust the colorspaces available in Katana's Monitor tab

Follow

SUMMARY

The images displayed in the Monitor tab in Katana can be viewed with different display transformations applied. These transformations are defined in the OCIO configuration as device-specific look-up-tables (LUTs).

This article describes how to select different pre-defined LUTs and how to extend the list of available LUTs by adding a custom OCIO configuration to Katana.

 

MORE INFORMATION

Katana works internally in a linear colorspace. When scenes are Preview Rendered, they are rendered in scene-linear colorspace and previewed in the Monitor tab with a filmlook visualization to see the images as they would look on the final display device.

Each display device has a number of "views" which provide different ways to display the image. The view options that have been defined to apply different LUTs to the image can be found in the filmlook visualization dropdown, at the bottom of the Monitor tab.

mceclip0.png

By default, a limited number of these views are defined and active in the OCIO configuration. To add more options to this list, you can append to the “displays” section of the config.ocio file.

 

SETUP

Manually, by customizing the OCIO configuration file

To achieve this, do the following:

  1. Locate the OCIO configuration file, which by default can be found in $KATANA_ROOT\etc\ocio\nuke-default.

  2. Create a folder called OCIO in a convenient location, for example your home folder, and copy the config.ocio file as well as the luts folder into it.

  3. Edit config.ocio, for example by adding more colorspaces defined as “views” to the “displays” section:
    displays:
     default:
       - !<View> {name: None, colorspace: raw}
       - !<View> {name: sRGB, colorspace: sRGB}
       - !<View> {name: rec709, colorspace: rec709}
       - !<View> {name: rec1886, colorspace: Gamma2.4}
       - !<View> {name: AlexaV3LogC, colorspace: AlexaV3LogC}

  4. To use your custom OCIO configuration in your Katana session, set the OCIO environment variable to point to the config.ocio file in the OCIO folder, then launch Katana.

    How this environment variable is set will depend on how you launch Katana. For example:

    Linux
    Open a terminal and enter
    :

    export OCIO=home/OCIO/config.ocio

    Then launch Katana from the same terminal.


    Windows
    Open a command prompt and enter
    :

    set "OCIO=C:\Users\your.user\.katana\OCIO\config.ocio"

    Then launch Katana from the Command Prompt.


Programmatically, by using Python commands

It is also possible to customize the OCIO configuration without having to edit your config file by using Python code similar to the following examples.

 

For Katana 6.0 and onwards, please refer to the following example that works with OCIO 2.0:

from Katana import OCIO
cfg = OCIO.Config()
configPath = OCIO.GetCurrentConfig().getWorkingDir()

# Create an editable copy of our current config
cfg = cfg.CreateFromFile(configPath + '\\config.ocio')

# New views can be added to the 'default' OCIO display
cfg.addDisplayView('default', 'Gamma18', 'Gamma1.8')
cfg.addDisplayView('default', 'Wibble', 'Panalog')

# Update the list of active views
cfg.setActiveViews(cfg.getActiveViews() + ',Gamma18, Wibble')

# Update the current config
OCIO.SetCurrentConfig(cfg)

For Katana 4.5 and 5.0, please refer to the following example that works with OCIO 1:

from Katana import OCIO
cfg = OCIO.GetCurrentConfig()
cfg = cfg.createEditableCopy()

# New views can be added to the 'default' OCIO display
cfg.addDisplay('default', 'Gamma18', 'Gamma1.8')
cfg.addDisplay('default', 'Wibble', 'Panalog')

# Update the current config
OCIO.SetCurrentConfig(cfg)

If this code is placed in a $KATANA_RESOURCES/UIPlugins directory, it will run on start-up and append the set views to the default OCIO config.

 

For more information on OCIO color management, please see the Katana User Guide on Managing Color, the OpenColorIO standard and the OpenColorIO Python API.

    We're sorry to hear that

    Please tell us why