Maya Arnold Skydome HDRI set to Utility - linear - sRGB why

Hello,
In Maya Arnold it’s common practice to set an hdri map to utility - linear - srgb.
If my hdri map was ‘not’ being used to show up in the viewport or final render does that still hold true for the setting ?
i.e I want to use the hdri map purely for lighting purposes. should I be using the raw setting instead.
I thought the sRGB part was for any image showing up on and srgb screen.

Thanks for the clarification.
b

The purpose of setting it to utility - linear - srgb is the assumption that the HDRI was made in sRGB/Rec.709 primaries rather than ACEScg primaries. So it is converting it from linear sRGB/Rec.709 into the working ACEScg color space. That means that, for instance, sky will appear as sky-blue, rather than sky appearing as over-saturated turquoise.

You definitely still want to read that HDRI map in with utility - linear - srgb even if you are only using it for lighting purposes so that the reflections from it are the right colors (for example the reflection of the sky).

1 Like

go it .
Thanks for the clarification.

Cheers,
b

Hi, I just found this thread as I am asking myself the same question re my expectation that HDRI maps should be treated as linear or raw. If Maya expects HDRI maps to be linear, why does the OCIO config set them to raw and you have to change this color setting? Why are all HDR and EXR files ingested into Maya not by default set to ‘utility - linear - srgb’? I fully expect to look very silly by asking this, as there is probably a really obvious reason.

Hello,
Because the software can’t know that it’s an HDRI. You would need a very flexible programmation interface that tell maya “the user is loading an image in the texture slot of a {insert render engine} skydome light which correspond to an hdri role which I have mapped to X colorspace”.

The simple solution that is available right now with OCIO is files rules which is more simply parsing the file path for piece of text hinting that the file is encoding in a specific colorspace.

If you open the default Maya config in an editor (C:\Program Files\Autodesk\Maya2023\resources\OCIO-configs\Maya2022-default\config.ocio) you would see something like

file_rules:

  - !<Rule> {name: tx, colorspace: Raw, pattern: "*", extension: tx}
  - !<Rule> {name: hdr, colorspace: Raw, pattern: "*", extension: hdr}
  - !<Rule> {name: exr, colorspace: Raw, pattern: "*", extension: exr}
  - !<Rule> {name: Default, colorspace: default}

As you can notice we perform a simple file extension matching where one had to choose which colorspace the .exr/.hdr file should have. As we can’t know in which context they will be used, the safest choice was just to ignore all color transformation hence assigning the “Raw” colorspace.

Note that file_rules are an OCIOv2 feature. If you are using a config made for OCIOv1 you would only get the “strict parsing behavior” which is: if your file path contains a colorspace name that can be found in the config, then it should be assigned this colorspace.

So as a solution to your issue you could:

  • encode the name of the HDRI colorspace in the file name: which rely on the “strict parsing” feature. Not ideal as changing the colorspace name in the config would imply renaming all your HDRIs
  • add a new file rule yourself that is able to match precisely enough only HDRIs: as an example you can decided that all your HDRI must have the keyword “HDRI” in their file name, allowing you to add a file_rule : - !<Rule> {name: hdris, colorspace: Linear sRGB, pattern: "*HDRI*", extension: "*"}
    • be aware this solution assume you HDRIs are always encoded in linear sRGB ! Yes it is tricky to perfectly automatically detect colorspace encoding for files.

I hope that clarifies it.
Liam.

HDR images are always linear, but there is more than one kind of linear image, or more specifically, there are linear images with different color gamuts. Most HDR images are in sRGB/Rec709 color gamut. An ACES render will be in ACEScg color gamut. An ACES film footage image will be in ACES-2065-1 color gamut. All are linear.

Next is the concept of “raw” which just means “do nothing” to the image. So if an image is set to raw it will read it in as-is. This has nothing to do with it being linear or not. The working space in Maya is ACEScg. If you have an image you are reading in you need to convert it from the color space it is in into ACEScg. If it is already in ACEScg you can set it to raw and this will be a noOp.

Finally the concept of “default” is definitely YMMV. Everyone is free to change OCIO configs to whatever works best for them. For example, since most of the HDR images we use are linear sRGB I have this as a file rule so that anything file with a “.hdr” extension will get read in as linear sRGB:

- !<Rule> {name: hdr, colorspace: Linear Rec.709 (sRGB), pattern: "*", extension: hdr}

but I have anything with an .exr extension read in as raw (which will be ACEScg).

- !<Rule> {name: exr, colorspace: Raw, pattern: "*", extension: exr}

Another reason for having the default set to raw is that you do not want to have any color space conversions on images that are not used for color, for example bump maps, masks, normal maps, displacement maps, etc. should be set to raw meaning that they will be read in as-is which is what. For example a normal map has red green and blue corresponding to the x, y, and z directions to determine how to adjust the normals. If those colors got changes it would mess up the resulting bump.

I hope the above answers this, but let me add that an exr render will always be in ACEScg, and if you save textures in exr these will also be ACEScg. So those HDR maps are really an exception.

Hi Derek, thank you so much for the comprehensive reply. It has really opened my eyes and helped my understanding. I really value your time in helping me with this.

1 Like