Cycles Color Temperature and Tint

Hello,

Am I the only one missing Color Temperature (in Kelvin) and Tint controls for Cycles?

I know I can do that with compositing, but then you don’t see it in the viewport. Ideally these settings would sit next to the Exposure and Gamma settings in the Color Management menu.

I think a lot of people misunderstand White Balance and fix these in their HDRI, instead of properly fixing it in the camera / render settings.

You can do a little by tweaking the RGB curves in Color Management panel, yet it’s not the same thing

The question is, what do you need to fix exactly? You can set the color temperatures of your lights properly, thus removing the need for white balance fixes. Anything else would be an artistic color correction in my eyes, which is better done in comp anyway.

White balance is nothing more than scaling rgb channels, so while it would be nice to have the controls exposed as Kelvin temp for example, you can achieve the same thing by chaning the white level values of curves.

maybe this proposal would be what you think of?

You are eyeballing entirely if you input the color of the lights manually with Blackbody though. If you want to recreate a scene with an environment and artificial lights, it is better to capture HDR light information that is untreated, or at least with a standard white balance (6500K). Then all your HDRI captures will always be correct to each other.

For instance, if you capture a sunny daylight HDR, and color balance it. Then add a light with a 3000K temperature. That would probably work because the sunny daylight would have a color temperature close to 6500K, so your light will look properly warm in relation to it.

Then you switch your HDR to a night cityscape environment, that has been white balanced again (a lot of HDRI you find on the net is pre-exposed and white balanced). Your 3000K light will still be warm, much warmer than your lights from the HDRI, while it shouldn’t. It should have received the same white balance that was applried to the HDRI, but since you don’t know it, then you have to eyeball it.

The same can be said with pre-exposing HDRI, if you want your artificial lights or IES profiles intensities to be correct in every different lighting conditions, HDRI should be store in an absolute range. Unfortunately not a lot of softwares do it properly (I only know of Photomatix, but it has its quirk), and there is no standard value to define what 0 should be.

I am currently working on an HDR library of artificial lights that I hope to share with the community, and I see two different way to use them: you can use the actual colored textured which gives you the real color of the light, and then do the white balance in the camera (right now I’m doing it with a group node, applied to all my emissive / lamps). Nothing stops you from changing the color of your light with a multiplier, but at least your base is “sane”.

Or you can use just the luminance of the texture and eyeball the color yourself (more artistic driven but also prone to error if want it to be photorealistic).

Vray, Redshift, ProRender… all of these have Color Temperature settings in the render / camera, this is useful for artists.

@lsscpp: I am more thinking of Color Temperature / Tint setting a la Lightroom / any RAW treatment software. Working with curves and the white value is doable, just not user friendly :slight_smile:

It’s probably a simple UI thing to do as the code is already there, maybe that’s even doable in Python, I’ll have a look.

Thanks for your answers!

But what are you white balancing the HDR images to? What is the reference white? Your 3000K light will have proper relation to HDRs when they all are balanced to the same temperature. If one is 6500K, other 3500, third 9000 etc, ofcourse the 3K light will look wrong for most lf them.

So the problem lies in HDRs, not renders. If all HDRs were wb-d to 6500K which is the white point of sRGB and rec709 gamuts and equals default RGB unity in Blender, there would be no problem. Any necessary wb could be done in comp in case you want image wb to be something else than 6500K.

I want to do it exactly the way your described it: all lights and HDRIs balanced to 6500K, then I do my white balancing in the render/camera. Which to me is the proper way to do it if you plan to reuse your lights with different HDRIs.

And yes, the problem lies with most HDRIs that you can find on the internet: they are white balanced and pre-exposed, which is not correct if you want to use real camera settings. Let’s say the reference white is 6500K.

I agree, there should be a whitebalance control with a picker in camera, and also one as a node in compositing.

Working on it, I’m a terrible script hacker but it’s getting somewhere :wink:
Node in material is done, the one in compositing should be really easy, I’ll keep you posted.

So I have something working, a small add-on that adds a White Balance UI (which tweaks the curves in the background).
Send me a PM if you want to test it.


Hi chafouin,

a great plugin and an absolute “Must Have” for every Blender user.

A little mistake crept in.
The color temperature must be reversed.
1000 Kelvin is orange and 12000 Kelvin is blue.


I think it’s correct as far as camera white balance go.
If you set camera wb at 1500k, all your candles will look white, anything hotter will go ever more blue. Nothing is red. As you show in #2.
If you set camera wb at 7000k, the blue sky will go white, anything cooler will go ever more red (candles becoming silly red).

If I set my majority of indoor lights to 3200k using manufacturer data and want to balance for it, I should only have to dial in 3200k for the camera wb. Not some arbitrary number 5-6000’ish to get the image bluer. If I want to now fix the much bluer sky, I’d have to do what they do in the real world - gel it up (or simulate that effect).

yup, camera reads, while black body (emitter) writes temperatures - why values are inverted

great work, will be very helpful plugin indeed

Mmmmhh, that’s a little confusing when I think of the Blackbody Node.
But the way you explained it, it already makes sense.

Think of how software makes WB: you have to tell it the color temperature the picture was taken with, then the software reverses the input to compensate that temperature

I have made a lot of progress and will release it very soon :slight_smile:
The pre-alpha version I sent you had many issues but I think the new one works great.

Blackbody node defines the color temperature of the light source.
So if I define a light at 2000k it will become quite red.
If I set the camera to 2000k as well, that red now becomes white, but the outside blue becomes even bluer.

Example video, balanced to the incandescent light source.

I think the thing that could have confused Dito is that in the version he got, the Color Temperature swatch is indeed inverted. It should show blue at 12000, but still make the image more orange.

EDIT: No wait, that’s correct, that’s how it is it Adobe Camera Raw.

I just released the addon: https://blenderartists.org/forum/showthread.php?447919-Addon-Photographer-Camera-Exposure-White-balance-and-Autofocus

1 Like

Hey chafoulin, would you happen to have deleted the addon? The link isn’t working