Wednesday, March 08, 2006

Micro Details

I was admiring our rifle model today and remembered a very neat trick Jeff figured out some time ago. If you look closely at the details on the rifle, you'll see it has been normal-mapped from geometry for larger details like screws and grooves. These macro-details were actually modeled into the high poly reference model, before they were baked into the normal-map for the low poly one.

The rifle also has micro-details on it's surface, such as wood grain and grit on the metal. These details are not modeled into the high resolution reference, but are instead tileable normal-maps composited with the macro-detail normal map. What Jeff figured out was how to combine these two normal-maps into one, allowing artists to add fine details to surfaces without having to model every single scratch and dent.

Here is an example of a barrel. The barrel was first modeled as a high poly reference model, then as a low poly in-game model, and a macro-detail normal-map was generated. Then the low poly barrel was textured with a tileable wood grain normal-map. The wood grain normal-map was unwrapped to match the texture coordinates of the macro-detail map, and finally combined in Jeff's tool.

macro-detail normal-map of a barrel baked from a high-resolution model


micro-detail normal-map, created from tileable normal-maps, and unwrapped to match the baked macro-detail normal-map


final, combined normal-map


The combining process is not as easy as "adding" the two normals together, but it's not too bad either. It involves using one normal-map as a reference surface and marching over it pixel by pixel, peturbing each normal some more. It's a very handy tool, and if someone wants to know more about the algorithm, I can post it. I also haven't heard anyone else mention this technique before, perhaps we invented something new?