OCIO config file in Blender Part 1 - Adding LUT file looks to your config.
Blender 4.0 release introduced a new color space called AgX, which is very close to the ACEScg color space. The advantage to work with Agx or ACEScg is that these color spaces avoids hot spots in the final render. The treatment of intensive light and high level exposure are much better than the Filmic color space. Another great advantage is the consistency when using an OpenColorIO config file. It's easier to build a pipeline upon it and, in case of need of modification in the future, it's very easy to adapt or switch to another color space: it's only needed to making changes to the ocio config file.
Unfortunately, Blender has no native option to load LUT files such .cube or .3dl. Up to now, the Blender artist needs to modify the config.ocio file to be able to use the desired LUT directly inside Blender. Fortunately, it's very easy to add a custom LUT file in the Looks roll out. This tutorial is about that. In a future tutorial (the second part), Slick3d.art will cover how to do more profound changes in the config.ocio file.
The Blender color management config files are inside the datafiles folder. It's located at the <the Blender installation folder>/<Blender version>/datafiles. On this example, the path is C:\blender-4.0.1-windows-x64\4.0\datafiles. Of course, the path will be different regarding where the artist installed Blender.
The config.ocio file is a simple text file which can be opened inside any text editor. inside the file, the artist will see the colorspaces and the Looks configuration. In this tutorial we are concerned with the Looks section.
Note that the indentation is mandatory. If the word isn't obeying the indentation, Blender will raise a colorspace error when loading and will set up only the standard colorspace.
For the best result, it's recommended to use a LUT through a Log transform. In this example, a LUT with the color palette from the movie Alien (1979), will be added to the Look option. The name is the choice of the artist. However, process_space must be AgX Log, if the artist is setting the LUT to be use with the AgX colorspace.
- !<Look>
name: AgX - Movie Alien
process_space: AgX Log
description: Alien movie color palette
transform: !<GroupTransform>
children:
- !<GradingPrimaryTransform>
style: log
- !<FileTransform> {src: filmic_to_0-60_1-04.spi1d, interpolation: linear}
- !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}
- !<FileTransform> {src: Alien-LOG.cube, interpolation: Linear}
Note the last line: Alien-LOG.cube is the name of the LUT file but, wait a minute: how Blender will know where the LUT file is located? For this, at the beginning of the config.ocio file, there is a parameter called search_path that contains all the folders that will be look at when Blender starts, looking for all LUTs that are available. Colon (:) is used to split each name folder.
In this example, the config was simplified (in the part 2 it'll be shown another way to do it). A folder named cinematic was created inside the colormanagement folder, containing all LUT files that can be used to make a look.
Then, the new search_path will be: search_path: "luts:filmic:cinematic".
The look entry was put right below the last one (False Color). Again, the correct indentation is mandatory.
Now, the LUT is available for use in the Looks roll out:
The same process can be used in previous Blender version. Actually, Blender 4 OpenColorIO configuration can be used in Blender 3.X., but this will be shown in the part 2 of this tutorial.
Which colorspace do you prefer? The choice is all yours, of course. For my work, I'll keep using ACEScg though.
What's Next?
Slick3d.art has created a set of vector displacement brushes that are hard surface brushes. This is the first set. The brushes will be update soon. They're available on the Slick3d.art Gumroad page and on the Slick3d.art Blendermarket page.