White Balance in Mentalray

In this tutorial I will be talking about white point and white balance and their use in 3D space such as 3ds MAX and Mentalray.

First of all lets get better understanding of white balance and white point:

In photography and image processing, color balance is the global adjustment of the intensities of the colors (typically red, green, and blue – primary colors). An important goal of this adjustment is to render specific colors – particularly neutral colors – correctly; hence, the general method is sometimes called gray balance, neutral balance, or white balance.

See the full article here.

white point (often referred to as reference white or target white in technical documents) is a set of tristimulus values or chromaticity coordinates that serve to define the color “white” in image capture, encoding, or reproduction. Depending on the application, different definitions of white are needed to give acceptable results. For example, photographs taken indoors may be lit by incandescent lights, which are relatively orange compared to daylight. Defining “white” as daylight will give unacceptable results when attempting to color correct a photograph taken with incandescent lighting.

See the full article here.

As the Sun crosses the sky, it may appear to be red, orange, yellow or white depending on its position. This happens because the Sun light changes its color temperature. Color temperature is a standard method of describing colours for use in a range of situations and with different equipment. Colour temperatures are normally expressed in units called kelvins (K). Note that the term degrees kelvin is often used but is not technically correct (see below).

Image taken from here.

For our 3D scenes we basically have to define what color temperature of our lights are going to render as white. In the picture below (taken from wikipedia) you can see how in a same shot some light sources render as yellow the others blue. This happens because the color temperature for the scene is set somewhere around 4000K. Thus the light sources above 4000 are going to render blue, and the light sources below 4000K are going to render yellow. The match between the white point of the shot and the temperature of the light source is going to cause a white (or neutral) lighting.

So having said that, what’s important to us is to define the white or neutral colors in our scene, depending on the light sources we are going to use (and our goals and desires for a scene lighting.

The Tutorial

In this tutorial I will be using a simple scene containing couple objects floating on a ocean surface. In the following scene I used photometric Sun and Sky (a daylight system for mentalray) to achieve a photorealism. Here are the start files you are going to need.

When you download this file and open it in 3ds MAX 2009 or up, and hit render (f9) you should get a result like the one above. You should note the light setups, the environment setups, and the daylight position.


Now you should note that the whitepoint for my starting scene is set to 7500. If you check out the “Color Temperatures in the Kelvin Scale” (the first diagram) you should understand that the temperature of the sun at noon is about 5000K to 5500K. Which means that IF your daylight source is up in the sky and IF your whitepoint is set to something about 5500K that should result in the render as a white (neutral) colors. This is important to know as a rule, and then we have to learn how to use it, and how to break it as an artist so we could get the desired results.

Here are the tweaking part of it. Here is the start render and its whitepoint prefs:

Without changing anything I will start progressively to increase the whitepoint just to examine the results:

As you probably notice, when we render our scene with higher value of the whitepoint we get a slightly yellowish shades to our render. That makes the render more like earlier in the morning or later in the afternoon when the sun is lower on the horizon and the light becomes a little more warmer.

Now we have something very similar to the lighting of a clear sky on sunrise or sunset. Naturally, you may come up with way better render and way better overall light setups, whats important for me to show is the nature of the whitepoint and its use for any given scene where you use a daylight system.

Lets try decreasing the whitepoint, just to see what happens. I will start with something lower than 7500K.

Decreasing the white point caused the blue shades to overcome. There almost no neutral light and colors in the render – its because the mismatching of the color temperature of the sun and the render output. This means you don’t have a correct lighting in your scene. Of course, that’s not necessarily bad, its just the truth. You as an artist should use the technology to create the desired output in the easies possible way for you.

Having said that, you could use your daylight system, its exposure control and the whitepoint prefs, in a various artistic ways to establish different mood in your scene, or simply to have a specific daytime, such as early in the morning, noon or night time.

For those of you who have more interest in the subject topic and would like to learn more you could check out the following great tutorial by Jeff Patton here.

Enjoy playing around with it!