DaVinci CinemaDNG bug? Or Sigma FP bug?

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

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

DaVinci CinemaDNG bug? Or Sigma FP bug?

PostMon Sep 18, 2023 4:07 am

I have noticed a “bug”. I'm not sure if it's existed for a long time or not. This is a "bug" that may affect folks shooting cinema DNG.

Apologies in advance for the lengthy post.

We had a shoot with 4 different cameras. 3 BM 6k pros, and a Sigma FP. I noticed that some of the footage from the Sigma FP was harder to white balance than other clips shot on the FP. After chatting with the camera op and reading the metadata in EXIFTOOL, it seems our camera op was changing between some of Sigma's in-camera color modes during shooting. All clips were shot UHD cDNG 12bit.

So I did a test.

The results of the test are a little concerning (at least for the sake of color consistency.) See images in this post. I will also post a link to my Davinci Project file, and single DNG frames from my tests.

I set up a few objects in my apartment to capture different colors (apologies for not having a true color checker chart.) A green painting, white foam core board, a red roll of tape, and a yellow hat. I literally had nothing blue to film, but the painting has a little blue in it. I wasn’t testing for color ACCURACY, as much as I was testing for color CONSISTENCY. Everything is lit by a single source. No house lights were on, and I blacked out all windows to make sure everything was lit by a single source for consistent color and exposure. The Sigma FP was mounted on a tripod, all camera settings & lens stayed exactly the same for each clip, EXCEPT I changed the in-camera color mode. All clips shot UHD cDNG 12bit.

This is where our “bug” is. It's either Sigma FP in-camera color modes, or Davinci Resolve cDNG debayering. I have noticed that shooting clips (CinemaDNG/RAW, every resolution and frame rate) with ANY color mode activated EXCEPT color mode “OFF”, exhibits the same color shifts in Davinci Resolve.

It has always been my experience that in-camera color modes (regardless of manufacturer) DO NOT affect how RAW data debayers in post. It’s always been, “RAW is RAW.” “Sensor data is sensor data.”

SO, I shot a clip for each Sigma color mode. What I found is that color-mode: “OFF” produced footage as expected. It balanced very easily, and felt natural. BUT any clip shot with ANY other color-mode activated, exhibited color imbalance/shifts.

DNG-01.png
DNG-01.png (589.45 KiB) Viewed 3305 times

In DaVinci Resolve, I balanced the in-camera color mode “OFF” clip, to make the white foam core in the frame neutral. White balance adjustments were done in the RAW panel on the color page. I then applied that same grade to all other clips. Every clip was debayered as P3-D60, linear. White balance stayed the SAME between each clip to show the color shift. In my node graph, I then color space transformed from P3-D60, linear, to REC709, REC709 (timeline color space was REC709-A). Tone mapping set to “None”. I did simple Lift gamma gain adjustments for contrast, added saturation, then soft clip to keep things from clipping (all on separate nodes.) Again, the very exact same RAW panel settings, and nodes were applied to each clip.

Still curious, I opened the DNG’s in Adobe Camera RAW. Adobe Camera RAW DID NOT exhibit the same balancing issues as Davinci Resolve did. Both DNG’s debayered identically in Adobe Camera RAW/Lightroom. This possibly means that the RAW sensor data between “OFF” clips and activated color mode clips, has consistency. I suspect there’s something in the DNG metadata throwing things off in Davinci Resolve. SO, I had another idea to convert camera original DNG’s using Adobe DNG Converter. Lo and behold, after conversion using Adobe DNG Converter, both clips were visually identical when imported and debayered in Davinci Resolve. In fact, the Adobe DNG Converted DNG's very closely resembled the color mode "OFF" original. (Adobe DNG Converter removes some Cinema DNG metadata like frame rate, timecode, and also reports “16 bit” color depth, among other things. It strips this data because Adobe's DNG Converter is ultimately meant for photographers.) Since Adobe DNG Converter strips metadata, it must be stripping the metadata that is causing Davinci Resolve to debayer clips differently.

DNG-02.png
DNG-02.png (578.71 KiB) Viewed 3305 times

EXIFTOOL shows a few differences between FP original DNG’s. Although I’m not a software engineer, so which metadata tag is causing the issue requires someone smarter than me. I will leave out the EXIFTOOL reports since this post is already very lengthy. Happy to post EXIFTOOL reports if it helps.

The ultimate question is: Is this behavior caused by Sigma, or is this a "bug" within Davinci Resolve?

DNG's and Davinci Resolve project files here: https://www.mediafire.com/file/lf9jmvqz ... r.zip/file
Offline

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostMon Sep 25, 2023 6:20 pm

I also reported to Sigma FYI
Last edited by Devon Stanczyk on Thu Sep 28, 2023 6:37 am, edited 1 time in total.
Offline

Auluswang

  • Posts: 48
  • Joined: Tue Jan 05, 2021 7:52 am
  • Real Name: Aulus Wang

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostTue Sep 26, 2023 11:47 pm

Not sure of clips out DNGs performance.

If purely look at Photo format output DNGs ( e.g. from Canon RAW of Photo), Resolve has the bug to handle this, it will show as offline.

discussions: viewtopic.php?f=21&t=184720

maybe due to this bug or some other bug(s), besides of photo format DNGs problem, the clip output DNGs also have small issues that including your findings.
Resolve Studio 18.6.6, Windows 11 x64 (23H2)
Dell UP2720Q SDR screen + IPS HDR800 portable screen
DeckLink Mini Monitor 4K + Desktop Video 12.8.1 Driver
Ryzen 9 3950X + RTX3090 24GB (551.86 Studio Driver) + 128GB RAM
Offline

RobinW

  • Posts: 2
  • Joined: Mon Oct 02, 2023 5:41 pm
  • Real Name: Robin Worcjek

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostMon Oct 02, 2023 8:32 pm

Devon,

DNG files have a rich structure with regard to color and can vary in how much structure each camera maker decides to utilize. The color structure can minimally consist of a single 3x3 transformation matrix, or it can include many multiples of 1D, 2D and/or 3D tables as well as tonal response curves to specify color. The size of these structures are variable and decided by the camera maker as well.

For the fp cameras, Sigma uses 3x3 color matrices, various 2D color tables of moderate size and at least one tonal response curve (and sometimes internal exposure offsets too ... like for their “OFF” mode).

For photography, this amount of color detail is highly desirable, but for video (especially at higher frame rates) this puts too much stress on the decoding effort that would be required. That is why Davinci Resolve decided to simplify its processing pipeline by only using the 3x3 color matrix portion of the complete color structure within the DNG file. The justification for this is that a colorist can easily fine tune the colors manually in post. So, it is not a bug, but rather a design decision based on overall performance efficiency for handling DNG files for video.

=================

From your experiments I think you have four basic questions.

1. How is it that “RAW” sensor data can appear differently, since the debayer process should not introduce any changes to the colors that were captured?
RAW conversion is more than just debayering the data. Raw conversion also includes interpretation of those raw values according to some color schema (system of color structures/tables). In the case of DNG, this schema is defined by the Adobe DNG Specification document.

2. Why do the different in-camera color modes show color shifts in Davinci Resolve?
The different color modes use different color structures internal to the DNG files. The color shifts come from two sources: (a) the variance between the internal DNG color structures, and (b) Davinci Resolve only uses a small part of these structures (the 3x3 matrices) in their RAW conversion process.

3. Why do the ON and OFF DNG files show identically in Adobe Camera Raw?
Adobe Camera Raw automatically substitutes its own color structures when possible. In this case, it would be substituting its own “Adobe Color” profile (mode) to the sensor data, regardless of what mode you actually captured the data.

4. Why do the ON and OFF DNG files show identically in Davinci Resolve after converting them using Adobe DNG Converter?
Adobe DNG Converter automatically substitutes its own color structures, overriding the default mode that was used in capture. In this case, it substitutes the “Adobe Standard” profile (mode) by writing it directly into the DNG file. Thus, both ON and OFF images become identical. The Adobe DNG Converter indeed strips the cinema-related metadata from the files, but this has no effect on the color.

I hope this helps.
Offline

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostWed Oct 04, 2023 2:52 am

Robin,

Yes, those are definitely the questions I am asking. Thank you! You helped clear up a lot of things for me. I am amazed at the amount of color processing that happens just inside of a DNG that drastically affects how it's developed. What an interesting format!

If I might ask, how does someone come across this knowledge of DaVinci and the information it receives and ignores in relation to DNG? Is this documented somewhere? Years of experience?

You mention in your last paragraph
"The Adobe DNG Converter indeed strips the cinema-related metadata from the files, but this has no effect on the color."
I may be reading this wrong or missing the point, but it seems that Adobe DNG Converter does in fact affect the color? In fact the resulting DNG from Adobe DNG Converter, very closely resembles the DNG created with in-camera color set to "off".

EXIFtool reports two color matrices for the DNGs. Would it then be possible to apply an inverse 3x3 matrix to cancel out the color difference so that they match images captured using the "off" color modes?

This all makes more sense now that you've laid it out for me. You've given me more things to explore! Thanks for sharing your knowledge.
Last edited by Devon Stanczyk on Wed Oct 04, 2023 3:04 am, edited 1 time in total.
Offline

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostWed Oct 04, 2023 3:02 am

I reached out to Sigma as well as this forum post. This is the reply I've received from them.

“In regard to the customer's reply, we currently recognize the difference in color parameters for DNG files recorded with Color Modes or with the Color Mode "OFF '' setting to be a specification of the camera and not a bug. To go a little further, the color mode parameters for any Color Mode that is not "OFF" will have the same color parameters when processed in DaVinci. This was done to render colors more natural to the human eye. The Color Mode "OFF" parameters were chosen to preserve the camera's original gamut. That is why the color processing and white balancing is slightly different between the two. If the user prefers to shoot with any of the Color Modes other than "OFF" selected for ease of filming, then we would recommend them to shoot all video with any of the Color Modes other than "OFF" for continuity in grading.

Please inform the customer that their feedback is valuable to use and we will share it with our engineers for consideration in future product development.
Also, we would like to thank them for their feedback about the wording in the fp user`s manual. We apologize if the wording was misleading in any way and will consider if any revisions are necessary for more clarity.”


I've always had great interactions with Sigma. This is just more proof of that. As colorists though, don't we all prefer the "original gamut" over any creative interpretation?
Offline

Michel Rabe

  • Posts: 828
  • Joined: Thu Aug 29, 2013 8:06 pm

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostWed Oct 04, 2023 8:52 am

RobinW wrote:I hope this helps.


Ok who is this mysterious man who drops the uber-knockledge and then disappears into the night again? :)

Devon Stanczyk wrote:I've always had great interactions with Sigma.


Off topic, but me too. I have a Foveon camera and the service they provided me for it for free is something I never witnessed with any other manufacturer.
If they had a serious cinema camera I'd probably opt for Sigma just for that reason.
Offline

RobinW

  • Posts: 2
  • Joined: Mon Oct 02, 2023 5:41 pm
  • Real Name: Robin Worcjek

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostWed Oct 04, 2023 5:32 pm

Devon Stanczyk wrote:If I might ask, how does someone come across this knowledge of DaVinci and the information it receives and ignores in relation to DNG? Is this documented somewhere? Years of experience?

Unfortunately, no documentation from Blackmagic. You can experiment using Adobe Camera Raw to see what Davinci Resolve does to the DNG files (see below). And, if you can work with C++, Adobe provides open source software for their DNG format (the Adobe DNG SDK) which can be used to understand everything there is to know about DNG files.

Devon Stanczyk wrote: ... it seems that Adobe DNG Converter does in fact affect the color? In fact the resulting DNG from Adobe DNG Converter, very closely resembles the DNG created with in-camera color set to "off".


The Adobe Standard profile (substituted by the Adobe DNG Converter) has 3x3 matrices that are very similar to the 3x3 matrices of the OFF profile, so you would expect the images to resemble each other.

CAMERA OFF:
Color Matrix 1 : 1.5694 -0.7444 -0.2414 -1.1733 2.271 0.0503 0.0854 -0.3131 1.6227
Color Matrix 2 : 1.61 -0.7637 -0.2477 -0.9692 1.876 0.0415 0.0353 -0.1295 0.671

Adobe Standard:
Color Matrix 1 : 1.3288 -0.6303 -0.2044 -0.9934 1.9228 0.0426 0.0723 -0.2651 1.3739
Color Matrix 2 : 1.6502 -0.7828 -0.2539 -0.9934 1.9228 0.0425 0.0362 -0.1327 0.6877

Most of the color from the Adobe profiles comes from their additional color tables. You can see this by doing the following experiment. Use Adobe Camera Raw and change only the color profile to another Adobe Raw profile (like Vivid, or even Monochrome) and save it. Then, in Davinci Resolve you will will always see the same image, because the same 3x3 matrices are used for all of the Adobe Raw profiles. They only differ in their additional color structures that Davinci Resolve ignores.

Devon Stanczyk wrote:EXIFtool reports two color matrices for the DNGs. Would it then be possible to apply an inverse 3x3 matrix to cancel out the color difference so that they match images captured using the "off" color modes?


In principle, such a matrix can be constructed.
Offline

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostThu Nov 16, 2023 2:26 am

Extremely helpful Robin! Thanks so much!
Offline

Devon Stanczyk

  • Posts: 49
  • Joined: Mon Jun 29, 2020 12:18 am
  • Real Name: Devon Stanczyk

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostWed Apr 10, 2024 6:02 pm

I asked Sigma how to match the CDNG sequences and they replied with the following:

““We are sorry for the inconvenience, but changing the following items will help you match these different files:
- “colormatrix1” and “colormatrix2”
- “ProfileHueSatMapData1” and “ProfileHueSatMapData2”
- “ProfileToneCurve”
- “AsShotProfileName”

Additionally, the only metadata currently used in Resolve is “colormatrix1” and “colormatrix2”.
Since this may change in the future, we have listed the metadata that changes when you change the color mode.””


Sigma makes a good point here, it’s probably important to also change the extra metadata tags outside of the colormatrix tags to future proof your CDNG sequences against any changes DaVinci Resolve, or any other software might make later.

The changing of metadata is facilitated by EXIFTOOL.
Offline
User avatar

Uli Plank

  • Posts: 22078
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostThu Apr 11, 2024 2:34 am

Such an excellent customer service!
And they make great lenses too. I also hope they make a cinema camera one day, now that Nikon became kind of ‘reddish’ ;-)
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline
User avatar

Yoav Dagan

  • Posts: 6
  • Joined: Wed Aug 22, 2012 3:34 pm
  • Location: Cape Town

Re: DaVinci CinemaDNG bug? Or Sigma FP bug?

PostSun May 05, 2024 7:47 pm

I wonder if software like SlimRaw - (which I work with) can strip/change the files to have a colour off option
Y_D
Mac Studio M1 Max
32c GPU
64 GB Ram

Return to DaVinci Resolve

Who is online

Users browsing this forum: Logon 5, Marc Wielage, xunile, Yacy [Bot] and 88 guests