AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.74k stars 430 forks source link

Conversion to CIE-XYZ-D65 #1959

Closed timeinpixels closed 3 months ago

timeinpixels commented 3 months ago

Hello,

I am trying to understand the colorspace conversion to CIE-XYZ-D65. I have a really simple transform: linear Rec.709 to CIE-XYZ-D65... I would imagine this would result in a simple matrix processing in the resulting shader, but what I get is super complex shader with multiple stages containing SplineCurves, ACES_Glow10, ACES_RedMod10, multiple log processing calls... why is that? Is this really necessary?

Really appreciate any input on this.

doug-walker commented 3 months ago

Hi @timeinpixels , it sounds like you are getting an ACES viewing transform applied but it's hard to offer any guidance without more detail about what you did.

If you're using one of OCIO's built-in configs, please keep in mind that the "CIE-XYZ-D65" color space in those configs is an output-referred color space that is used as the connection space between various displays. So if you're starting from the scene-referred "Linear Rec.709 (sRGB)" color space, a view transform is necessary to get to an output-referred space. If you convert via a DisplayViewTransform rather than a ColorSpaceTransform, you could use the "Un-tone-mapped" view transform if you want that step to be an identity.

timeinpixels commented 3 months ago

Thanks @doug-walker for the quick reply! Yes, it seems this is what happens. I am using studio config and this one is used:

display_colorspaces:
  - !<ColorSpace>
    name: CIE-XYZ-D65
    aliases: [cie_xyz_d65]
    family: Utility
    equalitygroup: ""
    bitdepth: 32f
    description: The "CIE XYZ (D65)" display connection colorspace.
    isdata: false
    allocation: uniform

I didn't try to pass the view when creating a processor, will try now with "Un-tone-mapped" and report back - thanks!

doug-walker commented 3 months ago

Closing as this discussion moved to Slack.