Ocio device output color

Hi,
I am not a strong python developer but I was able to modify ocio_source_setup.py such that any EXR opened in RV will use the proper ACES colorspace for our project. What I am having trouble with is automatically setting one of our devices (2nd monitor) to ‘Output - Rec.709’. I have been going through the docs and examples but can’t seem to find the right path to take. Can anyone recommend a way, ideally in ocio_source_setup.py that I can set the output to my desired colorspace? I don’t want our artists in one location having to manually set the input and output colorspaces for a particular display. Thanks for any suggestions.

All I could think of to try was to set the look in ocio_config_from_media() in nodeType RVLookPipelineGroup but it doesn’t recognize “Output - Rec.709”.

    	result = [
    {"nodeType"   : "OCIOLook",
     "properties" : {
         "ocio.function"     : "look",
         "context" : {},
         "ocio.inColorSpace" : OCIO.Constants.ROLE_SCENE_LINEAR,
         "ocio_look.look"    : "Output - Rec.709"}}]
return result

Hey @cable,

Have you had a chance to take a look at the OCIO Getting Started guide?

I think what you’re looking for is the OCIODisplay node. The ocio_display.display is whatever you define in your OCIO file for the display transform. Here’s an example for a default display:

elif (nodeType == "RVDisplayPipelineGroup"):
    display = config.getDefaultDisplay()
    result = [
        {
            "nodeType": "OCIODisplay",
             "context": context,
             "properties": {
                 "ocio.function"        : "display",
                 "ocio.inColorSpace"    : OCIO.Constants.ROLE_SCENE_LINEAR,
                 "ocio_display.view"    : config.getDefaultView(display),
                 "ocio_display.display" : display }}] 

If you’re looking for something more than default, take a look at how the view nodes are defined here:

the config is the OCIO API to query whatever you have in your config. You can try other functions that are defined there, here’s the official docs: https://opencolorio.readthedocs.io/en/latest/api/c_config.html

Hope this helps!

Thanks,
Alexa

Thank you for the information. It did lead me to resolve the issue.
As a reference for my future self I had to manually change the view.
“ocio_display.view” : “Rec.709”,
“ocio_color.outColorSpace” : OCIO.Constants.ROLE_COLOR_PICKING,

This set the output color to Rec.709 and properly set the OCIO menu.
Appreciate it.
-Cable

1 Like

Glad you got this resolved! Thank you for sharing the solution too, this is greatly appreciated. Someone who stumbles into this question from the future will have a lovely answer.

– Alexa