An OCIO configuration consists of the config file YAML document along with an optional set of external LUT files. This information plays a critical role in the interpretation of many deliverables (e.g scene or project files created by a DCC). In other words, if the config goes missing or cannot be found or located, it is not possible for an application to correctly interpret any scene or project files that reference it. This is a current area of fragility for workflows involving OCIO.
Examples of common use-cases that are impacted by this fragility are:
- Packaging an OCIO config to share across multiple facilities
- Archiving a project into a self-contained file
- Collaboration between workstations that are not on the same network
One feature that would be useful in this regard is if there were an API call that could package an OCIO configuration into a single file (and an inverse function to unpack one). We could call the result a "config archive".
The possible locations of the LUT files is specified in a Unix-style search path found in the config file (i.e., "search_path"). When OCIO encounters a FileTransform elsewhere in the config, it needs to search for the named file by walking the search path in the specified order until the file is located.
It is not uncommon to have several files of a given name in various locations along the path. For example, there may be a default look transform for a show that is used as a fall-back if there is no look transform for a specific scene.
Furthermore, it is possible to use OCIO context variables to make the search_path a function of the current environment variables. This is very flexible but also greatly complicates any effort to know what files will actually be used. Because of this complication, the proposal is that the new API call would fail if the config uses context variables. Furthermore, because the API does not have a good way to search the config for context variable usage, the exact requirement is that the "environment" line of the config must be present and empty (i.e., "{}"), indicating that no context variables are used.
Another complication is that there may be files in the search directories that are not actually used by OCIO, for example image files. These could greatly increase the size of the config archive so these files should be excluded. The proposed way to do that is to only include files that have one of the extensions supported by OCIO. Note: My understanding is that some users have a workflow where they create "LUT" files without an extension as a way to be agnostic of the actual file format (in other words, it might sometimes be a Lut3D and other times be a CDL). This is not technically required since the OCIO LUT parser will try all the formats if the parsing of the first format fails. If you think it is necessary to include files without any extension, please let us know in the comments.
As long as the LUT files are being gathered together into an archive file, the function may as well compress them too (e.g., using zip or some similar algorithm). LUT files tend to compress quite well.
Issue #1621 proposes building-in one or more default configs to the OCIO library. This would be straight-forward for configs such as the CG config that have no external LUT files but would be more challenging for the Studio config, which will require external LUTs. By providing a way to package the Studio config into a single file, this feature might enable more easily adding other configs such as that to the built-in set.
An OCIO configuration consists of the config file YAML document along with an optional set of external LUT files. This information plays a critical role in the interpretation of many deliverables (e.g scene or project files created by a DCC). In other words, if the config goes missing or cannot be found or located, it is not possible for an application to correctly interpret any scene or project files that reference it. This is a current area of fragility for workflows involving OCIO.
Examples of common use-cases that are impacted by this fragility are:
One feature that would be useful in this regard is if there were an API call that could package an OCIO configuration into a single file (and an inverse function to unpack one). We could call the result a "config archive".
The possible locations of the LUT files is specified in a Unix-style search path found in the config file (i.e., "search_path"). When OCIO encounters a FileTransform elsewhere in the config, it needs to search for the named file by walking the search path in the specified order until the file is located.
It is not uncommon to have several files of a given name in various locations along the path. For example, there may be a default look transform for a show that is used as a fall-back if there is no look transform for a specific scene.
Furthermore, it is possible to use OCIO context variables to make the search_path a function of the current environment variables. This is very flexible but also greatly complicates any effort to know what files will actually be used. Because of this complication, the proposal is that the new API call would fail if the config uses context variables. Furthermore, because the API does not have a good way to search the config for context variable usage, the exact requirement is that the "environment" line of the config must be present and empty (i.e., "{}"), indicating that no context variables are used.
Another complication is that there may be files in the search directories that are not actually used by OCIO, for example image files. These could greatly increase the size of the config archive so these files should be excluded. The proposed way to do that is to only include files that have one of the extensions supported by OCIO. Note: My understanding is that some users have a workflow where they create "LUT" files without an extension as a way to be agnostic of the actual file format (in other words, it might sometimes be a Lut3D and other times be a CDL). This is not technically required since the OCIO LUT parser will try all the formats if the parsing of the first format fails. If you think it is necessary to include files without any extension, please let us know in the comments.
As long as the LUT files are being gathered together into an archive file, the function may as well compress them too (e.g., using zip or some similar algorithm). LUT files tend to compress quite well.
Issue #1621 proposes building-in one or more default configs to the OCIO library. This would be straight-forward for configs such as the CG config that have no external LUT files but would be more challenging for the Studio config, which will require external LUTs. By providing a way to package the Studio config into a single file, this feature might enable more easily adding other configs such as that to the built-in set.