Re: Which colorspace is used as the reference space for an OCIO config?


Hi folks-

H.P., I also agree with that definition. But - it's also true that if you are converting to or from the 1st colorspace in the config list (aka "Reference" colorspace) we should see the to_reference or from_reference transform (or inverse as-needed) applied alone. More specifically, we don't need to explicitly convert from colorspace A to Reference colorspace, then from Reference colorspace to colorspace B because the conversion from Reference to Reference is a non-op. So the OCIO ColorSpace isn't ignoring the reference colorspace in its conversion (as we can explicitly use it if desired), it's simply skipping the conversion from Reference<>Reference that is implied which seems to be standard OCIO behavior. Nevertheless I agree - it's up to the config author to accuratly define the to_reference and from_reference transforms. 

From my view, the relevant issues that crop up are symptoms of inconsistent implementations, esp. where Roles are used for implied conversions in the host application.

For example, I can see that Nuke OCIO CDLTransform uses the "reference" ROLE assignment for converting to/from the "working space" assigned in the OCIO CDLTransform node. This is inconsistent, because for other standard operations Nuke honors the reference colorspace that is implied by the first colorspace in the config file. A Read node transforms colors from the Read node colorspace to the Project Settings working space, as do other standard Nuke nodes with colorspace assignments. Of course, we can set the Project Settings working space to the reference/1st colorspace if we want to, and the conversions still happen as expected.

As for the Roles in the config - some of them are used to populate the color Project Settings assignments for "working space," "log files," etc. when a given config file is first loaded. But when some plugins like OCIO CDLTransform use OCIO Roles in its own way, ignoring the Nuke color Project Settings, things are getting overly complicated.

From the source code comments:

    ColorSpace Roles are used so that plugins, in addition to this API can have
    abstract ways of asking for common colorspaces, without referring to them
    by hardcoded names.
All this considered, I conclude that the "reference" role should always be the "reference" (1st) colorspace in the config list. A few suggestions for improved behavior in the wild:

1. As users, get in the habit of setting the reference role to the 1st colorspace in the list. 
2. OCIO sanity checks and ociocheck app should return an error if "reference" role is anything other the 1st colorspace. 
3. Maybe - hardcode the "reference" role to the first colorspace in the list when configs are read in. I.e.: don't allow custom assignments. I expect some backlash for this suggestion - please don't rake me over the coals :) This at least enforces the intended usage. 


On Thursday, April 19, 2018 at 8:52:43 AM UTC-7, Dennis Adams wrote:
Yes, I completely agree with that definition. My assertion that 'reference' was related turned out to be something in our own code, not OCIO.


On Wed, Apr 18, 2018 at 11:25 PM, Haarm-Pieter Duiker <li...@...> wrote:
Cross posting for completeness

The document detailing ACES support in various applications, is here (read only):

If anyone is interested in updating the document for more current versions, let me know. I'd be happy to provide an editable link. Just message me.

For those interested in implementations, I think the Nuke nodes are supposed to be a reference. The OCIO Colorspace node creates the path from one colorspace to the next with this call
m_processor = config->getProcessor(context, inputName, outputName);

which leads to this call to create a color space conversion
processor->getImpl()->addColorSpaceConversion(*this, context, src, dst);

which eventually leads to this function
which takes two colorspaces and concatenates the source colorspace's to_reference (or inverse from_reference) transforms with the destination colorspace's from_reference (or inverse to_reference) transforms.

So... the code has it. The reference colorspace isn't the first colorspace. It isn't the space pointed to by the 'reference' role. It's the space that the config colorspace's various to_reference and from_reference transforms use as a target or as a source. Hopefully all the colorspace's in the config agree on that definition!

On Mon, Apr 16, 2018 at 12:38 AM, Abraham Schneider <abrah...@...> wrote:
Hi there!

It seems like it's not just me that is unsure, how OCIO decides, which colorspace in a config is used as the reference space, that all other colorspaces are related to. And what excact purpose the 'reference' role has.

Could you maybe have a look at this and shine some light on this topic? 

Thanks, Abraham

You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Join to automatically receive all group messages.