|Applicable Blender version: 2.70.|
Textures are laid on top of materials to give them complicated colors and other effects. An object is covered with a material, which might contain several textures: An image texture of stone, a texture to make the stone look bumpy, and a texture to make the stone deform in different ways.
A texture may be an image or a computed function. What the texture does and how it is mapped onto your object is set in the material buttons. Some commonly used texture types are shown on the page Using Textures.
This tutorial uses the file from the Quickie Material tutorial. If you didn't do it before, go back and do it now.
Making It MottledEdit
The file we're working with has no texture by default.
To add a texture:
- Bring up the Texture tab in the Properties window.
- The top panel shows a list of texture slots for the current material. In Blender v2.70, there should already be a texture in the first slot called "Tex". If it is not present, click on the + New-button under this list. This will create a new texture, attach it to the current material in the first slot, and select it ready for adjustments to its settings.
- Select the texture type Clouds in the pop-up menu. You can also change the texture's name, as we have done for the material.
A preview appears, as well as some parameters to experiment with. A Clouds texture provides some irregularities.
- If you check back in the Materials tab, you will see a preview of the texture applied to the material in a garish magenta colour. This is the default influence colour for a new texture; presumably it was deliberately chosen to stand out as a reminder to make you switch to settings other than the default!
Adjusting the InfluenceEdit
If you scroll down the Texture settings in the Properties window, you will see two further panels, titled Mapping and Influence. The Influence panel controls how the material is affected by the texture. Among the ways it can do this are:
- RGB color (all images, Magic, every texture with a colorband)
- Intensity, either as grey scale or/and an alpha value (most of the procedural textures, image textures with alpha, textures with a colorband)
- Normal values (Stucci, normal maps), which give the material a bumpy or grainy appearance
If you want to use textures you always have to be aware of the value a texture provides and the Influence settings for the material.
If you look at the above default Influence settings, there is just one box checked, in a group titled “Diffuse:” (which means the texture influences parameters for the material’s diffuse shader). The labels next to the checkboxes will probably not be visible in the default window width; if you widen the window, you should see the word “Color:” appear in the value slider. Alternatively, hover the mouse over either the checkbox or the slider, and you will see tooltips that mention “diffuse color”.
A Clouds texture provides a monochrome intensity value, ranging from 0 (where the texture is black) to 1 (where the texture is white). If you click on the colour swatch at the bottom of the Influence panel, you can alter the colour that is applied to the texture intensity value.
- Set the influence colour to black.
Procedural textures are not shown in the 3D window (only if you would use excessive amounts of vertices), even if you use GLSL materials. This means that we have to render the image to see the texture properly.
- Render the image (F12), or use the preview to judge the result of the texture.
Next we will add a Stucci texture to make our clouds look bumpy.
Making It Wrinkly (Bump Map)Edit
- In the Texture panel in the Properties window, click on the second (empty) slot in the list of textures at the top. All the settings for the texture you previously created should disappear. (But of course they haven’t really gone, as you can confirm by reselecting the texture in the first slot.)
- Add a new texture here and set the type to Stucci.
- In the Influence panel, uncheck the Diffuse Color influence and, in the group titled “Geometry”, check the first box (titled “Norm”). This means it affects the rendered normal, i.e. the angle the renderer treats the surface as - creating fake shadows on the surface.
- Play with the Norm slider, but leave it on about 4.
The normal in physics and geometry is a vector perpendicular (“normal”) to a surface. It is used to calculate the effect of lighting. In computer graphics, we find we can achieve all kinds of interesting effects by having the normal point in some other direction than actually normal to the surface. As, in this example, by perturbing it from one pixel to the next according to the value of a texture function, we can give the impression of a more complex geometry than a simple smooth surface, without actually generating such a geometry. In other words, like many things in 3D graphics, this is a lie and a cheat, and you can tell because the outline border of the object is still smooth—the bumps only appear on the visible parts within the silhouette.
Such a use of a texture to fiddle the surface normal is called a “bump” map or “normal” map. If it were used to actually generate new geometry, then it is called a “displacement” map—of course, this becomes much more computationally expensive. Since bump mapping is fake 3D, it doesn’t necessarily look good under every circumstance, you will get a greater effect on smoothly curved surfaces with high specularity, only a little or no effect on flat surfaces with low specularity.