CDL values conversion script - Premiere → Resolve

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

morkaman

  • Posts: 7
  • Joined: Wed Oct 07, 2020 12:58 pm
  • Real Name: Andrej Mores

CDL values conversion script - Premiere → Resolve

PostThu Apr 15, 2021 6:54 pm

Hello,

I am working on a script which can import settings from CDL compatible color settings using ASC CDL plugin in Premiere to Resolve.

From my testing there is no possible workflow to do such thing using XML / EDL file, since each program use different setting scale (min. and max. value numbers) hence Resolve doesn´t understand those inputs. There might be some other syntax problem too, but that´s what I found so far.

From my testing I build a table of inputs comparing both setting scales and found this:
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Numbers are made using some basic math logic, comparing software min. and max. values for settings and some visual comparison of results.

Is there anyone to confirm these numbers and logic or giving some advice regarding topic?
Offline
User avatar

Igor Riđanović

  • Posts: 1019
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: CDL values conversion script - Premiere → Resolve

PostThu Apr 15, 2021 10:26 pm

It's my understanding that CDL values are always normalized. Your doc shows Resolve slope as 0.01 - 16.0 and saturation as 0 - 100. Did you get these ranges from the color page UI? If so, I think they are arbitrary. I don't think those units translate to anything particular.

Certainly the SetCDL() API method expects floats of normalized values for SOP SAT. This should make your translation very straightforward.
www.metafide.com - DaVinci Resolve™ Apps
Offline

AustinWitherspoon

  • Posts: 9
  • Joined: Tue Nov 17, 2020 3:36 am
  • Real Name: Austin Witherspoon

Re: CDL values conversion script - Premiere → Resolve

PostThu Apr 15, 2021 10:35 pm

I'm working on a similar conversion script for The Foundry's Hiero -> Resolve, to transfer the entire edit + CDL info into resolve. The resolve API's TimelineItem->setCDL() function takes a dictionary of normal ASC CDL information, where the following CDL data:
Code: Select all
*ASC_SOP (1.0000 1.0000 1.0000)(0.0000 0.0000 0.0000)(1.0000 1.0000 1.0000)
*ASC_SAT 1.0000

Would produce an image with no color changes at all. Now, these numbers may be different from what you actually see on the screen in resolve, but on the backend, resolve handles CDL data exactly to spec as far as I can tell.

From the wikipedia page on CDLs:
s s is slope (any number 0 or greater, nominal value is 1.0)
o o is offset (any number, nominal value is 0)
p p is power (any number greater than 0, nominal value is 1.0)


Saturation isn't mentioned in the specs of the wikipedia page, but I think you're right that resolve only allows a 2x saturation value max, so you'd need to artificially cap that number for resolve to handle it properly.

No idea how premiere works though unfortunately.
Offline

morkaman

  • Posts: 7
  • Joined: Wed Oct 07, 2020 12:58 pm
  • Real Name: Andrej Mores

Re: CDL values conversion script - Premiere → Resolve

PostFri Apr 16, 2021 1:12 pm

guys you are right, I was pretty sleepy and made few mistakes in logic of problematics. But I found one thing, that made me lot of confusion and wrong results trying setting up Resolve SetCDL() from Premiere CDL export.

There is bug in Resolve I think I found. It is Offset (Lift) that gets opposite values than what is supposed to. For example setting Green Offset: 10 in Premiere, makes same result as setting Green Offset: -10 in Resolve. It is same for red, green, blue offsets. Damn, took me few hours of blindful testing, to figure that out. That´s why all copy-paste tries of getting CDL from Premiere to Resolve directly, failed and I assumed it got something with UI scales.

You can try by yourself:
Code: Select all
SetCDL({"NodeIndex" : "1", "Slope" : "1.0 1.0 1.0", "Offset" : "10.0 0.0 0.0", "Power" : "1.0 1.0 1.0", "Saturation" : "1.0"})
Should give RED tint to image, as red offset value is positive, instead it gets GREEN tint.

Be aware of that Austin.

But atleast I can say I found my own bug inside Resolve in my thesis. That´s valued thing :lol:

About saturation, I found there is "autocap" so when inputting any value thru SetCDL() above 2 on saturation, it automatically puts 100% saturation.
More about saturation in CDL here: - from v1.2 it´s tenth variable
https://mixinglight.com/color-grading-t ... i-resolve/

Return to DaVinci Resolve

Who is online

Users browsing this forum: Anton Meleshkevich, SerafimSalnikov, smunaut, tj@flatlandbiking.com and 101 guests