ART and OpenColorIO

Hi,
just a short piece of info for people that build ART from source: I have recently introduced an optional but highly recommended dependency on OpenColorIO v2 (OCIOv2 for short). This is used to enable support for CLF LUTs, which can be used to encode various powerful and flexible pixel-level operations. Specifically, by enabling OCIO, CLF LUTs can be used in the “film simulation” and the “color/tone corrections” modules. Note that there are currently a couple of patches needed to build and use OCIOv2 on windows with mingw-w64/msys, see here and here.

HTH

9 Likes

Humble helpful human. :dog:

As we have in MSYS2 mingw-w64-i686-opencolorio 2.1.2-2, is it useful to locally build OCIOV2?
thanks

Oh, I didn’t know :slight_smile:
Then you can certainly use that (note you would probably need the x86_64 version, not i686 though).

You are right!
I am going to try

edit: obviously, there is no pkg-config file in the shipped mingw64 package, as noted in your first patch.

@agriggio can you upload your pkg-config file? I will modify it by hand.

Please submit any patches to msys2/MINGW-packages.

Here’s what I have (in C:\msys64\usr\local\lib\pkgconfig\OpenColorIO.pc):

prefix=C:/msys64/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include

Name: OpenColorIO
Version: 2.2.0
Description: OpenColorIO (OCIO) is a complete color management solution
URL: https://github.com/AcademySoftwareFoundation/OpenColorIO
Libs: -L${libdir} -lOpenColorIO
Cflags: -I${includedir}

Thanks Alberto

edit : it builds ok and runs

Version: 1.15-60-g2395edb1a
Branch: master
Commit: 2395edb1a
Commit date: 2022-08-25
Compiler: gcc 12.1.0
Processor: Skylake
System: Windows
Bit depth: 64 bits
Gtkmm: 3.24.6
Lensfun: 0.3.95.0
Exiv2: 0.27.5
LCMS2: 2.13
LibRaw: 0.21.0
OpenColorIO: 2.2.0
Build type: release
Build flags: -fno-tree-loop-vectorize -std=c++11 -fno-tree-loop-vectorize -march=native -Werror=unused-label -fno-math-errno -Wl,–stack,4194304 -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -Wno-aggressive-loop-optimizations -DNDEBUG -O3 -ftree-vectorize
Link flags: -march=native -s -O3
OpenMP support: ON
Mi-malloc: V1.7
Build OS: Windows
Build date: 2022-08-25T13:26:04Z

Is there a txt file or some instructions floating around for building on Windows. I tried a couple of times using the suggested steps on the rawpedia link and subst the art repo for RT but it fails. I feel like I was able to build it a few months ago a couple of times but since then I get some errors…

I can be a bit more specific later…dashing off to work but if they are written down or you have a cheat sheet that you could share I would appreciate it…

TIA

I should be able to write a guide on the basis of rawpedia/windows (as I maintained it for a few years)
it’s WIP :thinking:
A first “preliminary and incomplete” draft here W10 build.odt – Keybase.pub

Your very kind. Thanks… I updated my build configuration a few times in the last month’s so it could be the issue or my syntax could be a bit off… thanks for taking the time to respond and help

I get this issue…I thought there was a typo but seem like not and answering yes or no still seems to fail… :slight_smile:

I dont know why in rawpedia the mingw-64-X86_64-pkg-config is listed in the packages to install.
The package to install instead is mingw-64-X86_64-pkgconf which is compatible and more modern.
Corrected in my draft.

Thanks I did get further along and even through to install but the exe fail throwing a few errors… I will try maybe from scratch again as I am sure there is just something small going on in there…thanks again for all your feedback…would be just all misguided trial and error without it…

Sorry if I pick this up again. I really don’t like self-advertising, but I have a feeling that I failed to communicate the significance of this new feature. Despite the name, CLF LUTs are not simply look-up tables, but can encode a sequence of different pixel-level operations, including matrix multiplications, ASC CDL operations, and per-channel transfer functions. What this means is that they are well suited to be applied in a scene-referred workflow, e.g. to implement “look transforms” or also “output transforms” (i.e. tone mapping operations from scene to display/output). For example, now it is possible to apply ACES output transforms directly in ART, or even color grade pictures using look+output LUTs developed for high-end professional cinema cameras such as ARRI and RED.

The only thing needed is to convert such LUTs to CLF and combine them with the appropriate color space conversions to/from ACES 2065-1 (which is the color space used by ART to apply CLF LUTs), all of which can be done with OCIO tools such as ociomakeclf and a bit of scripting.

As an example, I’m attaching one of the current candidate output transforms for ACESv2, converted to CLF. To use it, just uncompress it (or change the extension to .clfz), put it in the directory of your film simulations, and then apply it with the tone curve turned off, like this:

ACES ODT Candidate A - SDR.clf.gz (1.7 MB)

6 Likes

This is indeed really powerful stuff Alberto! I am not an avid LUT user myself, nor can I find other CLF LUT samples online, but a lot can be done with them it seems!

Perhaps @Andy_Astbury1 would be interested to take a look at the creative possibilities this generates?

1 Like

Hi,

The nice thing about this is that essentially any lut out there can be easily converted to clf with tools shipped with ocio and (if needed) a couple of color space transforms that can be implemented in a few lines of python.

Indeed. My original motivation was that I wanted to be able to use the output transforms that have been developed by the movie industry (such as the ARRI, RED and ACES ones that I mentioned above), as they are high quality, robust, and come in different flavours for different output displays (standard SDR screens, wide gamut, and fancy HDR ones), providing a consistent look throughout different output devices, which is the main (if not the whole) point of scene-referred editing…
But there are other applications as well. For example, the rgb color grading tool in art operates in linear space, but if you would like to grade in a log space, now you can: just apply a lin-to-log lut at the beginning and a log-to-lin at the end, and your grading layers in the middle.

1 Like

Next up: ART can now color grade video! :wink:

I know you are joking, but I have been playing with the idea of generating a CLF LUT out of an .arp sidecar. This would actually allow to grade video with ART – well, sort of :slight_smile: – using tools that support OCIO (such as Natron and – I believe – Nuke or even Resolve). I’m not really sure if I’ll do it, because I don’t do videos so this would be a purely academic exercise, but in principle it’s possible…

2 Likes

FYI, the patched opencolorio 2.1.2-3 package including the .pc file should be hitting the MSYS2 repos soon, and should hopefully work OOTB.

2 Likes

I’ve added some docs on how to generate CLF LUTs to be used in ART: agriggio / ART / wiki / Luts — Bitbucket

3 Likes