Tone Correction

Work environment for texturing

The first step to take before starting to process photos and make 3D CG textures out of them, is to setup the workstation correctly and then to setup a work environment specifically designed for making 3D CG textures in the paint application. And, finally, if possible, setup the 3D CG application so it can preview the renders with tone correction.

Setting up the workstation

Be it for preparing textures, for viewing photos or, in fact, for any serious CG work, 3D and 2D, the workstation monitor should always be setup so it have a gamma of 2.2. There are two ways of doing that.

The prefered way, for any serious graphics artist is to calibrate the monitor using a calibrating and monitoring device. There are several monitor calibration devices around. Personally, I bought and installed the Pantone Huey. It is relatively cheap but does a good job and one particularity I like is that it can adjust the monitor display characteristics dynamically as the lighting in the work environment changes. The Huey is permanently connected to a USB port and is used in two steps. The first step is to sense and read the monitor display characteristics and store that into a profile file. The second step is where the huey device sits on the desktop sensing the environing light and adjusts the monitor accordingly. The Huey have a few predefined setups and the default one is a gamma 2.2. That is the one I use except in some exceptional situations.

The cheapest way is to manually calibrate the monitor using one of several gamma checkers available on the internet. The easiest to use gamma checker is an all in one gamma and black level chart provided by Norman Koren. Another good gamma calibration procedure with charts is provided by Timo Autiokari. Today, almost every graphics card includes a color adjustment widget that includes a gamma correction slider. This widget is available by right-clicking on the desktop on a Windows OS and selecting "Properties" and then "Settings" and then "Advanced" and then, the rest depends on your graphics card manufacturer but look for a tab that says "Color management" or something similar. There you should see a gamma slider. Use this slider along with one of the gamma charts provided in one of the web pages I just pointed to adgust the gamma to 2.2. But follow all the instructions because the white and black levels are also important adjustments.

Setting up the paint application

When loading a photo in a paint application, the display environment is designed so the photo looks good with its tome correction. However, when using a photo to produce 3D CG texture, this tone correction is unsuitable and must be removed. The problem is that if we remove the tone correction, the photo will look too dark. The photo will look much darker that when it is rendered and tone corrected. So the paint application display environment must be set to compensate for this. I will review the procedure to setup the paint environment for Photoshop and for The Gimp.

Setting a 3D Texture profile in Photoshop

Open the "edit", "Color settings" dialog. In "Settings", select "Custom". In "Working Space", "RGB", select "custom RGB...". In the following dialog, set "Name" to "3D texturing" and set "Gamma" to "1.0" and click "OK". Back in the "Color settings" dialog, click "Save" and save the profile under the name "3D Texturing".

I like to also set the "Working Space", "Gray" to gamma 3.0 on my "3D texturing" profile. Gray scale image files are generally used to control some surface properties such as reflectivity, ambiance, specularity, etc and to paint bump maps so It is important that a 50% gray in the file does look like 50% gray on the display.

With this color setting, when a photo is loaded in Photoshop, it will look way too washed out and that is what we want. We want to see it like the renderer will see it. Not like a tone corrected photo. To retrieve the photo true colors and thus to get back the reflectance data in the photo, the photo gamma must be changed to 0.45 (which is 1/2.2, the inverse of gamma 2.2). To do that in Photoshop, open the "Levels..." dialog box and slide the middle cursor to the right until the middle value indicates 0.45. That's it. Now, the file contains color data that is much more representative of the true surfaces reflectance. More on that later.

Setting The Gimp for 3D Texturing

In "Display" menu, "Display filters" option, click on "Gamma" and the right pointing arrow. Select "Gamma" in the list to the right and adjust the gamma to "2.2" and then click on validate. The Gimp does not have an option for saving color profiles or color settings. This must be changed manually every time a 3D texture must be worked on.

With this color setting, when a photo is loaded in The Gimp, it will look way too washed out and that is what we want. We want to see it like the renderer will see it. Not like a tone corrected photo. To retrieve the photo true colors and thus to get back the reflectance data in the photo, the photo gamma must be changed to 0.45 (which is 1/2.2, the inverse of gamma 2.2). To do that in The Gimp, click on "Tools" menu, then "Color tools" option and then "Levels..." dialog box and slide the middle cursor to the right until the middle value indicates 0.45. That's it. Now, the file contains color data that is much more representative of the true surfaces reflectance. More on that later.

You may wonder why gamma must be set to 1.0 in Photoshop and to 2.2 in The Gimp. Well, this whole gamma correction thing is really a big mess. it depends on what we are talking about. For instance, when we say that a monitor is set to a gamma of 2.2, we mean that the voltage to illumination transfer curve can be represented by a power 2.2 function. But when we say that a photo is corrected with a gamma 2.2, we actually mean that the photo data was corrected so it display correctly on a 2.2 gamma monitor. In reality, the photo data is corrected with a power 0.45 function so we should say that the photo was corrected with a gamma 0.45. So in the color settings dialog, Photoshop references the monitor gamma curve. A monitor with a gamma 1.0 will be very bright. While in The Gimp, the setting references the photo data. It means "Add a gamma 2.2 to the photo display" which actually really means "Add a gamma 0.45 to the photo display". The bottom line is don't try to break your head on trying to understand this mess. Just apply the recipes.

Setting up the 3D CG application

I don't know about all the 3D CG applications but I will take Animation:Master as an example. In the "Tools" menu, "Options", "Rendering" tab, there are two settings for adjusting the gamma of the "Preview renders": "Desired Gamma" and "Current Gamma".

The "Current Gamma" setting can be set with the help of the embedded gamma chart. The display monitor should arleady be set with a gamma 2.2 but the provided gamma chart will allow adjusting the preview renders to work correctly with whatever prefered gamma setting.

The "Desired Gamma" should be set to whatever gamma correction that is planned to be applied as a post processing on the rendered output files. In the context of the tone correction tutorial, this should be set to "2.2".

The default values for those settings are Desired Gamma: 1.0 and Current Gamma: 2.2. This setting will actually apply no gamma correction at all to the preview renders no mater how your workstation gamma is actually set. In the context of the current Tone Correction tutorial, those settings should be set to 2.2 in both cases.