This code allows you to create a RGB normal map from a heightmap. The output picture is RGBA and you can store various combination of the height in the Alpha channel.
You need development files for recent imagemagick core versions (API7)
to be installed, as well as pkg-config
. Then just do:
$ waf configure
and then
$ waf build
The binary normalmap is self-contained and generated within the directory
build/
. Simply copy it wherever you like.
Old versions of imagemagick (API6) can be compiled by appending the
option --oldmagick
to the configure script:
$ waf configure --oldmagick
and then
$ waf build
-
Richard Plangger (https://github.com/planrich/normalmap)
-
Shawn Kirst (https://code.google.com/p/gimp-normalmap/) for the algorithm to compute the normal map in The Gimp.