[ENHANCEMENT] Better LUT reader

penwinrawr
penwinrawr Posts: 6 Just Starting Out*

Checking the forum a lot of people found an error while reading LUTs (ERROR: "Invalid file format"), and the workaround to use it is to hide some of the information included within the .cube file:

This workaround allows the use of the LUT by ignoring the input range (the darkest and brightest values), but only works when the range was originally 0 to 1, otherwise the range gets ignored and the LUT doesn't work as intended.

The LUT effect should consider the LUT_1D_INPUT_RANGE and LUT_3D_INPUT_RANGE if written in the .cube file for the color changes, otherwise it can assign the range as 0 to 1.

The best uses for the better LUT reader are for LUTs that change from one color space to another, as they sometimes use different input ranges, but by solving this problem and interpreting the LUT information correctly, less people will encounter the "Invalid file format" error.