Final Image

Intermediate Texturing

tools used: blender,gimp
goals: nor/ref maps from col maps; realism


Introduction

Creating a basic scene is easy: add an object or two, set up lights and a camera, and, if necessary, create some simple colored materials for your objects. You might go so far as using one of the default procedural textures for color maps, bump maps, or even alpha maps. But have you ever rendered your final image, just to be disappointed that something is just not quite right? One way to approach this is through creating your own bump and diffusion maps.

The Scene

Before beginning, I always find it useful to have a well established idea of what I want to do. Let's say we want to create a wooden plank. An old, beaten plank, that happened to somehow end up in a field on a cloudy day. This piece of wood has a good history to it: it used to serve as a lever to haul heavy, jewel filled crates on Blackbeard's Pirateship. So it's seen a lot of action, being deteriorated well by the salt air.

I will assume you know how to create a basic scene. Create two planes: one for the ground, and one as the plank. Add some lights.

Next, add the basic materials to the objects. Make the ground plane green and have no specular and no hard values. Add a brownish material to the plank and call it "wood." I chose small hard and spec values, because this wood is old, and shouldn't be shiny at all. Coloring for the spec value is only used to give a sense of depth and variation -- this is a good technique to remember.

Figure 1: Basic Scene
Basic Scene
Figure 2: Basic "Wood" Material Settings
Main Color Specular Color Spec and Hard Settings


Color Map

The Color Map

The result in Figure 1 looks like a 3d computer object, and not really like a wooden board. It's just a plane with a brown color. A color map will help fix this. I used a pine image from IceMan's zip of 50 wooden veneers, and renamed it to pineCol.jpg.

Assign pineCol.jpg as a new texture to the wood material, with the default settings. If you look carefully at the rendered picture, you'll notice a perfectly smooth pine plank. Would work well to build a table or cabinet or what not. But keep the story of the board in mind -- this is an old sucker, and still need crevaces and grooves and cuts and slices. This can be accomplished with the Bump, or Nor map.

Figure 3: Applied Col Map
Applied Col Map


Bump Map

The Bump/Nor Map

A Bump or Nor map (in Blender terminology) is basically a grayscale map which adds detailed bumps and grooves to an object. In general, whiter areas represent bumps, and darker areas represent grooves. The closer to pure white, the higher the bump; the closer to pur black, the deeper the divot.

How do we create an effective bump map? Think about the wood. It has deep grooves due to deterioration from the salt air, but the bumps will be mild and worn from use. What's this mean? Recall how the bump map works: more white leads to higher, more black leads to lower. Therefore, the bump map should look somewhat darker overall. Not many whiter areas, but good, deep, black areas. To achieve this effect with the pineCol.jpg file, open up your favorite painting program. Since I cannot afford Photoshop yet, I'll be using the Gimp. Fortunatley, the methods described here will apply to both programs. If you don't have either program, you can still use your favorite one as long as it can change levels or brightness and contrast and create grayscale images.

Creating the Bump Map with the Gimp

Fire up the Gimp and open pineCol.jpg. Change the image to grayscale by right-clicking, selecting image -» mode -» grayscale. As you can see, the image is mostly light gray with a few black streaks through it. To change that, you'll use the levels editor, available in the menu as image -» colors -» levels. Here's how the levels editor works (please note: what I say here might be false by definition, but this is how I perceive it to work, and so far, it has. So nyah to you technical purists!):

The input levels will determine individual strength. That is, by moving the far left triangle right, the black parts become blacker; the far right triangle will make white parts whiter. The middle triangle will determine which triangle (left or right) will be favored (i.e. have a greater effect). The image needs more contrast; so bring the far right and left triangles closer. Favor the darker regions, to get more groove than bump. My settings are shown in figure 4.

My particular example was too black. The output triangles will change the image, making it overall more black or more white. The left triangle decreases the amount of total blackness, and the right decreases the total amount of whiteness. Adjust accordingly and save the picture as pineNor.jpg. Remember, if you don't have a levels editor, you can achieve similar effects by tweaking brightness/contrast settings.

From the Gimp to Blender

To try this texture bump map on the wooden plank, add the texture into the second texture channel of the wood material with default settings. In the materials buttons, make sure you change the output mapping from "col" to "nor." Because Blender handles Nor maps differently, press the nor button a second time (making it yellow) to inverse. Render the scene to see the results. If your version isn't bumpy enough, there are at least two solutions: go back to the picture editor and increase the contrast for the map, or simply increase the bump effect within blender. I increased the \emph{nor slider} from the default of 0.5 to 1.0.

Figure 4: Example Levels Settings
Example Levels
Figure 5: Nor Map Settings
Nor Map Settings
Figure 6: Applied Nor Map
Applied Nor Map
Rendering will produce the ribbed plank as in Figure 6. For the sake of realism, it still misses a major element of detail: internal shading. You really cannot tell how deep those grooves are at first glance. When you have a groove in real life, it becomes darker the deeper it gets. This is a result of the diffusion of light, and appropriately so, diffusion maps can be used to simulate this natural effect.


Diffusion Map

The Diffusion/Ref Map

Diffusion maps, or as Blender calls them "Ref Maps," work in a similar fasion to bump maps. Grayscale images are created most often from a bump map. The whiter areas will cause the material color to be affected by user lamps more easily, whereas darker areas will cause the material color to resemble the ambient light. In other words, the white areas will be brighter and show more of the material's natural color.

Try to imagine what a diffusion map for this wood plank should look like. The grooves need to be distiguished, deteroirated from the salt water -- deep, dark. But at the same time, the worn-down bumps need to be visible. Therefore, the map should be well contrasted, but keep an overall light-gray/white color.

Creating a Diffusion map with the Gimp

Open pineNor.jpg (your bump map) with the Gimp. You don't need to change this image to grayscale, because it's already been set that way. Open the Levels editor (remember the following steps can be also be achieved to a degree with brightness/contrast settings). To get a high contrast, you need to increase both the white and dark elements at the same time. Therefore, move the far right and far left triangles of the input levels towards each other, and use the middle triangle to favor the black. Why favor the black? You could favor the white, but then you'd be loosing the thickness of the darker areas. The settings I used can be seen in Figure 7.

Figure 7: Example Levels Settings
Example Levels
Because my image was too white, I needed to decrease the overall whitness (or increase overall blackness), and so I adjusted the output levels accordingly.

That's pretty much it. Save this image as pineRef.jpg, and check it out in Blender.

From the Gimp to Blender

Bring this texture in just like you did with the bump map, but this time use the third texture channel (the Blender Manual describes that the order of texture maps is important; in this example, the first channel should be color, the second bump, and the third diffusion). In the material buttons, change the texture from "col" to "ref," and remember to adjust the material's natural diffusion to 0.

Figure 8: Ref Map Settings
Ref Slider Set to 0

Ref Map Settings


Wrapup

Figure 9: Left picture has no Ref Map
Sans Ref Map With Ref Map
See the difference between the pictures? That's a really keen effect. Immediatley the wood look more realistic, and even older and rotting. But honestly, something's still missing. It's missing character!

Now comes the part where you have to use your imagination to actually make the wood come to life. I've taken the liberty to provide a few examples of how might one use various techniques to liven up the wood. Because the focus of this tutorial is texturing, I will refrain from describing modelling techniques to make this wood look old. I will only remind you that wood is not a plane, and has thickness to it.

Figure 10:Y-direction Stretch
delta sizeY
Remember the description of Blackbeard's lever-plank: thick, deteriorating grooves, and a worn down surface. Without redoing the textures recently created, we could finish the task by increasing the size of the maps -- but only in the y-direction. The maps are already stretching in the x, so stretching the y can be done in two ways. The first method modifys only the Ref Map (can later be adjusted for all maps) by setting the sizeY between -1 and 1.

Figure 11: Result of Ref Map strech
Ref Map Stretch
The second method involves changing the texture space of the object. In the 3D window, make sure the plank is selected, and press the t-key and select "Size." Use the middle-mouse button to limit the scaling in the y-direction. This will affect all the textures (col, nor, and ref). Figure 13 shows my final result. That's what I'm talkin' about. Blackbeard was there.

Figure 12: Changing Texture Space
t-key pup menu
Example of Changed Texture Space
Figure 13: Blackbeard's Lever
Avast, ye Land Lubber