As of Resolve 12.5, it is now possible (Studio version only) to create DCTL (DaVinci Colour Transform Language) files which are mathematically expressed transforms, similar to GPU fragment shaders. These can be used like LUTs, but with higher precision and without the range limitations inherent in LUTs. One use for these is to implement a custom ACES IDT, for example when a new camera is released, or a manufacturer adds a new recording colour space to an existing camera, but Resolve has not yet been updated to include it as an IDT.
DCTL is relatively similar to the CTL used by the IDTs in the ACES repository. This means that it is not too difficult to convert a CTL file to a DCTL one, to add a new IDT to Resolve. You do however need to bear a few things in mind.
Published IDTs convert from the camera colour space to linear ACES. Neither of the ACES options in Resolve are linear. ACEScc follows the Academy’s spec, and DaVinci ACES has AP1 primaries (like ACEScc) and a gamma of 2.6. This means that when you select an IDT of “None” in Resolve, a transform is still applied to convert to ACEScc or DaVinci ACES from the supposed linear ACES of the source image. When writing a custom IDT you need to add code at the start to remove the curve of the particular Resolve working colour space, and to apply an AP1 to AP0 matrix. You then need to add code at the end to return the image to the working colour space. This also means two versions of the DCTL file are needed, one for DaVinci ACES and one for ACEScc.
This may all sound very complex, but for anybody familiar with basic scripting it does not take too long to get your head around! I have an example custom IDT which I will send out at no charge if people email me on nick[at]antlerpost[dot]com.
The example is taken from the idt-alexav3-logC-EI800.ctl file in the ACES repository. The built in IDT in Resolve (last time I checked) used the EI1000 version. While the difference is extremely subtle, I created it in order to exactly match results in Resolve with those in other ACES implementations. Even if Blackmagic design change the behaviour of Resolve to use the EI800 version by default, I hope my example will still prove useful for people wanting to create their own IDTs.
While it might also be possible to create custom ODTs using DCTL, because the RRT and ODT use numerous CTL library functions, it would be necessary to convert all those to DCTL as well. I plan to experiment with doing this, but have not yet done so. Currently custom ODTs I have created for Resolve use a combination of mathematical transforms and 3D LUTs. If you are careful when creating the LUTs, and implement only the part which is absolutely necessary as a cube, good results can be obtained. Indeed, I believe OCIO uses this same approach to good effect.