Offline Normalmap Generation for trueSpace
7.5 and newer
Render from trueSpace showing from left to right: the high resolution mesh, the low res mesh with standard normalmap which does not render and the rendered result of using the normal map texture generated by this script.
The download link can be found at the bottom of the page.
Normalmap rules and guidelines:
- The low and high res meshes must have the same location,
rotation and scale
- may work better if meshes are centered on the origin
- each mesh must be a single mesh not a hierarchy
- the low res mesh should be above/bigger than the high res mesh
- in some cases you can get better results if the peaks of the
high res mesh stick above the low res mesh
- the low and high res meshes must have a similar shape
- there should be no openings in the mesh
- the low res mesh must have a good non-overlapping UV map
- avoid 90 degree slopes - tangent space normal map doesn't like
vertical angles
- The high res mesh must not have any visible faces that are
perpendicular to the corresponding low res face!!!
- creates a "soft" map so to sharpen edges add tight geometry to
the high res mesh

Workflow:
- SAVE THE SCENE FIRST
- Make sure the low res mesh has a good UV map applied
to it.
- Make sure the high res is more or less physically inside the
low res mesh.
- Next make sure the low and high res meshes have the same
transform values. Go to model space and for both the low and
high res meshes do axis, normalize axis, axis. This puts the
axis at the origin. Back to workspace and use the "freezeTransform"
script to set the objects center at the origin, remove
rotations and set scale to one. NOTE: The
freezeTransform script is not compatible with workspace pivot.
- NEW NOTE: freezeTransform may be compatible with workspace
pivot as of trueSpace version 7.51
- Note: a recent test suggests that the freezeTransform script
may be enough without model side axis manipulation
- At this point I like to make a copy of the high res mesh and set
it aside for comparison and I open the Output Console view to get
status information
- Now run down the normalmapper interface from top to bottom.
- Choose a texture resolution
- Select the low res mesh and click the button - this will
flatten the history and prepare the script
- Select the high res mesh and click the next button - now
wait... THIS CAN TAKE A LONG TIME
- Save the images by pushing the last button - you can
choose normal and bump file names below that
- to change the resolution of the normalmap after it is
generated, do so directly on the high poly mesh, wait for the
normalmap to regenerate and then push
the Update Image button on the script
- increase the quality of the normalmap by increasing the
precision on the high poly mesh, wait for the map to regenerate
and push the Update Image button
If the normal map generation produces a blank image, reload the
scene and take the low res mesh into modelspace and do a point edit
on it. You can move a vertex and then undo to put it back.
This seems to fix the problem by some mysterious means.
The images below demonstrate the model preparation before normal
mapping takes place.

Note how the high and low res meshes have different scales,
rotations and locations.


Here both the high and low res meshes have the same transform,
only BB Size is different and the high resolution mesh is completely
enclosed by the low resolution mesh. The size difference
between the high and low res meshes should be as small as possible.
The size difference here is exaggerated for illustration.
The pictures below show a simple tile shaped normal map texture
generation. The low res mesh could have been a single square
and the results would have been the same.

high res(1908 vertices) and low res(4 vertices) meshes

This picture shows the low res mesh over the high res mesh. It
works poorly if the high res is on top of the low res.

Left original mesh,
right low poly using normal map texture.

normal map and bump map results
Just discovered that the normal map blank areas have a value of
(128,128,240) I believe this should be (127,127,255) so it might be
a good idea to run the result through the nvidia photoshop filter
and normalize it to the proper values.
click this line to
download the normal mapper script object
click this line to
download the freezeTransform script object
click this line to
download a simple DX material that can be used with the normal map
texture
Colors of normalmaps:
- red = horizontal (left - forward - right)
- green = vertical (up - forward - down)
- blue = depth (255 at surface - 127 max depth receive light -
0 deepest level
- (127,127,255) = polygon normal