Hi. In this video, we'll look at the color-management settings for images used as inputs in a Maya scene.
All image files are associated with a color space, either implicitly or explicitly.
Among other things, the color space defines the chromaticities used for the red, green, and blue values so that they can be properly converted
to the colors used by your monitor as you work as well as for final output displayed on a digital projector or other device.
In addition, the color space determines whether the numeric color values refer to scene luminance or display luminance.
It also determines whether the values are encoded linearly, logarithmically, or using gamma, and which white point they refer to.
Some image formats allow for metadata that specifies the color space in the file itself, but that can be unreliable.
Often this information is missing or incorrect, and not all image editors use it properly and consistently.
In the past, it could be assumed that most images encountered in computer graphics use the sRGB color space.
However with increasing numbers of high dynamic-range images and wide-gamut displays, this is no longer the case.
When you specify an image file in Maya, you must declare which color space it uses.
This ensures that its values get processed correctly.
When you first select an image file, the input-space rules automatically assign an initial color space.
Now if this is not the correct color space, you need to change it or the final result will be incorrect as well.
In particular, images that are used for non-color data should generally use Raw.
This includes vector inputs like normals and displacement, as well as simple numeric values like bump, weight, roughness, and so on.
If you change the color space setting, you should also set Ignore Input Color Space Rules.
This prevents it from getting changed back to the initial space if the input rules ever get reapplied to the scene.
If the image uses a display color space, you might have the option to invert the view transform.
Note that this is available only if your config file uses OCIO v2, and only if it enables this feature.
The viewport will apply the view transform for display, so inverting the transform first makes the image match what you see in
an external image editor more closely (assuming that the lighting in the scene is fairly even).
You can also select a specific view transform to invert if it's not the same as the one used by the scene.
However since many view transforms, including the Maya default ones, roll off the highlights,
inverting a view transform can cause bright colors in the image to become greater than 1.
This can be appropriate for some things, such as image planes used as back plates,
where the values represent the amount of light in the scene, as long as those images are not scene-linear already.
However it's not appropriate for textures used as basic colors, where the values represent the proportion of light that gets reflected.
A value above 1 would mean that a material is reflecting more light than it receives.
Now, back to the input rules. You can customize the rules in your Maya preferences.
The first time you use a config file, the rules are imported from it.
After that, the rules are stored with your Maya preferences and used for all scenes that have the same config file.
The config file is not modified -- the rules in your preferences simply override the rules in the config.
The rules are applied in order from top to bottom whenever you add an image to a scene.
The first rule that matches a file’s name and extension is the rule that wins.
The default rule applies when no other rule matches.
In Maya’s default configuration, it assigns images to the default input space,
which is a "role" or alias that can mean different things in different OCIO config files.
In the config files that ship with Maya, the default role is set to sRGB.
There are also predefined rules that assign tx, EXR, and HDR files to Raw, which means that no transform is applied to the colors.
These files are typically scene-linear already, although they might not use the same primaries and white point as the rendering space.
You shouldn't edit the tx rule because those files are used by the Arnold renderer,
but you can edit the other two rules if most of your high-dynamic-range files are in a different space than your rendering space.
Add Color Space Name Rule inserts a special rule that assigns color spaces based on whether the name of the space,
or any of its aliases defined in the config, appear anywhere in a file’s name or path.
Note that names and paths are case-sensitive.
You can also create your own rules based on your own conventions,
matching the extension or file path and name using the so-called “glob” syntax.
Here again, names and paths are case-sensitive, but extensions are not.
You can use the Up and Down buttons to change the rule priorities, except for the Default rule.
You can also delete any rule you don’t want, again with the exception of the Default rule.
Finally, you can reapply the rules to the image inputs in the scene.
This is useful if you need to change many input spaces at once.
This might be the case, for example, if you switch to a configuration that has the same color spaces but uses different names for them.
File inputs that have been set to ignore the rules will not be affected.
In the ideal case, if you use a good naming convention for your image files and set up the input rules to match,
you won't need to manually set the color space for individual files except in rare cases.
Thanks for watching.