DaVinci Resolve DCTL and OFX Plugins

Tags: #<Tag:0x00007fd5a8e5e298> #<Tag:0x00007fd5a8e5df78> #<Tag:0x00007fd5a8e5d9d8> #<Tag:0x00007fd5a8e5d348> #<Tag:0x00007fd5a8e5cda8> #<Tag:0x00007fd5a8e5c4c0> #<Tag:0x00007fd5a8e57df8>
(Charles Boileau) #100

Would it be possible to have a LMT that could help with chromatic aberrations? Or is that far fetched?

(Paul Dore) #101

There’s a simple Chromatic Aberration and Lens Distortion OFX DCTL that could be used

CA_Lens_Distortion_OFX DCTL

(Paul Dore) #102

This video covers some of the LMT PFE OFX DCTL code.

LMT_PFE_OFX.dctl (22.0 KB)

1 Like
(Charles Boileau) #103

Just saw that you have allot of tools on your github. Very cool. Thanks allot @Paul_Dore!

1 Like
(Charles Boileau) #104

@Paul_Dore: seems like it fixed the problem.

Thanks again

(Steffen Paul) #105

Hi Guys,

this is probably just a minor thing, but I can’t seem to figure it out. I am trying to call an external LUT from a basic DCTL but it’s doesn’t work. If I apply the DCTL via the OFX Plugin nothing happens, and when I load the DCTL into a Node without the plugin I get the “Error Processing Davinci CTL” - error. This also happens when I use the example DCTL “LUTApply.dctl” from the “…/Developer/DaVinciCTL/” Folder. I have tried to reference various Lut’s in .cube format, with absolut or relative path. I have also tried Resolve 15.3 and Resolve 16b1 on OSX.

Any ideas are very welcome.


(Paul Dore) #106

Try this example to see if it will work (place it in Resolve’s main LUT folder Blackmagic Design/DaVinci Resolve/LUT)

DEFINE_LUT(Rec709_Kodak_2383_D65, Film Looks/Rec709 Kodak 2383 D65.cube)

DEVICE float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B)
float3 rgb = APPLY_LUT(p_R, p_G, p_B, Rec709_Kodak_2383_D65);

return rgb;

If the DCTL is in a folder within Resolve’s main LUT folder e.g. Blackmagic Design/DaVinci Resolve/LUT/DCTL/DCTL_LUT , then the top definition would be

DEFINE_LUT(Rec709_Kodak_2383_D65, …/…/Film Looks/Rec709 Kodak 2383 D65.cube)

It might get a bit tricky if you’re moving the DCTL to different locations while running tests, especially with the DCTL OFX Plugin, so you might have to restart Resolve instead of just clicking Update Lists in Project settings.

1 Like
(Fabián Matas González) #107

Hi guys, and Paul. First of all thanks Paul for all the effort you are putting into your plugins, I have been using them in some of my works with nice results…

As a long time ACES user I want to take a step forward and try to make custom pipelines and avoid resolve one. I have been toying with your dctl/ofx without luck. I have two questions( I tried check around the forum but I didnt find any concrete answer or maybe It was lost in a wall of text).

-First is about IDT for R3D files, I just found the IPP2 one in the .h library, is it because is still not implemented, I tried check on OCIO libraries but they in python so I understand the libraries are custom made by Paul, I’m wrong?

-Second is much more easy, trying the plugin(I know the dctl is better but I just wanted to check everything was alright before) I didnt get the desired results:

Process= Standard
IDT:Alexa Raw

NODE:2 :Grading etc…

ACES from ACEScct
RRT Enabled
ODT: rec709 100nits Dim

I’m getting really funky results( Note I tried the workflow with the ACES Resolve ofx and It worked as intended)

-Lastly I would like to ask If It will be a good practice to create the pipeline with the ofx plugin and then export the dctl so we get the best of both worlds.

Thanks in advance and sorry if It has been answered elsewhere).

(Paul Dore) #108

With R3D files, you would use the Colour Space Transform OFX Plugin in the first node to convert to ACEScct AP1.

See post 83

You can do this, but it’s not a substitute for understanding how to build a pipeline directly with the ACES DCTL set. If you’re looking for short-cuts in this regard then you’re only inviting trouble on yourself.

1 Like
(Fabián Matas González) #109

Thanks Paul, No troubles here for writting the dctl, just sometimes client presses a lot !!!

(Steffen Paul) #110

Thanks for the code Paul!

it took me a while to figure it out, but the underscores bevor and after “DEVICE” where missing. I think they might be trunkated when pasting code into this forum.

(Paul Dore) #111

Demonstration of some of the LMTs in ACES TOOLS, as well as an approach to grading CinemaDNGs in ACES


1 Like
(Fabián Matas González) #112

Ok, I have been testing the DCTL(for DR 16) all day, I found some stuff on the sample:

The RRT function is on capital letters but in the library is on lowercase.

The IDT for Alexa Raw it has two 00 more at the end. I’m also not sure about this IDT since I’m using it with arriraw footage and it goes almost fully white, the other Alexa IDT works fine, I tried find info about this IDT but didnt find so maybe is special?

-I have a question about where does the dctl work. I mean, I should cut the pipeline in the middle to work in the node between( As I would do with the standard ACES plugin, or does the dctl work some stuff(IDT) before the node operation and the others at the end? Like it would happen if you use the color management tab.

I will keep checking and thanks for all the hard work Paul!!!

(Paul Dore) #113

This should be changed back to uppercase. I was running tests with the new Combo Box option and there was a conflict, but uppercase maintains compatibility with the ACES 1.1 plugin.

I forgot to add the 00 to the end of the function name. The function itself is a direct translation from the original CTL header, which was probably not intended for use within Resolve in its current form. It’s in the library purely for the sake of inclusion. The exp_factor is what is returning super high values (it’s 36 in the original CTL).

The ACES DCTL set should be used in Resolve YRGB, but the LMTs can be used in Resolve ACES (provided they included a conversion to and from ACEScct). In Resolve YRGB and Resolve ACES you can apply a DCTL as an input transform (pre node graph), within the node graph (clip level, and timeline), and as an output transform (post node graph). Fully modular. In Resolve ACES at the input level, the DCTL is applied before the conversion from ACES to ACEScct (or ACEScc), so an IDT DCTL can be applied here if not natively supported in Resolve.

(Paul Dore) #114

I added two new DCTLS to ACES_DCTL_DR16

Both contain the full ACES library (minus ACESproxy and LMT_Analytic_2 related stuff), so no need for inclusion headers.

ACES_METAL_COMBO.dctl works in DR16 with the DCTL OFX Plugin, with drop-down menus for IDT, RRT, and ODT.

ACES_METAL.dctl works in both DR15 and DR16, and has a similar layout to ACES_Sample.dctl (plus all the precompiled stuff).

These 2 DCTLs will also work with CUDA, and there may even be a slight performance boost (compared to the un-precompiled versions).


(Paul Dore) #115

Thanks to Nick Eason (over at LGG) I was able to precompile the full ACES transform library into a single header file, which can be included in a DCTL in both Metal and CUDA. The ACES_Sample option than was previously only available in CUDA is now available in Metal too. I tried OpenCL, but only the IDTs and some LMTs would work.

In a separate folder called ACES_DCTL_NEW I’ve added 3 files


ACES_LIB.h contains the full ACES transform library, ACES.dctl has a similar layout to ACES_Sample.dctl from the original ACES_DCTL set, and ACES_COMBO.dctl works in DR16 with the DCTL OFX Plugin.


(Nick Shaw) #116

Yes. The ARRIRAW IDTs should not be used in Resolve, as Resolve never presents the image data in its raw form, even if the source is ARRIRAW. It is already decoded. The value 36 is the multiplier from sensor linear to relative scene exposure at EI800. When that is incorrectly applied to image data which is already had EI gain applied, it will indeed produce ridiculously high values.

1 Like
(Paul Dore) #117

I converted the ACES transform library into a Matchbox Shader. It works in Flame, but I haven’t tested it in Baselight or Scratch (or any other app that can run these shaders).

It has a similar UI to the combo box DCTL in Resolve. There are a few options included in the drop down menus, but the entire library is included in the .glsl file so the remaining options can be added as required.

Baldavenger ACES Matchbox Shader


I tested it in Scratch, and it runs successfully (and very fast too).

1 Like
(Paul Dore) #118

Short(ish) video demonstrating some the options available in the Shadertoy ACES shader.


// Open Chrome with CORS disabled

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

// Open Console (cmd + alt + j) and paste this link (Arri LogC clip)

gShaderToy.SetTexture(0, {mSrc:‘https://dl.dropboxusercontent.com/s/faxgcvief55uljr/arri%20logc.m4v?dl=0’, mType:‘video’, mID:1, mSampler:{ filter: ‘linear’, wrap: ‘repeat’, vflip:‘true’, srgb:‘false’, internal:‘byte’ }});

// Arri LogC clip +3ev

gShaderToy.SetTexture(0, {mSrc:‘https://dl.dropboxusercontent.com/s/6th2uj79ym33y78/arri_logc_3ev.m4v?dl=0’, mType:‘video’, mID:1, mSampler:{ filter: ‘linear’, wrap: ‘repeat’, vflip:‘true’, srgb:‘false’, internal:‘byte’ }});

// Longer demo video

gShaderToy.SetTexture(0, {mSrc:‘https://dl.dropboxusercontent.com/s/y2oyr2pggimpx88/Showreel%20PD%202014.m4v?dl=0’, mType:‘video’, mID:1, mSampler:{ filter: ‘linear’, wrap: ‘repeat’, vflip:‘true’, srgb:‘false’, internal:‘byte’ }});

1 Like
(Juan) #119

Hi Paul,

for those of us still using Resolve 15 is there anything we could do to still be able to load the OFX?