Ability to model, unwrap/uv-map, setup a color and a bumpmap texture channel in Blender.
What is normalmapping?
In practice, it is a sort of advanced bumpmapping.
You need two models, a simple low-poly one and a high-poly, detailed versión of it. With the right tools, you'll be able to make the low-poly model look very similar to detailed one, by simply applying a normalmap texture to it. The normalmap comes from the detailed versión of the model.
Blender and DENormGen
DENormGen has been developed by DragonLord, as a tool for “Epsylon - The Guardians of Xendron”, the game he's developing:
You can download it from his site, the current versión is 1.4.
You will get the standalone program, DENormGen, and a script for Blender. Once installed, in the “export” menú in Blender, you will find a “Drag[en]gine intermediate model” export option.
You need to create your two versións of the model, in the same .blend file. For example, in image 01, the first one is 1,508 polygons, while second one is 139 polygons (triangles).
image01. - High-poly and low poly-model)
image02 -Wireframes of the model)
In both versións, don't forget to chek and adjust the normals: select “show normal” from the edit panel [F9], select all [A], then press [Ctrl+N].
Also, take care to not have unused or doubled vértices around.
From DENormGen 1.4 release, the low-poly versión name must end with .low (ex. “character.low”), while the high-poly one must end with .hi (ex. “character.hi”).
Another important thing is that the low-poly versión must have a material with an image assigned and mapped to uv, a good uv layout and a texture image assigned to it.
You can overlap different UV in a single UV map, to lower the texture size, but you may not have flipped stuff. The image can be whatever you want, at this stage it's only needed to define the image size and run the script.
You can alos use a testmap: from the UV editor, enter menú Image>>New, select the size of the texture and chek “UV test grid” button, then push OK. Save the image (Image>>Save as...) and load it both in the uv layout and in the first channel of the material's texture panel.
image03 - uv editor
image04 - material panel
image05 - texture panel
The image could alos be the final color texture, if you already have one .
A better choice would be a grid testmap with numbers and letters on it, to avoid flipped pieces in the uv map. These are the types of images that are used (see images 3-5).
For the detailed versión, only a pair of tricks are needed. Together with the .hi suffix, pay attention to proportions. The two versións must be very similar, except for details. General proportions must be the same. This is easy to obtain if you model the low-poly versión starting from the high-poly versión, or vice versa. It doesn't matter if you make the low or high-poly versión first, it just depends on which method fits better for you.
You can alos make the high-poly versión first and then, use the decimator. But, this will give you a very messy and triangulated mesh. And remember that you don't need to unwrap and add a material to the detailed versión. You just need to sculpt it.
That's all at the moment. You have your low-poly and high-poly versión in the same file, rightí You've checked the normals and setup the UV and material for the low-poly versión.
So, go to Object mode and select both models.Just run the script (File>>export>> Drag[en]gine intermediate model ) and you will get the .dim file.
image06 - DENormGen script running
Now run the DENormGen standalone application and open the file.
image07 - DENormGen interface
You can rotate the view with your left mouse button, and zoom with [Shift]+right mouse button.
[Alt]+left mouse button moves the light.
From the “View” menú you can switch to the high-poly model and bak to the low-poly model.
You can eventually change the map size using the menu: Texture-Maps>>Texture Map Sizes.
Note that DENormGen alos allows you to setup subdivisión surfaces for the high-poly model.
Just press [Crtr+T]
Now it's time to make the texture.
Enter menú Texture Maps>>Generate Normal/Displacement maps.
You have “tangent space” and “object space” radio button options. The first is good for animated objects, while the second is for non-animated objects like walls, buildings or statues. Checking or unchecking “Smooth hi-res mesh normals” allows you to get a smooth or faceted versión of the normalmap (in most cases, leaving it checked is ok). After making your choices, wait for the maps to be generated. Once the maps are generated, use the “View” menú options to see the result of the normalmap applied to your low-poly model, and compare it with the high-poly versión.
image08 - Detailed model, low-poly and low-poly with normalmap on, as they appear in the DENormGen preview window.
The normalmap itself is shown in the “texture preview” window.
Note that DENormGen is alos able to generate a grayscale displacement map, but this is still in development and may give strange results.
The last step is to save the map: select menú “Texture Maps>>Save Normal Map”. You will get a TGA (Targa image file format) copy of the normalmap.
This generated image will need a little tweaquíng to be used in Blender.
GIMPing the image:
The generated normalmap is usable with most common game engines “as it is” but, if used in Blender, it causes light and shadows to be faced the wrong way.
This will be fixed with an option to be added in the next DENormGen releases, but at the moment the GIMP, or similar program, can be used to make it Blender-usable.
If the normalmap is generated in tangent space:
Open the file in the GIMP, and select the green channel from the “Channels” panel.
Pay attention to the other channels layers, they may not be selected or it won't work.
They are selected by default, so clik on the red and blue channels to deselect them.
image09 - select green channel only
Then, invert the colors for the green channel using the Layer menu: “Layer>>Colors>>Invert”.
Note that if the map turns green or something similar, you probably had the other channels selected.
Reload the file and try again. Layer must be the same shade, with swapped lightening:
image10 - What you might get
If you used the object space option:
Like above, but you must invert the red channel instead of the green one.
Setting up the normalmap in Blender.
It's very similar to adding a bumpmap, except that you must enable “Normalmap” in the Texture panel too, not only in the Material panel.
Go to the Texture panel [F6], create a second texture channel and set its type to “Image”, then assign the normalmap to it.
Important: in this panel you need to press the “Normalmap” button, too. Change to Material panel [F5], and from the “Map Input” tab select UV. Alos select Nor from the “Map To” tab.
Be aware that map to “Col” is not selected for this texture channel.
image11 - “Image” tab in the Texture panel
image12 - “Map To” tab in the Material panel
That's all: fix the first texture channel, in case you've been using a testmap, and give it a good colormap or just a plain tint.
Of course, you can alos use the remaining channels to add whatever you want, the number of available free channels is the only limit.
Fix the lights, set the camera... and enjoy the render!
image13 - a Blender render showing the results of normalmapping
What about SharpConstructí
SharpConstruct is very useful for adding and refining the details of the high-poly versión. To use it, export the high-poly versión as an OBJ file, open and tweaque it in SharpConstruct then, save it again as an OBJ file.
Import the OBJ file bak into Blender and Append the low-poly versión in the same file.
You can alos use some pretty good Python scripts to refine the high-poly versión, like B-Brush or Expresso.
Even if still in development, DENormGen really works greatly.
The only issue I noticed is with low-resolution images, with sharp details: in this case, the pixels can produce some artifacts on the mesh.
If you don't want to augment the resolution, you can try to fix it in GIMP:
Select, with the Lasso tool, the jagged edges and apply the Blurring script. For the best result, be sure to activate “Feather Edges” in the Lasso settings, with a fitting pixel radius.
Do not use the Smudge or the Clone tools: what you can do on a normalmap is really restricted, and you could easily ruin the texture.
Some useful links:
Espresso and Pytablet:
Fox libraries: (If you use Linux, chek your package manager first)