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
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:
- If you have already loaded a valid LUT in the node, the operator will generate that one with it’s native resolution.
- 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.
- 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
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)