[Bf-committers] Updating OCIO luts in runtime

Björn Sonnenschein green at unitybox.de
Fri Jan 24 22:16:57 CET 2014

Is there a way to check the luts folder/the ocio config file for changes
while runtime?

The background is that I would like to write an lut node for the
compositor that allows to apply lookup tables via ocio conversion like
color grading applications like Davinci Resolve do. The purpose is to be
able to bake color grading setups into a simple 3d lut that may be
applied in other projects and shared with other users easily. In
contrast to the film response curves blender provides for the final
color space transformation, an lut node makes it possible to use luts in
every position of the grading workflow. For Example I may use premade
luts for my Blackmagic camera to get a good starting point for further
grading work. 

I have already written a proof-of-concept 3D lut editor addon for
It sets up a 3d scene with a 3d lut cube whick can be manipulated and
then creates a rudimentary node tree that uses the position values of
the spheres in the lut for calculating the new picture.
Now, the real purpose of the script would be to parse a new lut file
into the ocio folder with the corresponding values of the created 3d lut
and also make the entry into the ocio config file and then, if you
manipulate the the 3d lut in blender, update the lut file and then make
ocio update the luts it has loaded so that you can get a realtime
preview of what you do using the compositor with the lut node.

My plan to realize the update of the lut cache would be to implement a
function to do this into the lut node which may be accessed by the user
to update the lut list if he has added a downloaded lut to the folder
and also by the python api so that the script may call it.

By the way, does anyone know how to work with .cube luts coming from
davinci resolve in ocio properly and in which color space they have to
be applied? I have tried this one
by creating a new pseudo color space which interprets the input image as
sRGB, converts it into Blender´s Linear space and then applies the lut,
but this does not create the right results (You may simply try it out
with the image pairs on the website if you like). 

Kind regards,
Björn Sonnenschein

More information about the Bf-committers mailing list