Color LUTs (Lookup Textures) are tables of RGB color values. In Spark AR, you can use color LUTs to quickly create color-graded effects across the whole scene.
When you’re starting out it’s a good option to download a color LUT from AR Library. You can also import your own pre-made color LUT PNG files. Spark AR Studio supports 2D color LUTs in square and row image formats.
An 8 x 8 square-format color LUT (8 squares x 8 rows):
A 1 x 32 row-format color LUT (32 squares x one row):
To create a color-graded filter effect in Spark AR you need a color LUT plus another input texture, such as the camera texture.
The color values of the camera texture are mapped to the x, y and z coordinates of a location in the color LUT. This location contains a corresponding output color that is rendered over the scene to produce the color-grading effect.
Below we’ve added a yellow-tinted effect to the scene on the right by mapping the color values of the camera texture to a new color based on an amber color LUT.
First, to add a color LUT to your project:
When you import a color LUT, the compression is always set to None, and filtering is set to Low by default.
A patch graph is set up automatically that will apply the color LUT across the whole scene.
The patch graph that renders the color-grading effect looks like this:
To create the effect: