Could you explain the difference between bump maps, normal maps, spec maps, and ao maps?
Asketh - Anonymous
First, a little background reading. You might want to familiarize yourself with my previous post on how this sort of thing works in a general sense:
Ok, you’ve read that? Good. Let’s talk about the specifics of what the rest of these do:
Bump Map vs Normal Map
Bump Maps and Normal Maps are actually very similar - in fact, a bump map is a type of normal map. They both store height information about the surface they’re mapping, but the data they store is different. Bump maps store this data in terms of height directly - relative distance from the base of the polygon it’s on. Normal maps store the normals of the surfaces - the direction that the surface is facing. This can be used to calculate other things in addition to the sort of lighting involved, because the normal of the polygon being mapped might actually be facing in a different direction than the normal of the fake surface that the normal map is trying to simulate.
If you look closely, you can see how the shapes on the right look a little different from an angular sense, especially on the bottom two. That’s the directional data stored in the normal map coming into play.
Bump maps and Normal maps differ in that Normal maps require a lot more calculation. Bump maps can be created by hand, but you need some sort of tool to generate your normal maps for you, or else you run the risk of them not functioning properly.
Specular Maps are used to calculate something else entirely. Rather than trying to simulate height, what a specular map does is simulate reflectivity. Imagine a chunk of coal. It is dull, it is pithy, it is dirty, and it doesn’t reflect light very well. Now compare that to something made of chrome. You can see your face in it. The “texture” (as in the way it looks, rather than the image painted onto the surface) of these two materials can be simulated with a specular map applied to your polygon. Here’s an example of the same model with changes just to the specular map:
See how it looks so different in each image? Now imagine being able to use this to add other texture or detail. You could, for example, create a visual of a frosted glass with a detailed logo on it just by messing with the spec map.
Ambient Occlusion Maps
The final type of map you asked about is the Ambient Occlusion (or AO) map. Ambient Occlusion calculates how easily ambient light will reach that particular part. The inside of an opaque plastic tube, for example, will tend to be more dull and less bright than the inside of a frosted glass tube of the same dimensions, which will be different than a clear glass tube. This will tend to make things with crevices and cracks stand out more when doing lighting calculations, much moreso than a simple normal or bump map. Here’s an example of an AO map at work:
There’s an overall increased amount of darkness with the ambient occlusion on, but you can see it specifically concentrated around where the crevices and deep wrinkles are on this model’s face. Those areas are harder for ambient light to get into, since the general topography of the face is less conducive to letting light get in. Hence, we get ambient occlusion.
As you can see, there are a lot of really interesting tricks that programmers have invented in order to get more and more things that artists can tweak in order to create the specific visuals they are looking for. These sorts of techniques aren’t only necessarily useful for hyper-realistic looks either - imagine a game with sort of the stylized visuals or post-production of films like 300 or Sin City, except done on the fly. It does come with the drawback that adding all of these things also increases the amount of work that needs to be done for each thing (the ability to use an AO map means that now you need someone to create AO maps for everything), but it does empower artists to create objects of steadily increasing graphical fidelity.