Getting started with OCIO in RV

RV has a couple of nodes that can be used instead of or complimentary to the RV’s color pipeline.

You can get some info about OCIO in RV here: OpenColorIO Integration

If you check out the OCIO package info in the Package manager RV -> Preferences -> Packages -> OpenColorIO Basic Color Management , there’s a bit of a description about how OCIO can be auto-setup via a script. You can create file in your support path under the Python directory to have your own script auto-determine color pipeline.

Attached is a minimal example that might serve well as a bootstrap for setting up your config. The ocio_config_from_media is called when needed and helps you dynamically set up your config. You can even create the OCIO config programmatically if you so wanted to, or just set it to an appropriate config location, set the environment variable and be done. (2.2 KB)

Drop the file as in your PYTHONPATH (such as in your Python path in your RV_SUPPORT_PATH) and this will prove as a configuration script and entrypoint for your OCIO setup.

If you look under Open Color IO Integration docs, there’s a ocio_context component. The OCIO context variables can work off of environment variables, but environment variables for context variables in OCIO are not required.

The way this works is, by default, OCIO context variables will incorporate any environment variable as a fallback. But in the setting up a node, you can also define additional context variables. This allows each node to have its own context apart from your environment, therefore no special environment variables are actually needed.

So while the example script defines the context based on the environment variable and uses a default value like this:

 "context"    : {"SHOT" : os.environ.get("SHOT","def123")}

the context could just as easily be defined by some other lookup, such as one defined by a function that looks it up from Shotgun. For example, this:

 "context"    : {"SHOT" : findShotgunShotByMedia(media)}

Hey, with the help of your guide, I am happy to report that we successfully created a subclass of the basic OCIO package, which loads our custom configs, sets spaces, etc.

We ended up baking a lookup file at “compile time” to avoid Shotgun requests, since RV is expected to be fast, apparently :slight_smile:

We haven’t got around to per-shot context variables yet, since it becomes more difficult to avoid querying Shotgun.

The next hangup we’re having is that the Channel Display options (bound to a r g b) do not work. It appears they are relying on the built-in color pipeline (in, or I might be interpreting it wrong.



Hi Mmoshev,

Check out the Color Channel Selection package that ships with RV, if you enable that, it’ll override the normal RGBA select mode with a mode that works similarly but is OCIO compatible.


Oh cool, thanks this works!


A post was split to a new topic: OCIO Setup Help (Steve)