Compositor Addon: 3D LUT Editor

Hello,

[EDIT: New Version, complete rework]
I have written this addon mainly for video grading tasks as 3D Lookup Tables are a common way to do color correction and grading.


If you aren´t sure what the term 3D LUT means, you will find this link inspiring :slight_smile:
http://www.lightillusion.com/luts.html

In short:
The 3D Lookuptable works like the RGB Curves node, but in 3D Space. It allows to assign every input R,G,B value to a new one.

And how it works:
To use the Addon, you need to patch Blender using the attached patch file which adds an LUT node.
That code is based on previous work from Alex Babahin and is WIP.
It should compile with blender 2.69; Haven’t tried with 2.7 yet but seems that there was some refactoring in the nodes system :-/
http://wiki.blender.org/index.php/Dev:Doc/Tools/Patches

Create a new ApplyLUT node. If it is selected, the LUT Editor operators will appear in the Node Editor Panel:
Setup will create a 3d LUT structure in the 3d View with the Resolution of the steps value and it works on three ways:

  1. If you have already loaded a valid LUT in the node, the operator will generate that one with it’s native resolution.
  2. If you specify a file that doesn’t exist, a new LUT with the steps resolution will be created and saved as the file. This is where you want to start usually.
  3. If you have already opened an LUT and then delete the filepath in the node, the file will be overwritten with a new LUT with the given steps. This is the way to do a reset.

The Curves operator will translate an RGB Curves node to an LUT!
First select the Curves node, then add the LUT node to the selection (shift + RMB). Then click the curves button and the LUT in the node will be overwritten by a new one representing the curves.

The Iterate Operator allows to change the reslution of your LUT whie keeping the changes you have done.

The Save Operator will save the LUT to a new file.

The update operator, which is also found in the 3D View panel, will apply the changes you made in the 3D LUT to the LUT Node.
So does the Dynamic Update Button in the 3d view. This one is a modal operator which tries to update autmatically on changes.

The reset Operator in the 3D View Panel resets the selected points to their default positions.

Using the Color, the 3D pointer will show you where a specific color is located in the LUT Cube.
It´s intended to pick a color from your image and see which sphere you have to move.

If you set the viewport shading to textured, the LUT will become nicely colorful :wink:

Be careful: Creating of LUTs is quite slow because Blender is not fast when creating many objects. For high resolutions (+7), the setup operator may take MUCH time.

Attachments

LUT_0_9.py.zip (9.61 KB)

1 Like

Very cool tool. Thanks so much.

Hah, I’m glad I just found this (my old workflow was to dump the video frames to images, apply a Hald 3D clut to all of them using imagemagick, then coming back into blender for more work).

Any chance you could support importing an existing Hald 3D clut? I have a ton of film presets I think it would be really neat to apply to some footage!

New version added!

@pld,
With the ApplyLUT node you may apply LUTs easily. You need to convert the data to the color space the node works in of cause by using additional LUT nodes though.
An other way is to manually add the nodes to the OCIO config. In the Blender’s binary folder/2.69/datafiles/colormanagement you may copy the LUT into the luts folder and then edit config.ocio appropriately.

EDIT: Version 0.8 Added, should be working with relative paths, too. And should compile with recent GIT.

This could be one of the most usefull addon for blender but I cant find how to install it. Im using blender (on ubuntu) for a long time but im a noob in programming , but i hope there is a “easy” way to install it. Thanks!

@sunboy: Thanks for this very valuable addon which is the most desired. In the meantime, does it work with Blender v2.78?

It is a long time since you posted last time. However just wonder why Blender developers has not upstreamed such a desirable feature?!

A great Thanks. :cool:

Any news on this add on?
Will it be updated?
Or is it already part of the trunk?

Thanks

Yes, what about this under 2.8x?

1 Like

Hi, I’m new to Blender and was searching for a way to apply LUTs. Based on this old post, your add-on looks great. So, I even tried installing the older version of Blender. the 2.7.0 version and tried installing the add-on zip file attached here. But I couldn’t find that other patch you are mentioning here about Alex Babahin’s contributed one that let’s you load the LUT itself. I’m stuck from there and couldn’t try out your add-on. Could you please lead me to where I can find this patch? Or any way I can try out this 3D lookup table editor add-on you created? I’m stuck on loading any LUT itself. There seems to be no other way that the Blender 2.7.0 let’s you load a LUT. And so I couldn’t creat that Apply LUT node that you are mentioning in your post here. Though it has been long ago, I really hope I can try this out. Looking forward to your reply.

I bought another add-on that supposedly loads LUTs and it doesn’t and I haven’t received an answer from the developer to my questions. But it seems to work until Blender 2.79. It looks like there are problems with Blender’s colour management since 2.80. However, you can load LUTs in Luxcore now.