The DENormGen is a tool designed to help you create Geometry Normal Maps. Such maps are used in high-end Games to fool the Player into believing that a Low Resolution Mesh does have much more detail than it actually does. Those kind of Normal Maps are best generated using a High Resolution Mesh from which the Normal Informations is extracted and projected onto the Low Resolution Mesh. This tool provides exactly this functionality. A known tool to do the same is ORB but it is windows only and impracticable to use for developing a game on a Linux system.
Besides generating a Geometry Normal Map this tool can also apply a Detail Normal Map onto of the generated Geometry Normal Map. Such Normal Maps are easily created using Normal-Plugins for 2D Graphic Applications like The GIMP. Those Normal Informations are then used to enhance the generated Normal Map. This process can be repeated many times.
Also generated is a Displacement or Height Map. Those maps can be used for Offset Mapping or with never Pixel Shader version to render a Low Resolution Mesh with much more detail by creating Vertices and Faces on the fly during rendering displacing them using such a Displacement Map. This map can also be used as a pure Height Map for Terrain Generators. Usage: Blender3D Script
The Blender3D Script is used to export models into the *.dim format for usage with the Normal Map Generator. To export a model you create a *.blend file which contains two distinct meshes. One of the meshes is the low resolution mesh. It has to have no subdivision turned on (which marks this mesh as the low resolution mesh) and needs UV-coordinates. Each material is considered to be one texture of the final mesh and has to have a disc texture image as its first texture channel. The size for the texture is taken from this texture image. All texture coordinates have to reside inside the boundaries of the texture. The model is considered to have normals smoothed no matter if it is activated or not. For the high resolution mesh activate subdivision even if you do not need it (in which case you set it to 0). In this mesh all material and texture coordinates are ignored. You can have them if you need them for other scripts or projects and the script will not throw and error. To export the model select both the low resolution mesh and the high resolution one and select 'export' under the file option and the script. Specify a *.dim file and save.
To generate the normal maps just load the *.dim file in the normal generator. You can use different views to look at the meshes and maps. To orbit around the current view simply click and drag. To move closer or further away press and hold the shift key while dragging. To change the light direction press and hold the control key while dragging. The light is a directional light orbiting around the center of the object. The Low-Res-Mesh view does already apply the normal map (by default planar) and requires a Pixel-Shader aware graphic card to work. Otherwise no live-preview is done. If you want your high resolution model to be subdivided go to the Hi-Res Mesh Options and select the sub-division level. The offset parameter is experimental and moves all vertices along the normal by the given distance (in 1/10 mm steps) before subdivision is carried out. This could be used if the model is slightly too small. The voxel-count is an advanced parameter influencing the speed-up algorithme. A value of 50-100 is good enough (with many small faces a higher value can lead faster results). By default the texture is sized to the dimensions stored in the *.dim file. You can change them though with the Texture Size command if you need a different value. it is not mandatory but using dimensions of powers of 2 are highly recommanded. Done so you use the Generate Texture Maps command to generate a normal and displacement map for one selected texture. Repeat this process for all textures you need a normal and displacement map for. Once done you can preview your normal map in the Low-Res-Mesh view. You can also refine your normal map by applying a detail-normal map from file with the Apply Detail Normal Map command which is then merged onto the current normal map. This process can be repeated many times. Finally save your normal and displacement maps one by one to disc.
In preview mode after applying a detail normal map it can happen that the preview image looks blocky and gives the impression of the normal map beeing bad. This is a problem with certain graphic cards under linux to apply automatically compression to textures without noticing that there is a normal map which should not be compressed. This is only a visual glitch and the generated normal-map is ok and not affected. Samples
Head over to the Downloads page for downloads related to this sub project.
Screenshots of the tool in action can be found on the Screenshots page.