3D CG elements should be rendered using a scene-linear working space. However, images that are used for textures and other maps should be processed in various ways, depending on both the image state and the type of map.
Material Colors
Maps that are used for material colors should be scene-linear, but restricted to a 0-to-1 range. This is because they represent the proportion of light that is reflected or transmitted. These include diffuse, specular, and ambient reflectance colors, as well as transparency color.
First, you must ensure that the images are scene-linear:
- Output-referred images, such as video and sRGB, should have the gamma removed and an inverse tone map applied. These two operations are often combined in one transform. Ideally, you should use the inverse of the tone map that will be used for output and display. For example, if you will be using the ACES RRT tone map, then you can use sRGB_to_ACES from the RRT+ODT/ directory as an inverse tone map. Alternatively, inversePhotoMap_gamma_2.4 from the primaries/ directory is a generic transform that works well in many cases.
Note: Although it is common to simply remove the gamma from output-referred images, this is not enough to convert images to scene-linear — an inverse tone map is always required. However if a digital photograph was not flatly lit, or if a digital painting uses overly bright colors, then an inverse tone map may create values greater than 1.0. In these cases, the best approach may be to use one of the remove_gamma transforms in the gamma/ directory without applying an inverse tone map, even though this is not ideal.
- Log-encoded images should have the log encoding removed using one of the transforms in the film/ directory. See Color Managing Images from Scanned Film for additional considerations.
- Scene-linear images, such as images prepared using a tone map for display, can be used as-is if the primaries match your working space.
Once the images are scene-linear, you can convert the primaries to your working space using one or more of the transforms in the primaries/ directory. For example, if you converted an image to scene-linear ACES and you want to render using the UHDTV (Rec. 2020) primaries, you can apply ACES_to_CIE-XYZ followed by CIE-XYZ_to_LinearUHDTV.
Light Sources
Maps that represent light sources should be scene-linear but can contain values greater than 1.0. These include reflection maps, environment maps, and backplates, as well as some other effects such as incandescence.
- Output-referred images, such as video and sRGB, should have the gamma removed and an inverse tone map applied. After that, you can convert the primaries if necessary.
- Log images should have the log encoding removed, and then the primaries converted if necessary.
- Scene-linear images only need to have the primaries converted if they don't match your working space.
Non-color Data
If images are used to control non-color attributes, such as normals, depth, and so on, then the values should not have any color transform applied.