Skip to content

Add color space attribute for an "interop" ID #2153

@doug-walker

Description

@doug-walker

The TSC has discussed many scenarios where applications need to create a correspondence between color spaces in a config and "known" external color spaces. Examples of this are:

  • Color space enums in external graphics APIs (macOS, iOS, Windows, Wayland, Android, Vulkan, etc.)
  • Color space IDs in asset file formats (MaterialX, OpenUSD, etc.)
  • Color spaces for common CICP values

It would be cumbersome for OCIO to try and maintain all of these mappings, there are dozens of them. Furthermore, they evolve over time and this would create challenges if we tried to store these values in the configs themselves.

Instead, OCIO should focus on a method for applications to identify the correspondence between a color space in a config and an unambiguous external definition.

The Color Interop Forum has already worked on producing an example of an unambiguous external definition: the Color Space Recommendations for Texture Assets and CG Rendering. The intent is for the Color Interop Forum to next take on the task of producing a similar recommendation for display color spaces that would include CICP values and enums for external graphics APIs.

The proposal is that OCIO add a new attribute for color spaces named "interop_id" that would hold a string that is used to establish this connection to an external reference. (This would be the "compact name" defined in the texture asset recommendation mentioned above, for example, "lin_rec709_scene".)

The intention is that this interop ID would be more stable over time than the user-facing color space names (which we've seen evolve, for example, in the ACES configs).

The interop ID should be a good choice for embedding in external asset formats such as OpenEXR, OpenUSD, and MaterialX.

It is intended that if a config author includes an interop ID from a Color Interop Forum recommendation, that they are using the exact transform specified in that recommendation. At some future point, it might be desirable to provide a function that would check that is true. In the meantime, it would be helpful to provide built-in transforms for all of the Color Interop Forum color spaces.

For color spaces that do not exist in Color Interop Forum recommendations, it is proposed that config authors should be allowed to populate their own interop ID string. Some sort of namespace mechanism could be used, if desired.

It will be up to applications to know how to handle the interop ID and manage their own mapping to external references. The Color Interop Forum recommendations will be helpful here. However, tracking the latest changes in all of these external formats and standards is a large task and it's not something that OCIO should try to manage. For example, we don't want to have to release a new OCIO library every time some external graphics API makes a change to their enum list.

The interop_id string would not automatically be considered an alias. If a config author wants the string to be considered an alias, they will need to add it to the aliases attribute as well.

Unlike color space names or aliases, it will be allowed for more than one color space to use a given interop ID.

Metadata

Metadata

Assignees

Labels

Feature RequestNew addition to OCIO functionality.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions