Demystifying Arri Alexa's Rec709 LUT
The Arri Alexa camera is one of the most popular cameras used in film and television production today. It has gained a great reputation among cinematographers around the world - arguing that it looks and feels like 35mm film. One of the most obvious reasons for this is the dynamic range of the footage. It is possible to hold information both in the extreme highlights and in the dark shadows. To keep as much dynamic range as possible, the camera encodes it's footage in what it calls LogC color-space. As it's a logarithmic curve, it not that far from Kodak's Cineon curve that has been used during the last 20 years when dealing with film scans.
By applying a logarithmic curve, the image will come out "flat" and without contrast, but that can easily be added back later. To do this, Arri developed an online LUT generator, where users can download LUTs in a number of different formats. A LUT generated via the LUT Generator will be named (for example):
The name of the LUT implies that the image is converted to Rec709 - which is also how the look is referred to during on-set viewing. By applying the LUT we get a much more pleasing looking image.
This all works very well and in many cases it's all you need. Render and be done. However, problems arise when doing visual effects work, for example in The Foundry's Nuke. Nuke works with a linear gamma (1.0) internally, and converts all footage to linear upon import. In the case of Alexa footage, a LogC > Linear curve is applied. To view these linear images we use a Viewer LUT, for example a Rec709 transfer function. This should then match the Rec709 LUT from Arri right? Let's compare the result:
See the difference? The Rec709 version has very bright highlights, looking overexposed. Comparing the color of the men's jackets we can also see that there's a color shift - they're green with the Arri LUT applied, but almost color-less in the Rec709 version.
To get to the bottom with what's going on, we must break down the color transformation in two parts, primaries and transfer function.
First of all, let's compare the transfer functions. Using the SliceTool in Nuke, we can compare the difference between the curve used by the Arri LUT and a standard Rec709 curve.
By looking at the curves, we can clearly see that the Arri transfer function roll-off highlights, while the standard Rec709 transfer function does not (and therefore the footage looks overexposed). In many ways, the Arri curve isn't that far off from how a film LUT works.
Using for example OpenColorIO or Lut Buddy, we can create a 1D LUT of the Arri transfer function and apply it to the image.
Now we're getting closer. See how the highlights no longer look overexposed? But still, the colors don't match and the image to the left looks desaturated.
Studying the above result we can be confident that the LUT that Arri applies is not just a simple transfer function, it changes the color-space primaries as well - meaning it's a 3D LUT. The camera encodes it's footage in a color-space known as wide gamut RGB, which looks very desaturated on a standard monitor. By applying the Arri lut, the wide gamut RGB primaries are converted into Rec709 primaries, which is what your monitor is using. This is what the Rec709 part in the LUT name refers to.
Looking at the LogC documents available at Arri's website (Alexa LogC curve - Usage in VFX), we can find the numbers we need to convert the wide gamut RGB primaries to Rec709 primaries (using a ColorMatrix node).
Success! After adjusting both the transfer function and the primaries our two images look the same*, and we have gained an understanding of how the LUTs available at Arri's website work.
Now that we know why Nuke's built-in Rec709 viewing LUT won't give the expected result, let's have a look at how we could add the Arri LUT to Nuke's Viewer LUT dropdown menu.
First let's remember the source and destination color-space of the LUT supplied by Arri: LogC, wide gamut RGB > Arri transfer function, Rec709. As stated earlier, all images in Nuke are stored with a linear gamma (ignoring the primaries), which means that in order to use the LUT we must first convert the linear image to LogC. Luckily, we can define the input color-space while registrating the LUT.
Add the following to your init.py file (changing the file path):
- nuke.ViewerProcess.register("Arri Alexa", nuke.createNode, ("Vectorfield", "vfield_file D:/luts/AlexaV3_K1S1_LogC2Video_Rec709_EE_iridas3d.cube colorspaceIn AlexaV3LogC"))
* Note that the two images do not match 100%, but my guess is that the wide gamut RGB > Rec709 conversion has been updated since the document was published.
** Note that I don't claim to be an expert in any of this, and this is just my interpretation of the color workflow of the Arri Alexa.