Getting started with OCIO in RV

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 rvui.mu), or I might be interpreting it wrong.

Cheers,
Mois

6 Likes

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.

6 Likes

Oh cool, thanks this works!

5 Likes

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

@Michael.Kessler does the Color Channel Selection package have a color inspector also?
Pressing F5 with Channel Selection on throws an error invalid property name #RVLensWarp.warp.pixelAspectRatio, coming from rvui.render. I see the inspector is a separate module, so perhaps this has to be overridden to work with ocio?

2 Likes

I’d like to share our ocio package, which is built on top of the built-in one.

It selects an ocio config based on the media path, and selects color spaces depending on the media file type.
btl_ocio_source_setup.py (19.2 KB)

It can be built and installed with rvpkg, but I’ll defer these instructions to the manual for now.

Hopefully someone will find it useful as a base.

22 Likes

Mois,

Thank you so much for sharing your package with the community!

This is a known issue that we’re aware of and tracking internally. It looks like some of our UI code relies on RV’s built-in pipeline and doesn’t have all the graceful checks for the OCIO pipeline. We’ll be fixing this in the future.

However, if you would like to unblock this for yourself, you can either insert a dummy RVLensWarp node into the pipelinegroup or change the code in $RV_INSTALL_PATH/Mu/rvui.mu. There’s a function called pixelAspectFunc. If you wrap this function to skip setting the LensWarp, it should work.

1 Like

@alexaz yeah thanks, we already did the former after a round with support.
Having to do this is really not a big deal for development, as long as it is known.
Having it here on the forum might help. Perhaps should also be in the docs (not sure what the best place would be).

3 Likes

Hi,
the Color Channel Selection package is working fine for us. We are able to switch through the channels. But the “Alpha Type” is greyed out, which means we have limited optioins to merge CG layers in RV. Is there a workaround for this or will this be fixed with the future updates alexaz mentioned?!

ocio_alpha_type|471x370

Best,
Tobi

1 Like

Hey Tobias,

That’s actually a bug on our side! I’ve made an internal ticket to fix it, thank you so much for catching it!

So what happens is that the alpha type is determined during the RVLinearize part of the pipeline, but in the OCIO case the RVLinearize node doesn’t exist and is replaced with OCIO nodes instead.

I don’t know if there’s a workaround… You could try to put the RVLinearize node back in the pipeline group, but you’ll get double color transforms alongside with the OCIO.

We’ll need to fix it on our end, so that OCIO is better handled through our pipe.

Thanks,
Alexa

1 Like

Thanks for sharing this.
One thing that is missing is a step-by-step guide to pulling data from sg entities. I’ve been struggling to do this for some time without much success. A guide would be muchly appreciated! :slight_smile:
Thanks
p.

2 Likes

Could you elaborate a bit on “pulling data from sg”? If I understand correctly, you want to use something like the Shotgun api?

2 Likes

I actually finally managed to get this working.
I’ll try to prepare a little walkthrough when I have a chance so I can share it here.
When I mean “pulling data from SG”, I mean using Screening Room for RV to grab lut and cdl paths from shot entities so ocio env vars can be set dynamically on the fly. This doesn’t make direct use of the SG api, as I imagine that’s all wrapped in the RV screeningroom plugin.

3 Likes

Hi @Patrick if you could share how you got this working, it would be great. We would like to achieve the same thing at our studio. We use SG fields on a shot and show level to define CDLs, LUTS and Displays so would like RV to swap these out dynamically on the fly for each shot.

3 Likes

Hi, would it be possible to post what wrapping that function would look like? We’re stuck on 7.6.1 at the moment so would like to unblock this.

1 Like

@alexaz possible to post the snippet reflecting the change made in rvui.mu?

Is there a simplier version of such a script? I mean, I have exactly one input role and one output role. No shot / asset dependencies what so ever. Just “in” and “out”?

Trying and failing to get OCIO set up with our context variables.

In my OCIO config I have something like

'${SHOT_DIR}/color/${SHOT}.cc'

I’ve set my context in rv to hardcoded paths for now, hoping to work through that before I figure out dynamic stuff per shot.

"context" : {"SHOT_DIR" : "path/to/shot", "SHOT" : "shot_name"},

but it doesn’t seem to pass those contexts to the ocio search path. The error tells me “cannot find ‘$SHOT’ in search path”.

Any help?

Actually come to think of it, how do I even know RV is reading the rv_ocio_setup_sample.py script? It’s in my RV pythonpath at ~/.rv/Python

1 Like

RV should pick it up if the environment variable OCIO is set in the system before starting RV.
The OCIO variable needs to point to the config.ocio file.

I’ve got my OCIO env variable set, pointing to my config.ocio, but I’m still getting errors in RV where it doesn’t seem to pick up the context I set in rv_ocio_setup.py

1 Like