Using environment variables/context to point to a colorspace


do...@...
 

Hi,

I did post this question to OCIO-users and did not get any reaction, so I'm trying here as it might be a question related to development. Anyway I'm sorry if this is against posting rules.



I've been implementing OCIO at our company. Thanks a lot for your efforts with this project, it is making things a lot easier for me, and more future proof.

I'm using per-shot viewer luts using context variables inside the OCIO nodes in Nuke. That works like it is supposed to. 

I'm facing some difficulties from the fact that on our projects (mostly television commercials) we frequently get footage shot with different cameras. I'd like to find a system to avoid having to tell the artist which camera has been used for which shot. I'd like to define a 'CameraRaw' colorspace that would point to other colorspaces in function of a context. So for example I would define it like this :


- !<ColorSpace>
    name: CameraRaw
    family: ""
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Camera Raw depends on context
    isdata: false
    allocation: uniform
    allocationvars: [-0.125, 1.125]
    from_reference: !<ColorSpaceTransform> {src: linear, dst: $CAMERARAW}

I tried this and in Nuke I used an OCIO colorspace node, setting the out colorspace to CameraRaw, and setting the context of the node of key1 =CAMERARAW and value1 = Alexa_Rec709
Of course the Alexa_Rec709 colorspace is also defined in the config file.

When I do this get an error from Nuke's viewer. OCIOColorSpace1: BuildColorSpaceOps failded, null dstColorSpace.

I'm not sure this is a bug report or a feature request. Anyway I think it would be quite valuable to be able to use context variables/environement variables to not only point to files on the disk but to other colorspaces as well.

Regards

Donat Van Bellinghen

Join ocio-dev@lists.aswf.io to automatically receive all group messages.