Color management in hydra delegates

With USD 24.03 there seems to be some notion of color management in hydra for primvars and attributes (DataSourceAttributeColorSpace). On the flip side hio for image loading seems to be pretty much devoid of providing any color space information to a hydra delegate.

I think my general question is who is in charge of color management in a hydra delegate in the long run hydra or the delegate? There is a renderingColorSpace RenderSettings schema. In theory Hydra itself could be capable of making everything the delegate consumes into the right colorspace for rendering but it’s not there to do it yet as far as I can tell.

So for the actual questions:

  • Should we assume it’s up to the delegate itself to deal color space conversion it or is it something we should expect hydra to do?
  • Is there a future where hio can provide colorspace information for imported images or are we on our own when it comes to reading images if we want to do color management?

Please question my assumptions here, these question comes from me reading documentation and release notes and I might not have a complete picture.

1 Like

Some basic notes:

  • There is a color space name attribute on properties for a delegate to consume.
  • There is a color space on stage metadata. This is a display color space transform, optionally applied to the frame buffer as a color correction step.
  • Hio reports whether or not a texture has got SRGB gamma compressed pixels but does not report the color space of image beyond that.
  • MaterialX also carries color space information, limited to roughly a dozen colors spaces that can be evaluated by a closed-form equation (therefore excluding things like LUT based color space transforms) and invertible. MaterialX requires users to specify the color space of an image file on an input, and disregards colors space data available in the image. This is due to a prevalence of OpenEXR files in the wild with incorrect color space information in them due to bugs in various software applications over the years.
  • In a MaterialX based material, colors are converted to linear Rec709 by a bit of code injected in the codegen step. This is true for all shader back ends.

There is a future where Hydra itself will be responsible for conversion. There is a future where Hio will provide color space information for imported images.

More information will be coming soon.