/lut-generator

Python script for making neutral LUT tables

Primary LanguagePythonMIT LicenseMIT

LUT Table Texture Generator

Python script for generating neutral LUT tables of different sizes. It supports both Unreal Engine style LUT (top down) and the Unity style LUT (bottom up).

Based on a GitHub gist by Koki Ibukuro.

Prerequisites

The script uses Python 2.7, OpenCV-Python and NumPy, which can be installed using pip (though perhaps not the recommended way, but it is easy).

pip install numpy
pip install opencv-python

Usage

The script can generate either a square layout or a long strip layout. Include --flipy for Unity style output.

python lut-generator.py --strip 32 --flipy output.png

python lut-generator.py --square 64 output.png

Options

-sq --square use square format - accepted values 16, 64, 256

-st --strip use strip format - accepted values 16, 32, 64

-fy --flipy flip the image vertically

Samples

Size Unreal Engine Unity
256x16 strip 256x16 lut_strip_16_256x16
1024x32 strip 1024x32 strip 1024x32

Unity Style Layouts:

Unreal Engine Style Layouts:

License

This project is licensed under the MIT License