Digital Bolex D16: Bolex Log

Following the release of firmware 1.5 “Elf” there hasn’t been any support in any major software for using Bolex Log with DNGs from your D16. This is going to be a fairly quick article showing how to use Bolex Log with Davinci Resolve. This article assumes you already have a basic knowledge of Resolve and can get to the point of having your timeline setup and ready for grading/dailies etc. I’ll include the math I used at the end of the article for those interested.

First off you’re going to download this LUT here. You’ll get a 442 MB .cube file. This LUT is much larger than your average 3D LUT (2563 vs 653). This is because we have a large range of values for BT.709 input (-0.05, 4.48), and we want to do precise color space transforms. So I used the maximum possible size according to the cube LUT spec. This reduces the amount of interpolation error and Resolve has no performance hit using this larger LUT.

Once downloaded you’re gonna want to copy the file to Resolve’s LUT folder. You can access it by going into Project Settings -> Color Management -> Open LUT Folder. Create a Digital Bolex folder and copy the cube LUT into it. When you’re done, hit “Update Lists” so you can use the LUT without having to restart Resolve.

openlutfolder

After that you want to make sure you have your Camera Raw settings done properly. First, make sure you’re using Rec. 709 for both color space and gamma. Some of you are probably wondering “why use Rec. 709? I thought Rec. 709 loses image data/detail. Why not BMD Film?”

Well, 709 is the default color space option. The less fiddling with controls you have to do, the better. And you would be correct about 709 losing information if it were encoded to a file already. But because the DNG is transformed to 709 in Resolve’s unclipped floating point engine, we can recover a perfect linear image because we know 709’s inverse function and its primaries. Which brings us to BMD Film. BMD didn’t publish any white paper on BMD Film at all. So we have no idea how to reverse the curve or the gamut.

Now that we’re past that, we need to make sure that highlight recovery is enabled so we can get extra goodness from our unclipped channel highlights. Make sure not to use the Pre Tone Curve or Soft Clip options. They don’t help us here at all and they change the underlying linear image.

With these settings you’re free to change your white balance and everything on the clip level as well in the timeline.

camraw
Forgive the poorly drawn shapes

Now that our CinemaDNG settings are done we can actually get to using the LUT. So, in a project where you have nothing but D16 footage, you can just set the BT.709 to Bolex Log LUT as the 3D Input LUT under color management.

lut

Once that’s done, you should see all of the detail that your D16 capture come back in range. Now you’re ready to grade. If you end up rendering out the Bolex Log footage but would like a way to reverse the transform for whatever reason, you can use the function and matrix available in the Bolex Log & Wide Gamut RGB Technical Summary.

Have fun getting the most from your D16!

example
DNG courtesy of Richie Allen. Split of Bolex Log and D16/film look LUT

MATH!!!

Okay, I’m not gonna into all of the math for the LUT. Just the general flow of it.

First is reversing the BT.709 curve using the following:

if (input[i] < 0.081)
lin[i] = input[i] / 4.5;
else
lin[i] = pow((input[i] + 0.099) / 1.099, 1.0 / 0.45);

Once linearized we can convert the gamuts. I pre-calculated the matrix to convert the 709 gamut to Bolex Wide Gamut. Instead of using conventional 3×3 3×1 matrix multiplication to convert the RGB values, I used the method described by Jon McElvain and Walter Gish of Dolby Labs. This minimizes color errors as we get closer to the boundaries of the gamuts.

// Convert gamut
double mat[9] =
{ 0.6537569872724, 0.2676207478388, 0.0787012220866,
0.0682990061249, 0.8001173304931, 0.1315446060485,
0.0125090201694, 0.0773426564045, 0.8250305747061 };

double sigma = lin[0] + lin[1] + lin[2];
double p = lin[0] / sigma;
double q = lin[1] / sigma;

value[0] = ((mat[0] - mat[2]) * p + (mat[1] - mat[2]) * q + mat[2]) * sigma; // red
value[1] = ((mat[3] - mat[5]) * p + (mat[4] - mat[5]) * q + mat[5]) * sigma; // green
value[2] = ((mat[6] - mat[8]) * p + (mat[7] - mat[8]) * q + mat[8]) * sigma; // blue

Now that gamut conversion is done, we can take our wide gamut, scene-referred linear values and encode them to Bolex Log.

if (value[i] >= 0.0149480)
out[i] = 0.2756705 * log10(5.5555556 * value[i] + 0.0280665) + 0.4150634;
else
out[i] = 5.9861078 * value[i] + 0.0625265;

And that’s the basic transform pipeline. Thanks for reading!

Using Rec. 2020 as a Starting Point in DaVinci Resolve 11

Most CinemaDNG compatible programs don’t give many options in the way of suitable starting points right out of the box, so we’re forced to tweak what the program gives us until we have a neutral place to start our grade from. More often than not, the problem is that the colors are too vibrant and are oversaturated. This has to do with the fact that these programs, more than likely, adhere to the sRGB color space. Such is the case with Resolve, the only options being Rec. 709, P3D60, and BMD Film. The problem with this is that when dealing with footage from a cinema camera that doesn’t have a documented, wide gamut color space, we don’t get to see the “cinema” colors from the footage. This is because cinema cameras recording raw data capture a much wider range of colors than sRGB can properly display.

Now in order to make this process of getting to a better starting point a little less painless I’ve created a LUT that puts your footage into the ITU Rec. 2020 color space when coming from Rec. 709 or sRGB (709 and sRGB share the same color gamut). Rec. 2020 is a much wider color space than sRGB, so the footage will appear less saturated compared to when viewing in sRGB. This should provide a more “neutral” starting point for you to grade your footage from.

rec709_rec2020
Illustration of the Rec. 2020 and Rec. 709 color gamuts. As you can see, Rec. 2020 fully encompasses Rec. 709 and more.

Note: All of the color spaces mentioned are display standards. sRGB is defined by the IEC, and is used by most computer displays. Rec. 709 is defined by the ITU, and is used by most HD televisions.

Using the LUT

First you’re going to have to download the LUT; it should be a “.cube” file.

Some people on Mac have reported that the file gets downloaded as a “.cube.txt” file. While I haven’t experienced this on my Mac, others reported this fix:

  1. Right click the file and go to Get Info
  2. Change the extension back to “.cube” and untick the hide extension box

Next go ahead and install the LUT. The easiest way to do this is start up Resolve, open the default project, then go to the Project Settings by hitting the cog in the bottom left corner. From there go to the Lookup Tables tab and hit Open LUT Folder. Then just copy the LUT into the folder. Then back in Resolve, hit Update Lists. Now you can use it in any project. To use it on all imported footage, without having to add a node for it on every clip, set it as the 3D Input Lookup Table.

Now you just need to adjust your settings in the raw panel. Make sure the color space is set to Rec. 709 and your gamma is set to Linear. I can not stress how important this is. If these aren’t set correctly, you will not get results that are compliant with the LUT’s intent. The LUT mathematically converts these values to Rec. 2020 so it’s possible to reverse it later if need be. While in the raw panel, you should do any raw adjustments you need to, e.g. exposure or highlight/shadow recovery. Now you can grade to your heart’s content!

Camera Raw panel in Resolve 10. Feel free to change White Balance and any other raw settings; these affect the image before any color space correction and are better than fixing it after the fact.
Image displayed in Rec. 709 color space with a -0.5 exposure adjustment. No other adjustments made. Image courtesy of Thomas Blake Ramsey.
Same image displayed in the Rec. 2020 color space with the same -0.5 exposure adjustment.

I hope y’all found this helpful. You can put any questions in the comments section below, and you can also find me on the Digital Bolex forums under the handle iaremrsir. Thanks for reading my first ever blog post!