Generate Normal Maps using xNormal

In this tutorial I’ll be showing you how to generate normal maps using a high poly mesh and the program xNormal.


Download the program: http://www.xnormal.net/Downloads.aspx

What is a normal?

Normals basically tell the renderer how to shade a mesh. An ordinary polygon (with three vertices) has a normal that shoots straight out from it, and thus the entire plane is shaded at the same angle. With the use of normal maps, however, we can break up the way a mesh is shaded, and give the feeling of a more detailed mesh (smoothing groups also modify the normals by “bending” them over several surfaces, making them look smooth).

What we first need (besides installing the program) is a low poly model (it also needs to be uv-ed correctly). This is the model that we’ll slap the normal map onto in the end. For this tutorial I have created a simple wheel:

Next you will need a high poly model which we will use to generate a normal map (and an ambient occlusion map if we want to). Note that it doesn’t matter weather or not this mesh is uv-ed. Here’s my rather crappy one:

Next step is to load the meshes in xNormal. To do this, we first need to export them to a format that the program reads, I’ve decided to export to the .obj format (there are quite a lot of formats that xNormal reads, check out the documentation if you want more info on that).
Before exporting, make sure that the two meshes are of the same size and positioned as tightly as possible compared to eachother.
Correct positioning looks like this:

Bad positioning might look somewhat like this:

This may seem dumb to even mention, but imagine you’ve got a complex character model, or a weapon model with several parts (which would need to be moved aside as interlapping meshes screw with the baking).
Export the meshes and we’re ready to load them in xNormal.

First select your high poly model:

Then your low poly model:

Finally we’re going to change some settings.

First you need to specify an output file. The filenames will be named “yournam_normal”, “youname_occlusion” etc.
After you’ve done that I’d recommend upping the map resolution a bit. Higher resolution means longer rendering times.
Then tick the boxes for the maps you want, in this case “Normal Map” and “Ambient Occlusion”. Finally, you may want to max the antialiasing amount (if this is a final render, I wouldn’t recommend it for test renders since it increases the rendering times dramatically).
Everything’s set! Now hit “Generate Maps” in the bottom-right corner and wait while your maps are rendered.

Here’s how my maps turned out:

Normal

Occlusion:

And here’s how my model looks with the normal map applied:

Finally, a comparision between the two meshes with the ambient occlusion map applied:

Lowpoly Mesh: 256 tris
Highpoly Mesh: 2 368 tris

And that’s about it, I hope you found this tutorial useful.

Wow… That looks amazing! They look practically the same, and with a poly count that Source could handle!

Nice one!

Just added it to my bookmarks.