Several of us in the beta group have been discussing how to use OCIO in RV, and pitfalls we've run into. Alan suggested that others may find this info useful, so this is an unofficial forum thread to gather our thoughts together in one place.
OpenColorIO (OCIO) is a library developed at SPI and subsequently released as open source that centralizes color management. The OCIO website is a bit daunting to read through, and the file format isn't much clearer, but a simple way to think about OCIO is that it's a list of named color transformations that go to and from a reference space. This is sort of like how FedEx routes everything through a hub. In OCIO, the hub is the (usually linear) reference space. Once you've set up your transformations to and from the reference space, OCIO does all the work of generating LUTs on-the-fly that transform between your color spaces. Software that integrates OCIO can forgo using LUTs altogether by delegating all of the color details to OCIO.
How RV uses OCIO
RV has a single OCIO node type that can perform the role of "color" , "look", or "display". "color" is usually used in place of the usual RVLinearize node, "look" in place of the RVLookLUT node, and "display" in place of the "RVDisplayColor" node. Depending on the mode of the OCIO node, different properties are available. RV ships with a replacement source_setup package (ocio_source_setup) that allows you to switch back and forth between OCIO mode and RV-native mode in the RVLinearizePipelineGroup and RVDisplayColorGroup parts of the RV pipeline. It's as simple as disabling source_setup and enabling ocio_source_setup in the package manager.
Caveats
The linearize portion of this setup works great, but there are a few problems with the display portion. More and more, shows have per-sequence, or even per-shot LUTs or CDLs. And of course, supervisors want the option of viewing shots in the same color space in which they will be approved by the client. However, since displays are shared between sources in the default ocio_source_setup.py, it's not possible to use the Stack or Layout modes to compare different shots that have different display LUTs. Second, late in the beta period of 4.0.11 it was discovered that using the "display" mode of an OCIO node in place of the RVDisplayColor node causes the display to be blurred.
Solutions
Chris Mihaly at Disney hit on the idea of using an OCIO node in "display" mode in the RVLookPipelineGroup to solve both of these problems. We've also switched to this method, and are finding the side effect of per-source "display" color spaces so useful that we probably won't switch back to using the RVDisplayColor pipeline.
I've attached two modes, our modified ocio_source_setup.py and shotgun_ocio.py, another mode we use that sets context variables in ocio_context based on the source's sequence and shot (via Shotgun). ocio_source_setup.py is (I think) identical in behaviour to the official ocio_source_setup.py, except that it uses the RVLookPipelineGroup instead of the RVDisplayPiplineGroup for display. shotgun_ocio.py is pretty specific to our workflow, but others may find it useful as a starting point.
ocio_source_setup.py
shotgun_ocio.py
shotgun_fields_config_custom.mu
ocioconfig.py
rvocio_source_setup.py