MLV App devs - Matrix coefficients for correct color in non-Adobe apps (meta)

Started by Andy600, November 27, 2014, 10:23:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy600

Hi guys,

Accurate color reproduction and white balance can be a little tricky for some users when it comes to DNG processing in apps like Resolve and this is nearly always down to incorrect or minimal meta data in the DNG files. Adobe Camera Raw at least offers a fall-back to Adobe Standard and common picture styles IF the UniqueCameraModel tag is filled but nearly all other apps (Resolve etc) rely entirely on the embedded matrices.

I know some ML Raw apps do include 2 color matrices which give better default color but it would be much better to include all useable matrices. I believe most MLV apps use DCRaw data for the current matrix info but it is a little outdated and most color matrices have since been refined by Adobe Labs.

I have put together a sheet containing the current Adobe standard color matrix coefficients (as found in the latest Adobe DNG Converter) for all MLV capable cams. You may want to try embedding the tags into DNG with your apps. We have tried these on several shots from different cams and it certainly improves things in Resolve. At the very least it will ensure the correct green/magenta tint at default settings and allow use of the default color temp presets.

The sheet includes the correct Exif tag names, color matrices (row scan order) and illuminant tags that should be embedded when your apps extract the DNG files. Alternatively, someone may want to create a simple Exiftool batch script (or app) that can re-write/add these tags to DNG files - this will be useful for older DNGs.

You can find the list here: http://pastebin.com/ZGpUm6Nx - Updated 29/11/14 (please discard previous sheet as it contained incorrect forward matrices)

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

Andy600

If users want to try these matrices I suggest using ExiftoolGUI http://freeweb.siol.net/hrastni3/foto/exif/exiftoolgui.htm. Also download the latest Exiftool.exe from http://www.sno.phy.queensu.ca/~phil/exiftool/index.html rename it from exiftool(-k).exe to exiftool.exe and replace the one in the ExiftoolGUI directory.

In ExiftoolGUI:-

1) Select Exiftool Direct button (bottom of middle column)

2) Enter the matrix coefficients for your camera like this in the command text box (this example is for the EOS 50D only so you will need to change the matrices for your camera as per the sheet I posted above)

-ColorMatrix1="0.5852 -0.0578 -0.0042 -0.4191 1.1696 0.3427 -0.0886 0.2323 0.6879" -ColorMatrix2="0.492 0.0616 -0.0593 -0.6494 1.3965 0.2784 -0.1774 0.3178 0.7004" -ForwardMatrix1="0.9484 -0.115 0.1308 0.4313 0.7807 -0.212 0.0292 -0.2827 1.0786" -ForwardMatrix2="0.9484 -0.115 0.1308 0.4313 0.7807 -0.212 0.0292 -0.2827 1.0786" -CalibrationIlluminant1="Standard Light A" -CalibrationIlluminant="D65"

3) Give this a name in the Command Name text box and press Add New (this will become a reusable preset)

4) find a directory of DNG files and select all the DNG files

5) click on the Command text box and press enter. Exiftool will now parse through the DNG files and rewrite the color matrices.

IMPORTANT: It's probably a good idea to do this on a copy of your DNG files until you are familiar with how it works and have tested in Resolve (or other raw apps). You can use the original DNG file sequence to A>B the results ;)

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

dmilligan


swinxx

Whow, thx andy for your work.
Does that mean that eg in resolve the dng sequences does no more have that oversaturated look when set to rec709?
So also when set to bmdfilm the sequence should look flatter? Right?
Thx

Andy600

Color transforms in Resolve (BMD Film and Rec709) will be much more accurate because the RGB to XYZ matrices are defined for 2 illuminants and are the same as you get in Adobe Camera Raw. Rec709 primaries are actually quite saturated anyway because your pulling a much wider gamut into a smaller colorspace to be able to see it. this means some colors get pushed right to the edge of the colorspace boundaries and sometimes further so they clip (this is normal). If it looks too saturated in Rec709 colorspace in Resolve just desaturate it to your own taste ;) tip:use a track node to desaturate all shots at once or qualifiers to selectively desaturate certain colors.

With this you should no longer get severe green/magenta tints and the white balance slider in Resolve will perform properly. If you correctly white balance when shooting you'll get exactly the same white balance in Resolve or any other DNG reading app now.

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

swinxx

Thx for the info andy. Is there a possible chance that we get d gs with the same color output as bmd cams? Or is this only possible with a transformation lut?

Does the output from the dngs in resolve which are also transformed with your cinelog luts look different now??

Thx

Andy600

Do you mean BMD in-camera Rec709? BMD Film in Resolve is the same colorspace as BMD Film in BM cameras and that's about as close as you will get without a very good set of color matching luts. Sensors, lenses and a multitude of other things that affect color come into play so one lut would never be enough. In the final release of Cinelog-C we will include a very good transform from Cinelog-C to BMD Film (i.e. if you want BMD Film in After Effects etc). ACES is probably the best way to go for color matching but at the expense of losing some of the characteristics of the camera. We still have some work to do on the Magic Lantern ACES IDT's but it's promising.

As for the Cinelog luts. The transform luts are 100% math based (as they should be) and required you to get a neutral white balance first. They will only look different with the new matrices (i.e. better) if you couldn't get a proper white balance manually with the old matrices. The most noticeable difference will probably be that shots under tungsten light will look better. TBH this makes my life a lot easier when it comes to getting the same color output across different apps - kind of important when it comes to color grading and luts.

BTW, why would you want a Canon to match a BM camera? I would want it the other way around. Canon color science is much better IMO ;)
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

swinxx

@andy600:
thx for the info, but please check out my post in the mlvfs thread

greets. swinxx

Andy600

Thanks swixx. A couple of questions - What camera? (I'll recheck I didn't make a mistake with the matrix), Did you white balance when shooting? Did you center the white with WB controls or colorwheels? How does it look if you push up the white balance a little? The new matrices are a little cooler than the previous ones.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

swinxx

hi andy,
i used a canon 5d mk3 and adjusted the wb with the wb settings in the cameraraw options in resolve.
however, without calibration the water in the dng converted with the new matrix also looks more cyan than blue.
i made an automatic wb before shooting, so it should be calibrated right.
with push up the wb do you mean to increase the wb? or the tint?
greets. sw

Andy600

Thanks.

Hmm, I just compared with slightly older 5D3 matrices and the forward matrices are different  ???. The color matrices are the same. There might be a problem with the latest Adobe DNG converter. I will look into it. I don't know if Resolve reads forward matrices because the BM cams don't use them. Can you make a copy the DNG and rewrite these 2 tags with Exiftool to compare?

-ForwardMatrix1 0.7868 0.0092 0.1683 0.2291 0.8615 -0.0906 0.0027 -0.4752 1.2976
-ForwardMatrix2 0.7637 0.0805 0.1201 0.2649 0.9179 -0.1828 0.0137 -0.2456 1.0570

By white balance I mean temperature. There should be no need for tint correction now. Did you use Rec709 in Resolve for this?

We did try a few test shots and colors were closer to the real world using these matrices.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

Andy600

Update: The previous list had incorrect forward matrices and a mistake in the 5D mark III colormatrix2. The sheet linked to in the first post is now correct for all cameras - don't ask me why the 5D Mark II uses the same Forward Matrices. I don't know  ???
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

DeafEyeJedi

5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

chmee

[size=2]phreekz * blog * twitter[/size]