Wed Sep 30, 2015 1:04 am
Resolve LUT Info
3D Format (.cube)
The LUT file needs to have an extension of .cube
While described as a 3D LUT format the .cube file could contain ...
○ 3D LUT data (only)
○ 1D LUT data (only)
○ Both a 3D LUT and a 1D 'shaper' LUT.
Irrespective of what data a .cube file contains (1D, 3D or both), it is always displayed by Resolve in the
3D LUT section.
Lines beginning with # are considered comments. All comment lines need to be placed before the
header lines.
3D LUT data (only)
There is a header of 2 lines:
LUT_3D_SIZE N (where N is the number of points along each axis of the LUT.)
LUT_3D_INPUT_RANGE MIN MAX (where MIN is the minimum input value expected to be
passed through the 3D LUT. Like wise for MAX.)
Followed by this are NxNxN rows of RGB values between 0.0 and 1.0. Each row has 3 floating point
numbers separated by a space (space delimited). The data is ordered as red major (red fastest)
Top few lines of a sample .cube 3D LUT file which would contain 33x33x33 rows of 3D LUT data and
expects input in the range 0.0 1.0:
LUT_3D_SIZE 33
LUT_3D_INPUT_RANGE 0.0 1.0
0.000000 0.000000 0.000000
0.047059 0.000000 0.000000
0.101961 0.000000 0.000000
0.156863 0.000000 0.000000
0.207843 0.000000 0.000000
0.262745 0.000000 0.000000
0.321569 0.000000 0.000000
0.376471 0.000000 0.000000
0.427451 0.000000 0.000000
0.482353 0.000000 0.000000
0.537255 0.000000 0.000000
0.592157 0.000000 0.000000
1D LUT data (only)
The 1D LUT data requires a header with the following two fields
LUT_1D_SIZE N (where N is the number of points in each channel of the 1D LUT)
LUT_1D_INPUT_RANGE MIN MAX (where MIN is the minimum input value expected to be
passed through the 1D LUT. Like wise for MAX.)
This is followed by N data lines with 3 floating point values per line with a space separating them (first is
R, second is G, third is B)
Top few lines of a sample .cube file containing 1D LUT data only. It contains 4096 rows of 1D LUT
data and expects input in the range 0.0 1.0:
LUT_1D_SIZE 4096
LUT_1D_INPUT_RANGE 0.0 1.0
0.000000 0.000000 0.000000
0.047059 0.047059 0.047059
0.101961 0.101961 0.101961
0.156863 0.156863 0.156863
0.207843 0.207843 0.207843
0.262745 0.262745 0.262745
0.321569 0.321569 0.321569
0.376471 0.376471 0.376471
0.427451 0.427451 0.427451
0.482353 0.482353 0.482353
0.537255 0.537255 0.537255
0.592157 0.592157 0.592157
1D 'shaper' LUT and 3D LUT data
When a .cube file contains both 1D and 3D LUT data the 1D LUT data is treated as a 'shaper' LUT
and is applied first with the output from the 1D 'shaper' LUT section then being fed into the 3D LUT
section.
A .cube file containing a 1D 'shaper' LUT and 3D LUT data requires a header with the following fields
LUT_1D_SIZE N1D (where N1D is the number of points in each channel of the 1D 'shaper' LUT)
LUT_1D_INPUT_RANGE MIN1D MAX1D (where MIN1D is the minimum input value expected
to be passed through the 'shaper' 1D LUT. Like wise for MAX1D.)
LUT_3D_SIZE N3D (where N3D is the number of points along each axis of the LUT.)
LUT_3D_INPUT_RANGE MIN3D MAX 3D (where MIN3D is the minimum input value expected to be passed through the 3D LUT. Like wise for MAX3D.)
This is followed the 1D 'shaper' data: N1D data lines with 3 floating point values per line with a space
separating them (first is R, second is G, third is B).
Followed by the 3D data: N3DxN3DxN3D rows of RGB values between 0.0 and 1.0. Each row has
3 floating point numbers separated by a space (space delimited). The data is ordered as red major (red
fastest).
Below is an example of a sample .cube file containing 1D 'shaper' LUT and 3D LUT data. It contains 6
rows of 1D LUT data with input in the range 0.0 1.0 and 3x3x3 (27) rows of 3D LUT data with input
in the range 0.0 1.0
# Sample 3D cube file containing 1D shaper LUT and 3D LUT.
# 1. The size and range of both the LUTs should be specified first.
# 2. LUT_*D_INPUT_RANGE is an optional field.
# 3. The 1D shaper LUT below inverts the signal
# 4. The 3D LUT which follows inverts the signal again
LUT_1D_SIZE 6
LUT_1D_INPUT_RANGE 0.0 1.0
LUT_3D_SIZE 3
LUT_3D_INPUT_RANGE 0.0 1.0
1.0 1.0 1.0
0.8 0.8 0.8
0.6 0.6 0.6
0.4 0.4 0.4
0.2 0.2 0.2
0.0 0.0 0.0
1.0 1.0 1.0
0.5 1.0 1.0
0.0 1.0 1.0
1.0 0.5 1.0
0.5 0.5 1.0
0.0 0.5 1.0
1.0 0.0 1.0
0.5 0.0 1.0
0.0 0.0 1.0
1.0 1.0 0.5
0.5 1.0 0.5
0.0 1.0 0.5
1.0 0.5 0.5
0.5 0.5 0.5
0.0 0.5 0.5
1.0 0.0 0.5
0.5 0.0 0.5
0.0 0.0 0.5
1.0 1.0 0.0
0.5 1.0 0.0
0.0 1.0 0.0
1.0 0.5 0.0
0.5 0.5 0.0
0.0 0.5 0.0
1.0 0.0 0.0
0.5 0.0 0.0
0.0 0.0 0.0
DaVinci Resolve Product Manager