after photographing a formula 1 race and trying to process the images in darktable later I’ve noticed that everything thats supposed to be red (ferrari cars DSC_0153.NEF (19.5 MB)
, austrian flag DSC_0139.NEF (19.0 MB)
, kerbs DSC_0029.NEF (18.9 MB)
) is color shifted to magenta.
Trying to figure out where the issue is I took some pics with two other bodies of a red object at home using both the color calibration as well as the white balance tool for white balancing and noticed that the magenta shift only happens on the Nikon D3400 but not on the D200 or Panasonic gx9. Taking a picture inside and disabling color calibration seems to fix that somewhat but as shown above it doesnt work under sunlight.
To remedy that I tried a few options. Using color shift on color balance rgb fixes the reds but obviously affects the other colors too and im not sure if thats a good approach. Using color zones looks better but it feels a bit hacky. The best results IMO were when shifting “Input R” in the color calibration under the G tab away from magenta and achieves a similar desaturated red as in the D200 that i would expect from a white balanced raw file but ofc course im not sure how to best neutralize the other colors from camera to camera without buying a color checker chart. I would definitely considering buying one if anyone knows whats going on here and tells me that it would be the technically correct way to neutralize all my colors across these bodies. However I still find it very strange that the reds would be shifted that strongly even without calibrating it. Im suspecting part of whats going on here is that the d3400 doesnt have a custom matrix while the d200 does.
When you change the white balance, all colours will shift (look at the grass next to the racetrack).
“Automatic white balance” usually considers that the average scene colour is neutral gray, and sets the white balance to produce that. That works fine, unless your scene, when averaged, is not neutral gray.
As for taking part of the image, you have to be sure that part is neutral gray. It often isn’t…
But then, nothing stops you from adjusting the suggested white balance value to something that gives a better results (“better”==“closer to what you want”). I do that quite often, especially when I know the image isn’t “neutral” (overall brown tint from forest litter with an insect as subject, grass or leaf background with same, etc)
I appreciate the suggestion!
Im pretty sure however that white balance is not the issue here as i chose the neutrally grey track for the color calibration tool. If i manually adjust the WB so that the ferrari is as red as its supposed to the entire image is way too warm.
So what Im thinking is that the problem must be that the standard darktable color profile is way off with the cameras color profile (Im not sure if profile is the right word here, my understanding of the technical side is very surface level).
edit: or way too green whichever way you want to push the sliders
I feel like maybe something like this was noted before… maybe search the forum for d3400 posts… have you tried the correction for the reference values ie shooting a while screen on you monitor??
Sadly couldnt find any ressources on this problem here or anywhere else.
I dont know where i can configure a corrected camera reference value but i assume you can eyeball that by fiddling with custom white balance a little and sliding the hue into the green territory did sort of help:
But im still paranoid about doing it the “correct” way so I can be sure my colors arent off in less noticeable ways and i can still reuse presets across bodies and such.
It might be worth checking as @grubernd mentions…there are some panasonic camera’s I think that have 127 in the exif data of the file but using that value in DT give a magenta like cast… Those cameras were modified to use 142 as a value… it might be worth comparing what DT uses and what is in the exif for that camera… Do you have a throw away image you could share just so we could check or if you know how you can check yourself…
EDIT … So I downloaded a D3400 from imaging resources… it looks okay to the eye but one or two things … in the exif data it has 600 for all black levels and if you enter that in place of DT’s 150 it looks like crap… There is no white point listed in the Exif data so you have to use what DT gives and for this image its around 3800 when the max for 12 for many camera’s is 4095. So you are flying blind on that value and just have to trust DT … You could bump that one as it deepens and darkens the image and see what that gives you … in the mean time we could see what other software like RT uses…
This file seemed to be 12 bit but the data from RT suggest this camera can do 14 bit?? I didn’t look to confirm but if so RT just says adapted for 12 bit and uses 16300… again not sure what variant of image you save from your D3400 but some of these settings could possibly impact things…
From RT
{ // Quality B
“make_model”: “Nikon D3400”,
“dcraw_matrix”: [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v9.7 d65
“ranges”: { “white”: 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety
},
The D3400 should be similar enough to the D3500 I have - and that is a straight up 12bit camera. You get RAW without any selection of the flavour.
raw b/w values on the D3500 are 150/3972.
I will see if I can find some images with pure red content in my archive and have a look at a possible red/magenta drift.
Here’s another observation: looking at your images, the flags have a slight tendency but in general I would say they are okay.
The Ferrari is … complicated.
Comparing your image to a simple web search shows results where that Scuderia-Red is all over the place. Anything from almost magenta to bright orange. In my experience this means the car paint being used is really really hard to photograph and reacts to the tiniest of change in light and processing.
Without controlled light and a colorchecker I would not dare to make a promise of the outcome.
Also JPGs out of camera often have a hue shift or even a double-hue shift where red is rotated against the other colors, pronouncing that drift even more.
I’m just downloading one of your files to try it myself. My preferred option for ‘fixing’ this kind of thing (read: adjusting to taste) is the channel mixer in color calibration, as this is in fact the same process used in a matrix input profile.
Ahh… it’s downloaded.
a few minutes later
Mmm… to start with, if you turn off color calibration (if it was on default settings), you should change the wb module setting to “as shot”, to get a true comparison. I just did that, and the difference on the Ferrari image is pretty subtle with/without color calibration.
Here’s what I did to get the version below:
First, put more green into the reds, but keep the overall white balance by reducing the green in the greens:
Then, put more yellow (less blue) in the reds, and counterbalance it the same way:
This would most likely need more fine tuning on different images, but as I understand it the principle is sound, if not necessarily accurate, as it relies on one’s eyes…
Edit: forgot the image!
The other option is to get a ColorChecker card, one of the 24 patch ones, and use it to either produce your own input profile, or, probably more conveniently, use the calibration function in color calibration itself to produce a preset. I haven’t tried this (yet) but it’s detailed in the manual I think.
Either of these last two options will get you as close to true-to-life colours as basic profiles can manage.
Finally, nice shot. I love motorsports, although I lean much more towards rallying as opposed to circuit racing. DSC_0153.NEF.xmp (6.3 KB)
First of all thanks a lot for the many suggestions!
I tried working through them one by one
Custom camera reference
I took a picture of my screen on a blank gimp page and created the custom preset to use that as a baseline for the color calibration. While the preset also shifted towards the green like I did manually earlier with some success it didn’t make a visible difference after color calibration anymore and I’m hesitant to push it manually until it does.
Playing with Black and Whitepoint module
Pretty much anything other than the default settings give me some sort of cast over the entire Image after calibration sadly nothing useful and I found nothing in the exifs to point me towards some settings that are different from the darktable default.
The Ferrari paintjob is very dependent on the lighting
Over the entire Weekend it was sometimes completely overcast and raining to blue sky and with the sun high in the sky to anything in between and from what I can tell the Ferraris are consistently magenta. If im understanding correctly you’d expect that to change if the paintjob is at fault. Plus the Red Bull logo and the orange t-shirts of the Verstappen fans also have the same issue. Plus my red alarm clock almost goes into pink in some pictures.
Customizing the rgb matrix in the color calibration module
That’s pretty much where I’ve arrived at this point and I think it has the best results. My only problem is that at this point in the editing I’d prefer something that’s not reliant on me judging what it should look like, I didn’t notice this issue for a long time after all so not a good look for my judgement lol. In terms of color checker card would I need to calibrate my presets for different lighting situations or could I borrow one for a day and take a quick snap and be fine?
Also the only camera in the lineup with a custom darktable matrix is the d3100 maybe I could import that somehow for a quick fix too, not sure how to do that though maybe someone knows.
Thanks for the compliment btw the austrian gp has a lot to offer if F1 ever interests you from flight shows to seeing the drivers on sunday without any vip tickets!
All in all I’ve learned quite a bit because of this issue but im still puzzled that the colors are shifted that crazy, could Nikons QA have fucked up here?
NP I only mention as it can often really impact color depending on the settings esp reds…
I also wonder if this is a camera that uses a default adobe matrix. I think many are in DT taken for default adobe coefficients and they I believe are known to have weak reds so I wonder if you are getting a bit of that and so perhaps a custom profile might indeed help you out… at least for that camera…
Seems like something that is happen more on different users…
Its about bright red colours if that’s the case. Filmic v6/v7 tries to map bright red colours back into gamut , but that turns them magenta a bit.
Try using filmic v5 with preserve mode set to ‘no’ , or try sigmoid instead of filmic , or - my easiest - export to (linear) rec2020, and use another graphics tool to convert your exported file to sRGB (or whatever you want as output).
Exporting to rec2020 effectively bypasses the gamut mapping from filmic v6/v7.
I have a custom build where I let filmic listen to the soft proof settings , so I can set the softproof profile to rec2020 and then enable softproofing and actually see the effect, instead of exporting and hoping for the best. The GitHub issue on this seems to get no attention.