# Does a RAW picture depend on the white-balance setting of the camera?



## Rotaluclac (Jun 12, 2013)

I thought that a RAW image was more or less a direct representation of the number of photons detected by each subpixel. In other words, whichever white balance I select on my camera (Nikon D700), the RAW image would be the same.

I experimented by photographing the same scene, manual settings, selecting a different white balance each time. I then imported the RAW pictures into LR, converting them to DNG.

I was surprised to see clear differences between my pictures.

So please help me understand what's causing this:
a) The RAW pics _are_ different, and that's what LR shows.
b) The RAW pics are all the same, but LR somehow reads the camera's WB setting and adjusts the display accordingly.
c) Something else...


----------



## Mark Sirota (Jun 12, 2013)

Welcome to Lightroom Forums.

The raw *data* is not affected by the white balance setting on the camera. The white balance, for a raw file, is just metadata.  Lightroom (and other raw converters) read this metadata and use it when rendering, which is why you see a difference.  In other words, the answer is (b).

Note that the white balance also affects the camera-rendered JPEG, which is what is displayed on the back of the camera and used for the histogram displayed by the camera. If you are adjusting your exposure based on that information, then the white balance may affect your choices.


----------



## Rotaluclac (Jun 12, 2013)

Thanks, clear answer.

Why does LR use the white balance for rendering? After all, I am importing raw files, so I expect to see a raw result in LR. Is there a way to turn off this "smartness"?

Extending this path, what other "smartness" does LR have when importing RAW files? I expected only ISO, A, and S to affect RAW files, and that's probably still right, but if LR somehow makes its behaviour dependent on my WB setting, then I wouldn't be surprised if LR also looks at other things. Does it, for example, take colour space into account when rendering, even though colour space doesn't affect the raw *data*? How about sharpening (I mean the one I set on camera)? And active D-lighting, or whatever Nikon calls it? And other things?

The discovery that LR's processing of the same RAW file changes depending on some settings that does not, and should not, affect that RAW file, kind of destroyed my feeling of understanding LR's workings. For me, not understanding LR is not trusting LR. I'd like to rebuild that trust, which means I'd like to understand what LR does when importing and rendering RAW files.


----------



## Replytoken (Jun 12, 2013)

Rotaluclac said:


> Why does LR use the white balance for rendering? After all, I am importing raw files, so I expect to see a raw result in LR. Is there a way to turn off this "smartness"?



Every image must have a WB setting, and since the camera makers have made that data known to software developers like Adobe, it seems logical for them to use it as a starting point.  If LR did not use the camera's WB setting for rendering, what setting would you suggest should be used by the program?

--Ken


----------



## Mark Sirota (Jun 12, 2013)

If you prefer to always render with a fixed WB (that is, ignore the in-camera setting) you can modify Lightroom's defaults to do that.

WB is the only image-rendering metadata from the camera that Lightroom uses. All that other stuff (sharpness, contrast, saturation, etc.) is ignored.

Active D-Lighting (ADL) is a special case. Lightroom does indeed ignore it, but that matters, because if you enable ADL on the camera, it will affect the camera's metering. The camera will generally underexpose with ADL enabled, because it is expected that the shadows will be lifted during the raw conversion phase, but LR doesn't do this by default.  You're probably best off disabling ADL in camera if you're using non-Nikon raw conversion software. Alternately, leave it enabled as a highlight protection mechanism, with the understanding that you'll likely need to boost the shadows for each and every file.


----------



## clee01l (Jun 13, 2013)

Rotaluclac said:


> Extending this path, what other "smartness" does LR have when importing RAW files? I expected only ISO, A, and S to affect RAW files, and that's probably still right, but if LR somehow makes its behaviour dependent on my WB setting, then I wouldn't be surprised if LR also looks at other things. Does it, for example, take colour space into account when rendering, even though colour space doesn't affect the raw *data*? How about sharpening (I mean the one I set on camera)? And active D-lighting, or whatever Nikon calls it? And other things?


  RAW image files are just numbers recorded by the sensor,  RAW converters Demoasic the data and convert it to RGB  It is here that is ti assigne a colorspace.  I'm fairly certain that LR assigns ProPhotoRGB.  There is not really a viewable RAW image until the RAW processor assigns some basic adjustments to the numbers that represent an RGB sensor Pixel. All RAW processors need to do this or your image would look flat, toneless and noisy.  The image that you see on the back of your camera is a JPEG created by the camera processor using all of the parameters you set im the menu. 
The closest thing that you can get to "seeing" an unprocessed RAW file is the LR preset called "General Zeroed".  It will turn all the LR adjustments to their neutral position.  None of the camera settings are honored except by a default develop setting that reads some settings like WB to create a viewable images. "General Zeroed" will remove any "pre-processing" adjustments and "Reset" will apply the defaults for your camera and lens.  You can tell LR what defaults you you want applied for camera and ISO in preferences/ 

What you have as an advantage over JPEGs is that you can change the WB or any other adjustment and fix things like WB Exposure Contrast.  If you under or over expose in the camera by 1-2 stops, LR can correct that if you shot RAW. 

Turn off Active D-Lighting in the Camera.  LR can't use it. Active D-lighting is a compensation factor that Nikon uses to boost darks  and turn down brights so that the shadows have detail and the Whites aren't blown.  It does this at the pixel level by recording and applying a factor to each pixel to tell Nikon's Post Processing app (ViewNX/CaptureNX) how to adjust the pixel value.  This is a piece of data that is stores in the Makers Notes field of the EXIF and LR does not parse this field and would have to reverse engineer the results to apply this specifically to the Nikon format.  It would also have to do something similar for each and every other MFG.  Instead, LR has in Process Version 2012 an internal evaluative approach that come up with similar results just using the basic RAW data and none of the ADL or ALO or ??? factors that mfg's record in their private fields.


----------



## Allan Olesen (Jun 13, 2013)

Rotaluclac said:


> Is there a way to turn off this "smartness"?


Have you tried to look in the upper part of the right pane when you are in Develop?

To be precise: Look at the place where it says "WB: As Shot".

I am not going to insult your intellect by explaining what will happen if you change "As Shot" into something else.


----------



## Denis de Gannes (Jun 13, 2013)

Rotaluclac said:


> I thought that a RAW image was more or less a direct representation of the number of photons detected by each subpixel. In other words, whichever white balance I select on my camera (Nikon D700), the RAW image would be the same.
> 
> I experimented by photographing the same scene, manual settings, selecting a different white balance each time. I then imported the RAW pictures into LR, converting them to DNG.
> 
> ...




The questions you have posted do not have short or simple explanations. I think the link below will lead to an article that will provide some understanding of RAW digital files.

http://www.luminous-landscape.com/tutorials/understanding-series/u-raw-files.shtml


----------



## Rotaluclac (Jun 20, 2013)

Replytoken said:


> If LR did not use the camera's WB setting for rendering, what setting would you suggest should be used by the program?


I'm photographing with 14 bits. That means a value from 0 to 16383 for each raw color channel. Now assuming that 0 represents perfect black and 16383 represents perfect R/G/B, then I would have expected Lightroom to just map the raw value 0 to a color-channel value of 0%, and the raw value 16383 tot a color-channel value of 100%. Values in between would be converted using a camera-specific and color-channel-specific conversion function ("point curve").





Mark Sirota said:


> Active D-Lighting (ADL) is a special case. Lightroom does indeed ignore it, but that matters, because if you enable ADL on the camera, it will affect the camera's metering. The camera will generally underexpose with ADL enabled, because it is expected that the shadows will be lifted during the raw conversion phase, but LR doesn't do this by default. You're probably best off disabling ADL in camera if you're using non-Nikon raw conversion software. Alternately, leave it enabled as a highlight protection mechanism, with the understanding that you'll likely need to boost the shadows for each and every file.


Very clear explanation, thanks! I photograph with ADL disabled anyway, but this knowledge is still very useful to be aware of.





Allan Olesen said:


> Have you tried to look in the upper part of the right pane when you are in Develop?
> 
> To be precise: Look at the place where it says "WB: As Shot".


I'm fully aware of that. I guess I expected a WB setting like "None" to appear in this list.

It seems the aforementioned general preset "Zeroed" comes closest to this "None" WB.





Denis de Gannes said:


> I think the link below will lead to an article that will provide some understanding of RAW digital files.
> 
> http://www.luminous-landscape.com/tutorials/understanding-series/u-raw-files.shtml


Thanks for posting this article!

I did read it, but that was a long time ago, when I had just bought my first DSLR and was familiarizing myself with the raw format and related technical stuff. At the time, I thought I understood the article, but due to the lack of knowledge at the time, I just didn't realize how much I missed.

It was well worth re-reading this article now that I have an increased understanding.


----------



## Mark Sirota (Jun 21, 2013)

Rotaluclac said:


> I'm photographing with 14 bits. That means a value from 0 to 16383 for each raw color channel. Now assuming that 0 represents perfect black and 16383 represents perfect R/G/B, then I would have expected Lightroom to just map the raw value 0 to a color-channel value of 0%, and the raw value 16383 tot a color-channel value of 100%. Values in between would be converted using a camera-specific and color-channel-specific conversion function ("point curve").



That works great if you are using all three channels equally, which is what happens when you're in the middle of the white balance scale (approximately the daylight setting).

But what the white balance control does is to adjust the relative weights of the red and blue channels.  At one end of the scale, you are emphasizing the red channel and diminishing the blue, and at the other end of the scale you're emphasizing the blue channel and diminishing the red.


----------



## ernie (Jun 25, 2013)

I don't mean to be rude or snarky or anything, but aren't you over thinking all this and missing the point of using Lightroom in the first place? LR is supposed to be a photographers software to visually and easily process our images. You talk about all those bits and percentages and trusting LR to give you exact things. But what really matters is, does the image look good to you after your processing. Whatever is the starting point is secondary. That's the beauty of LR and raw, all that stuff can be changed easily if you don't like what you see.
Don't worry about where you start, just where you end, and how much or how little work it takes to get there. Happy shooting.


----------



## camner (Jun 27, 2013)

I'm not sure I'm going to say this well, because my understanding is still developing, but to me, what Cletus said is closest to the mark in terms of explaining what LR is doing.  There is no "image" taken by the camera, just a recording of the relative strength of the light hitting each of the R, G, and B reading parts of the camera sensor.  This has to be "interpreted" (i.e., "changed") in order to have a human being see something as an image.  The question is "How to do this?"  The human eye perceives relative brightnesses quite differently than the camera sensor.  When the camera notices "hey, this pixel here is seeing something twice as bright" the human eye doesn't necessarily see it the same way.  The camera, even at 14 bits, can't capture everything the eye can see, and as said above, certainly does NOT "see" it in the same way.  Simply mapping 0 to 0% and 16383 to 100% and interpolating linearly in between would result in an image that no human eye would like at all!

My understanding of what White Balance is doing is that the camera has to determine ("guess"?) what the nature of the light was that actually lit the scene.  Our eyes do that automatically so that we always see something that we think of as "white" as "white" even though what is actually striking our eyes are different wavelengths depending on the nature of the light that is reflecting off whatever we are seeing.  I THINK what LR is doing here is making its own determination in a way that the software engineers think will be most useful to folks. [This is a philosophical aside, but I've always wondered if what MY brain sees as "green" is different that what YOUR brain sees as "green" and that it's only because as we were growing up and learned the word "green" that we THINK we're all seeing the same thing!  I came to this question because I noticed years ago that if I cover my right eye and look at a tree and then cover the left eye and look at a tree, the greens are oh-so-slightly different!]

If I understand correctly, I think that going to Camera Calibration in the Develop module and changing the Profile drop down from "Adobe Standard" to "Camera Faithful" will have LR render the RAW image in a way that is as close to what the camera would be doing as possible.  At least that's how I understand this setting.


----------



## Rotaluclac (Jun 27, 2013)

ernie, of course you are right in that the end result is all that counts.

I'd just like to select those camera settings that will give me the highest chance of achieving the best end result. An overly simple example is to select RAW instead of JPG because RAW provides me with more possibilities to obtain the desired end result.

And, me being me, I'd like to _understand why_ I need to select RAW instead of JPG.

Now RAW versus JPG is a simple no-brainer. I asked my question here because there are (or could be) more settings that affect my possibilities to achieve the desired end result. That's why I wanted to know _which_ settings are important, and also _why_ they are important.


----------



## camner (Jun 27, 2013)

Rotaluclac said:


> ernie, of course you are right in that the end result is all that counts.
> 
> I'd just like to select those camera settings that will give me the highest chance of achieving the best end result. An overly simple example is to select RAW instead of JPG because RAW provides me with more possibilities to obtain the desired end result.
> 
> ...



I'm 100% in your corner here, and it took me a while to recognize that I shouldn't be focusing so much on the starting point of whatever LR presents to me.  What I didn't understand as I was making the move from shooting (and correcting) only in jpg to RAW is that with jpg, the starting point is absolutely crucial in what the possibilities are for the endpoints.  Since the camera has already made a bunch of decisions, all of which can only be changed in a rather limited manner, it's important to get that starting point as right as one can.  For example, it is virtually impossible to totally remove a completely whacko White Balance from a jpg image, or to dramatically alter a really ridiculously backlit shot, where the background is blown out while the foreground is in complete shadow.  With RAW, both corrections are possible, and relatively easily.  What is presented to you by LR as it renders RAW images is of far less importance than it would be for a jpg image.  And what the camera decides you should see from its interpretation of its own RAW image is no better (nor worse), really, than what LR presents.

My initial evaluation of images has changed with RAW and LR.  When shooting jpg only, I would look at an image and say something like, "Completely blown out sky, faces in complete shadow...throw it away,"  or "Whoops...really crappy color cast, way too strong to fix...throw it away."  Now I say "Hmm...interesting picture...I like the expressions on the people's faces, and that's a really interesting background...I'll bring back the highlights in the sky to give me the clouds mixed with blue I remember as I took the picture and make sure I can see the people's faces appropriately," or "Bad white balance, no problem!"


----------



## ernie (Jun 27, 2013)

Rotaluclac, Yeah, I know what you mean. It's good to have a good starting point to begin with so we can get to the finished (for now at least until better software comes along) image with the least amount of work.


----------



## Jimmsp (Jun 28, 2013)

ernie said:


> ....It's good to have a good starting point to begin with so we can get to the finished ..image with the least amount of work.


What I learned years ago that you and I may have different ideas of what "finished" means.
This is the joy of working in raw, and it is what takes you from being a photo mechanic to an artist.


----------



## Glenn NK (Jun 29, 2013)

Jimmsp said:


> What I learned years ago that you and I may have different ideas of what "finished" means.
> This is the joy of working in raw, and it is what takes you from being a photo mechanic to an artist.



That's one of the best arguments in favour of shooting RAW that I have seen.


----------

