Generate a LUT Color Space Transforms¶
Lesson Plan
Generate a LUT from Blackmagic’s Custom Color Space to sRGB or Linear sRGB.
Note
The general concept described in this article can be applied to any camera. We include the reference implementations using a BMPCC4K.
If you would like to include another camera, please consider adding a guide!
Motivation¶
In a workflow like BURN Workflow, there are two recordings:
a high-quality 4K Raw file to your camera’s removable media cards, such as an SDCard, USB-C hard drive, or CFAST card. The Raw file should use a wide-gamut color space, and preserve as much image data as possible.
a 1080p HDMI/SDI clean-feed to Unreal for use in Composure. The HDMI feed should use the sRGB linear color space, which matches Unreal.
Diagraming the physical components and color spaces, we get:
The Problem¶
The [BMPCC4K] records Blackmagic Raw files in a custom wide-gamut color space. By default, the camera’s HDMI video feed will use the same color space as its internal recording. Our camera uses [BlackmagicDesignFilmGen1].
Unfortunately Unreal does not know anything about this color space, meaning the footage will look incorrect. It will either be too dark, or washed out.
OCIO, a tool used by Unreal to convert between color spaces, also doesn’t know how to convert the BlackmagicDesignFilmGen1 color space. Thus, we cannot send an HDMI feed from the camera without first converting to a known color space.
Solution¶
We can tell the camera to send a color space that Unreal and OCIO recognizes. In this case, sRGB Linear.
Alternative Approach Using OCIO
An alternative would be to Customize OCIO to add BlackmagicHelp Wanted.
To send sRGB linear from the camera, we apply a LUT specially generated to transform video from BlackmagicDesignFilmGen1 to an OCIO-friendly color space like Rec.709, sRGB, or sRGB Linear. We have to manually create the LUT, but it can be generated using DaVinciResolve.
We only use the LUT to transform the HDMI signal. The Raw file recorded internally to the camera should not be affected.
In this example we will use transform to sRGB Linear.
Generating a LUT in Resolve¶
Our camera lets us apply a LUT before sending the image over HDMI. We will use DaVinci Resolve to create a LUT which maps your cameras native color space to your preferred color space. In our case, from BlackmagicDesignFilmGen1 to sRGBLinear.
Open Resolve and import any clip, an image, etc. It doesn’t matter but we need a clip to “apply” our transforms to.
Go to the Color Grading tab, and in the Nodes library search for Color Space Transform
Add the transform to your node.
Set your input and output color spaces accordingly. The input space is whatever your camera uses, and the output space is sRGB with appropriate gamma:
Gamma 2.2 is the sRGB default gamma used by computer monitors.
Gamma 2.4 is used by Rec.709 which is for HDTV.
Linear is best when importing to another VFX program, including Unreal, and Nuke.
Also disable Tone Mapping, Forward OOTF, and Inverse OOTF.
How Do I Find My Camera’s Color Space?
See Find My Camera’s Color SpaceHelp Wanted if you’re unsure which input space to use.
With the color transform applied, right-click the clip and choose Generate LUT. The BMPCC4K uses a 33 point LUT.
Save the file wherever you like. It is now ready to be used as a color space transform in your camera, or anywhere else!
Applying a LUT to the BMPCC4K
Next, see BMPCC4K Applying a LUT to the HDMI OutputHelp Wanted.