OpenColorIO
Flame Family applications use OpenColorIO for colour management. OpenColorIO (OCIO) is an open-source colour management framework designed to handle colour transformations in the film, TV, and animation industries. It allows for consistent and accurate colour representation across different applications and display systems, ensuring that colours appear as intended from start to finish in a production pipeline.
OpenColorIO supports workflows involving scene-referred and display-referred colour spaces and integrates well with popular applications like Autodesk Maya, 3ds Max, and RV, Adobe After Effects, Blender, Foundry Nuke, and many others. It’s particularly used in visual effects and animation to manage complex colour transformations across tools and devices.
- Find more information about OpenColorIO on the Academy Software Foundation and OCIO websites. The OCIO documentation website is a great resource for studios and users who want to know more about this framework.
One of the strengths of OpenColorIO is the concept of a configuration or "config file" that defines the colour policies to be used for a show or project including colour space definitions, display and view mappings, named transforms, and file input rules. The OCIO config file makes it easier to configure a wide set of applications from different vendors for easier collaboration across a workflow.
Getting the Most from OCIO in Flame
The OCIO integration in Flame Family applications is deep and supports many advanced features of OCIO such as context variables, viewing rules, categories, virtual displays, OCIOZ archives, and much more.
Achieving this level of integration was complex because the Flame Family is different from many of the other applications that use OCIO, for example:
- Flame is a timeline-based rather than a shot-based application
- Flame uses a variety of shared services that run as separate processes
- Flame requires that certain colour spaces always be available (e.g., to allow importing media in digital cinema camera colour spaces)
- Flame frequently needs to convert between display-referred (i.e., video) colour spaces.
- Flame allows side-by-side usage of clips in a mixture of scene-referred and display-referred colour spaces with no requirement to convert everything to a common working space
- Flame is often used in small facilities that don't have a colour scientist on staff to write a custom OCIO config file, so there is a need to allow some config editing from within the UI (although admins may lock this capability)
For these reasons, please adhere to the following guidelines regarding OCIO.
Use OCIO v2 Configs with Display Colour Spaces
In OCIO v2, it became possible to have display-referred colour spaces and to separate these from associated view transforms. This is the best-practice now for OCIO config design and it is strongly recommended that you use configs that take advantage of this approach. This allows the application to convert easily between well-defined display colour spaces without needing to invert a tone-map and convert all the way back to a scene-referred reference space. Older style configs may still be used, but the user experience will not be as good.
Restrictions on the OCIO Environment Variable
Because of the importance of using the same config across shared services, the only allowed usage of the OCIO environment variable is as a way of defining the config for new projects. Once a project has been setup to use a config, the path to that config may not be changed simply by starting the application with the OCIO environment variable pointing to a different location. You may modify the path to the config in an existing project by using the Manage Project panel, or from the Wiretap API. It is also possible to modify the config.ocio soft-link under the project directory. See: Using the OCIO Environment Variable.
Access to the OCIO Built-in Configs
Some of the configs released by the OCIO ACES configs working group (the "CG" and "Studio" configs) are built into the OCIO library itself. These are sometimes accessed by setting the OCIO environment variable to a special URI such as: ocio://studio-config-latest
.
The application currently does not support that technique. Instead, please download these configs to a file from this link on GitHub.
Addition of Flame Core Colour Spaces
Because the application requires certain colour spaces be present, it will merge a set of colour spaces into the in-memory version of the source config. This utilizes the config merge functionality of OCIO. The application merges this config into the user's config: /opt/Autodesk/colour_mgmt/configs/flame_internal_use/flame_core_config/config.ocio
.
Each colour space is compared to the colour spaces already present in the user's config. If a colour space has the same name, the one from the user's config is used. If a colour space is recognized as a duplicate (even if it has a different name, or a different reference space), rather than adding the colour space, its name is added as an alias to the existing colour space. The goal is that there should only be one version of each colour space, with the one from the user's config taking precedence.
Any colour spaces that are not already present and must be added show up in a "Flame" sub-menu.
To see the result of the merge process, you may export the config from the Colour Management Preferences.
Adding Views for an HDR Display
The application is capable of supporting HDR displays such as Apple's XDR display hardware. You may enable this in the Flame Setup application but it also needs an appropriate display and views in the OCIO config. One of the core colour spaces that is merged into the config is "ST2084-P3-D65 - Display". The config should contain an OCIO display of this name that contains the appropriate views. If this display is not defined in the config, you will get a "View Error" in the viewport.
Defining the Interchange Roles
In OCIO 2.2 and higher, it is mandatory to define the aces_interchange
and cie_xyz_d65_interchange
roles. It is highly recommended that you define these roles, even for earlier config versions.
For the other roles used by the application, see: Use of OCIO Config Roles.
Filtering of Colour Space Menus
Artists are sometimes overwhelmed by the number of colour spaces that appear in menus. This may lead to frustration and mistakes. OCIO provides some useful methods for filtering colour spaces from menus, while keeping them available to the application.
If the colour spaces in the config contain the categories
attribute, the application will filter colour spaces for most menus to only those that define the "file-io" category.
The working colour space menus will be filtered to show colour spaces that contain the "working-space" category.
Filtering may be turned off in the Colour Management Preferences.
Standard Reference Colour Spaces
The application allows users to create user colour spaces and user view transforms from within the user interface, rather than needing to edit a config file. This feature is only supported when using configs that use the same reference colour spaces as the configs that ship with the application. Specifically, the scene-referred reference space must be ACES2065-1 and the display-referred reference space must be CIE XYZ (per the usual illuminant E normalization) with the neutral axis at a D65 white point. The configs released by the OCIO ACES configs working group conform to this best-practice.
Accessing Various OCIO Tools
Here is how to access various OCIO transform types in Flame Family applications:
- ColorSpaceTransform: This is the basic method for converting between two named colour spaces. It is available as the Input Transform mode in the Colour Mgmt tool. In MediaHub it is named Auto Convert.
- DisplayViewTransform: This is the way to apply a view transform for a given display to a colour space. It is available as the View Transform mode in the Colour Mgmt tool.
- FileTransform: This is how to load and apply an isolated colour transform or LUT file that is not part of a config. It is available in the Colour Transform mode in the Colour Mgmt tool.
- NamedTransform: A named transform is a transform in the config that is just a mathematical function, independent of any colour space association. It is available by enabling Custom in the Colour Transform mode in the Colour Mgmt tool.
- LookTransform: This is available in the Look mode of the Look tool.
The OCIO Python Binding
The OCIO Python binding is installed with the application. In your scripts, you may simply import PyOpenColorIO as ocio
to take advantage of the powerful OCIO API. More information about the OCIO API may be found in the OCIO documentation.
The OCIO command-line tools such as ociocheck
are installed here: /opt/Autodesk/python/<flame_version>/bin
.
The capabilities of these tools are covered here.
Colour Management Functions in the Flame Python API
You may use a combination of the Flame and OCIO Python bindings to script some very powerful workflows. Please see the Python API examples.