Textures: how to improve your object

I read once that an artist spend 1/3 of the time modeling, 1/3 in texturing and the last 1/3 in lighting... So as I have for the moment explained some of the methods to model, I would like to talk about textures.

The textures give the material aspect to the object. In my example below I have a simple sphere and I will put some textures on it. As you will see, results may vary in an amazing way, and even from a simple shape like a sphere I can reach some cool results.

Well, now you have seen that textures can change the material aspect, we will see what are exactly textures. Texture generally could be from two different families: images, or procedural. Images textures are photo or pre-calculated images that will be applied to the object, and procedural textures are like small programs that will explain how the color or other information will be at a given position (generally we use two coordinate U,V).

So we may have some formula like red_color=sin(U) and blue_color=cos(V). But why use images or procedural texture ? Well... depends of your need. Procedural are slower than images textures but will archive a better result. In 3d games it's quiet impossible to use procedural texture to describe every thing but maybe it could be used to create some special things like fire or water. Procedural texture are also difficult to create and doesn't look always like a real thing. The biggest advantage of procedural texture are the rendered quality. With image texture you have a defined size and when you zoom at the object you will start to notice some strange results and it's not easy to apply images textures to complex object like organic things because the texture will be stretched over the object. The follow example demonstrate the difference from the procedural texture (on the left) and the same texture but applied as a image texture (on the right). I used a planar UV mapping for objects so the application of the texture was the same.

There are different components in a texture beside the fact of how to produce them (images, or procedural). The first is the color component which will change the color the object have. In the following example I will create (just with textures) a broken wall with the under some bricks.

The second one is the bump map which add some 3d aspect on your texture. This is extremely useful because it some sort of geometry without the need of complex object. The bump map is a gray scale image where the black is the lower part of the object and the white the highest part.

And now just for the fun I show you the result with those to components. OK the image is darker because I change also the luminosity of the object, but as you can notice there is some small shadows on it that will give you the impression of a 3d object.

Actually there is still a problem with images texture, you will need seamless textures if you want the possibility to repeat the pattern or very big ones if you want to have texture that are not repeating them self. With procedural texture you have not this problems (in general). So I have transformed my texture with some tricks to be seamless, but you will notice that it's not that good in vertical and I should work on it a bit more if I want to use it. You may click on the picture above and below to see a page with that texture as the background. (Use the back button of your web browser to come back here)

But it's not finished here ! you may also have other properties on you texture like transparency, reflections and more you have more you will use :-) all those "channels" may use a gray scale image of a procedural function to explain where is a part more transparent or with more reflections. The dark part will be transparent for example and the white part will contain you colors and bump map. In the following example I use a checkerboard to produce different reflection of the object.

The example of the wall I used in this article was designed by myself with a procedural texture generation tool. It took me more or less 2 hours to archive the result I desire. You may found here a screen shot of what can look like my procedural texture.

A texture can also be animated. To produce for examples waves, flames or whatever you would like. This could result in some amazing things in animations.

A last word. In the 3D client we will use square textures and they must be a power of 2 (32x32, 64x64, 128x128, ...). The format actually used is BMP but may vary.

A. Bertrand