Best practice for "unexpected white balance coefficients" in darktable

I’m assessing color after the whole pipeline, I think. So I have white balance, color calibration, color balance rgb, and filmic rgb. I’m playing with several photos to try to get punchier colors. What I’m doing right now is setting white balance according to my photo of a 6500K light panel, which means R/G/B coefficients of 2.56, 1, and 1.557. Then in color calibration CAT, I manually set the white balance a second time and ignore the warning (now that I know that is okay). Then in filmic rgb I increase the black relative exposure to get slightly blacker blacks, which makes the colors pop more. Maybe fiddle with contrast. Then I use the “vibrant colors” preset in color balance rgb. Finally, I tweak the individual matrix components in the R/G/B/colorfulness/brightness panels of color calibration. Sometimes if there are blown highlights I disable “preserve chrominance” in filmic rgb options to avoid getting magenta clouds and such.

I didn’t know about sigmoid until @123sg told me about it, so that’s definitely something I will consider.

I haven’t been using local contrast, so this is something I will try. The vibrant preset I’m using doesn’t touch global chroma, so maybe I should do that. It does increase global saturation, but then decreases it in the highlights–maybe that’s helpful for making things shiny. I’ve read color dimensions in the manual but still have a hard time understanding how you can adjust chroma and saturation separately, when they are overlapping concepts. Isn’t saturation just chroma scaled by the brightness?

Anyway, I’ve got a lot to digest from what you said and the two videos suggested by @g-man, thank you.

Wasn’t Sony the files with a different white balance than dt thinks it has?

The manual describes it as “unexpected white balance coefficients” that don’t work with the standard color matrix in input color profile. My understanding is that you can work around the problem by (ab)using the white balance module, and I guess ignoring the warning you get when also setting white balance in color calibration.

Well these would be what DT would use

image

So a little more red but a fair bit less blue… If things have been set up and you get consistent results then good… But these D65 numbers are not something you should need to play with a lot either the DT ones or your derived ones should give you the correct colors… I mentioned filmic as the color preservation mode can dramatically impact color and this should be a known change from setting up your color… I am also not talking about grading but getting correct colors from which point you could do your grading so it one thing to consider. Really you can go around in circles if you dont calibrate your camera and display… Then you know you have accurate color from the scene and the changes you make to suit your edit or taste is artistic … Personally I find no benefit to moving away from the legacy unless you are trying to wb the shadows and another area of the photo…then you can mask more than one instance of color calibration and do a sort of dual white balance. Sticking to legacy should use the values strait from the camera and not have you needing a good set of D65 values for color calibration… you can still use the many other functions of color calibration module without using it for wb… One check for sure could be that you take a snap shot of as shot legacy wb… CC deactivated… THen set CC to as shot and wb module to camera reference… THey should be very very close if not identical and if not then for sure there is a bias in your D65 values…one which you may actually like or not but its another way to test things…

Edit… I just did that test ie the comparison of legacy vs modern with Dt coefficients and yours… I could see a difference with the DT values whereas the new ones you came up with seemed closer if not identical comparing them with snapshots…

Global chroma and/or saturation will certainly help, possibly along with increased contrast in filmic… or if using sigmoid instead of filmic, saturation will increase by itself when you up the contrast (in sigmoid). Different algorithm. (I know, I know… stop waffling about how good sigmoid is… :smile:)

I don’t know about white balance, but for at least several models the raw white point as read by dt is wrong (too high)

The white level reading from Sony file has been fixed for dt 4.2 AFAIK.

1 Like

My version…

20230106_0126.ARW.xmp (11.5 KB)

I suppose that the light sources that we have in this photo are led, the one that has given me the best result has been the V2 at 4700 K.

Captura de pantalla de 2023-01-16 20-12-04.png

1 Like

That edit looks really good. How do I read the white balance you selected in the color calibration / CAT? On one hand 4076K sounds like very warm white, but then you also have a violet LED? And what would I select in color calibration if I wanted to use my D65-corrected white balance as suggested by Aurélien Pierre?

This is a little off topic, but is there an easy way to import an xmp file? I had to duplicate the image, then copy your xmp file to the right directory and add _02.ARW.xmp to the end, then select scan for updated xmp files on startup in settings, then re-start darktable and select the image and have the xmp overwrite it, then unselect scan for xmp on startup. Prior to that I tried re-adding the image to the library but that didn’t work. I’m hoping there’s an easier way to share xmp files…

Thanks.

You just select the image in lighttable and click load sidecar file in the history stack section.


See screenshot. If you select append it will make the changes on top of anything you’ve done already, if you select overwrite it will start from a blank raw. The latter is best in this sort of case IMO.

I’m a bit lost with this - I’m sure someone else can help though!

I’ve just rewatched the first part of that video from AP - it was quite long time ago that I watched before… It confirmed what I thought - that is you don’t need to do anything special in color calibration to use the D65 wb preset.

I tried it just now to be sure.

You just set up that preset in the White balance module, using a shot of a 6500k light source, as he shows in the first 12 min or so of the video, and color calibration automatically picks up the different coefficients being fed to it by the WB module. It’s not actually “abusing” the WB module by the way, just making it more accurate.

It won’t make the pictures look much different (at all) if you leave color calibration set to “as shot” (to use the wb the camera set) but if you use the built in settings in color calibration, like the one @dqpcoxeas used above for LED lighting, doing this D65 “calibration” (for want of a better word) ensures that they work properly.

Edit. Forgot to say, the warning about wb applied twice is normal and can be switched off in the preferences.

Hope this helps.

Maybe I should do this too!
I’m very much in the school of if it looks good it’s good - probably to the despair of some dt devs. (if they knew my workflow).
So I’m learning as I go - helped by the fact that I’m quite familiar with dt now.

You use this all the time…if you are referring to your D65 adjustments from the screen shot. Then normally CC would be set to as shot… This should be a match for the wb that was used by your camera. From there you can do a neutral pick on the entire image or a particular spot or as @dqpcoxeas did you can experiment with some of the provided illuminants

When I compared the adjustments that Frisco made …it was a very close match for legacy wb so right or wrong and likely wrong the default DT D65 values were introducing a bias… He found that it should be less red and more blue… I think its not a bad check for anyone that can calibrate their screen… I think AP said that right…save me rewatching but I think he said of a calibrated screen??

Right, so I think what this comes down to is that I need to ignore that warning, which shows up in the two modules and is also constantly printed to standard error.

What I find is that by default, my pictures have a slight yellow tint that I don’t like. When I set white balance to my D65-calibrated coordinates, most pictures look better before I’ve even touched color calibration–even if they don’t look correct yet, I prefer the starting point, which often has the color calibration illuminant at daylight. However, if with my custom white balance, I then select “as shot in camera” for the illuminant, I get back something very close to what I had before setting the custom white balance.

So is the idea that the color calibration CAT overrides the original white balance, but that if I’ve set the original white balance module based on D65 white, then all the perceptual controls in places like color balance rgb and color zones will work better?

To be clear I never posted any of my own adjustments. I posted a raw file (for which I didn’t like the default colors in darktable) and a JPEG that came straight from my camera (I believe with the “VV” creative look). Other people posted suggested edits.

Yep, I think you’re on the right track. Except that I believe the D65 preset only really makes the color calibration work better -

Which in turn helps you to get a neutral photo (not warm or cold or pink or green) - any adjustments, like to remove the yellow look you mentioned, should be done in color calibration.

Which makes all the other stuff like color balance rgb work properly. And you can reintroduce a color cast if you want in these modules. (This isn’t always what I do but it’s the recommended way for best repeatability)

Right, so if I want to make myself some presets, what I’d do is make a second copy of color calibration, and my preset would include the second color calibration, as well as probably color balance rgb and maybe color zones (and non-color modules).

So then the flow would be open a new photo, apply the D65 white balance (or maybe eventually auto-apply as suggested in the AP video), fix color calibration if I don’t like the default (which is usually daylight even for nighttime photos), and finally apply my preset, which would possibly include a second color calibration to do creative things?

I’ve ordered myself a Spydercheckr, so once I receive it I’ll also be able to see if it’s easier to calibrate the color with the D65 white balance. It still seems weird that setting the white balance to something unrelated to the lighting of the actual photo I’m editing would be helpful. Is that just a total hack, or is there some intuition behind it? I guess what is the “camera reference point” that is used by default anyway?

Yes, sounds good! Just to be clear, you only need the second copy (or instance) of
color calibration if you want to use it to do creative adjustments. I think that’s what you meant…just making sure!

Yes. It’s possible that as I get more experience, I’ll start using color balance rgb and color zones more instead of color calibration. Right now I find it easier to get what I want by tweaking color calibration, but this may be just my inexperience.

Yes, it’s not really a hack (AFAIK) it’s just that the WB module does the initial processing from the sensor, and turns it into something where daylight looks white. Then color cal takes over to correct for your orange incandescent lights/blue shadows in evening/ pink LEDs/whatever. A two step process.

May be… or not! darktable does usually have more than one way to get what you want, so it’s up to you to a large degree.