AWS Thinkbox Discussion Forums

OpenColorIO

Hello Draft users! I’m in the process of adding OpenColorIO support to Draft. I’m adding the functionality I think you’ll want, but it would be great to have feedback from you to hear how you would like to use OpenColorIO in your Draft scripts.

Cheers,
Andrea

Hi Andrea,

that is great news!

The standard implementation is sufficient for us (if Draft can read the OCIO “PATH” to find the config.ocio, all is fine…)

Thanks!

Timor

Currently, Draft will find the OCIO path if it is set, or look for a config.ocio if it isn’t (first for included configs, then locations in PATH), or you can specify OCIO using a function call. Once OCIO is set, I’m assuming people would actually like to use the LUTs? :wink:

Following the pattern we use for other LUTS, I’ve added CreateOCIO (takes two colorspace names defined in config.ocio), CreateOCIOFromRoles (takes two role enumeration values), and CreateOCIOFromColorSpace (takes the name of a colorspace, the direction of the colorspace, and the desired direction of the transform). From the “lut” created using one of these methods, you can Apply it to images, or get the Inverse.

There appears to be a bunch of stuff in the API meant for generating config.ocio files.

From what I’ve described, does it look like I’ve covered your use cases, or have I missed something?

Cheers,
Andrea

Great news! I think this would cover it, we would basically be using it to apply/bake luts yep.

cheers
l

Cool!

Update: With the “CreateOCIOFromColorSpace” I was really wanting to create a LUT from a file, but couldn’t find the right stuff in the API then… we’ve got that working now, so this has been replaced with “CreateOCIOFromFile”.

It would be nice if you wrapped the OpenColorIO .cube reading. So that we could use something like:

lut = Draft.LUT.readLUT('\\path\to\lut.cube') 

I believe CreateOCIOFromFile should work for that… just to confirm, you’re thinking: lut = Draft.LUT.CreateOCIOFromFile( '\\path\to\lut.cube' ) lut.Apply( img )
(Or did you want to read two cube luts, then use them as ColorSpace in and ColorSpace out?)

Could you point me in the direction of a .cube lut I can download for testing? (Or do you have one you can send me?) Thanks!

Ok, if it’s that easy, great! I just remember using a cube as a LUT in Nuke and I had to wrap it in an XML with some peripheral nonsense to make it like an “OCIO File” or something. I can’t remember exactly but it was more work/steps than just directly loading a .cube.

Here is a .cube that takes linear and applies a cineon log curve (lin2log).
lin2log.zip (90.2 KB)

Yeah, OCIO likes having configuration files, which I suspect is what you’re thinking of. I just tested your lut, and it works just fine as-is. (Well, it gave my test image that funky cineon look. :wink: ) But, for when you prefer to have a config.ocio, the new Draft will be able to do that too. :wink:

You can actually use it in Nuke without the headache too… the node can be found under Color -> OCIO -> OCIOFileTransform.

Ooo! Good tip. Wouldn’t have helped me though because it was a viewerLUT which has to be setup in NUKE_PATH directory. And good to hear the OCIO function can be used without a config file. In that case I’m all good. Just needed .cube support.

This is really good timing Andrea!

Our supervisor in here just asked for custom lut support in making quicktimes - is this something we can use in deadline 6 with an updated draft module? We’re on full current support but I don’t know if we’d move to 7 just yet.

Cheers!

John

John: I’ve sent you an e-mail.

Privacy | Site terms | Cookie preferences