OCIO and Context Change

   1647   2   1
User Avatar
Member
1 posts
Joined: Oct. 2019
Offline
We have set the OCIO variable in our environments before we start Houdini. We are thinking of allowing our artist to switch shot context within the DCC.

The new versions of maya would update the viewer reflect the context change. Their documentation states

https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Rendering/files/GUID-4AE9AABC-A900-4276-AFE4-F9DCD96BA03D-htm.html [knowledge.autodesk.com]

OCIO configuration files allow for the use of contexts, which are essentially environment variables that refer to color transform files. Contexts can be used to facilitate per-shot color grading, for example.

If you are using OCIO contexts, you can change their value during a session without restarting Maya. To do this, use MEL or Python commands to change the environment variable and then refresh the color management preferences.

For example, suppose that your configuration file uses a context named SHOT, which is currently set to abc123.spi1d, and you want to change it to ijk456.spi1d. In this case, you can run the following lines of MEL in the Script Editor:


Does houdini to run a similar callback function to update the “context” so that viewer pickup the right color transform file? or is that something that automatically happens behind the scene.
User Avatar
Member
6 posts
Joined: May 2014
Offline
Hi,
bumping this up because I feel we're reaching the same limitation.
Now that H18 is out, is there any way to dynamically change OCIO context?

If there's no official support planned, do you have any tips on what would be the best place to put in place this kind of color transformations?

I've seen that we actually have some nice VEX functions like ocio_transform (https://www.sidefx.com/docs/houdini/vex/functions/ocio_transform.html), so I wonder if there's a way to somehow plug them in the Render View as a shader/etc.. and force the evaluation of what's being currently being displayed to the user.

Thanks,

Valerio
User Avatar
Staff
5156 posts
Joined: July 2005
Offline
Yes, you can set it the Color Settings dialog (Edit > Color Settings, Color Correction) or by setting OCIO in the environment with os.putenv(), then reloading the config with hou.Color.reloadOCIO().
  • Quick Links