This tool is a successor to my previous browser based heightmap colorer and shadow generator.
This new version comes in a compiled exe file. It was written in python 2.7 and packaged with py2exe. The source code is included with the download.
The tool takes three command line parameters: the heightmap image, the gradient image, and the angle of the sun in degrees.
- Code: Select all
heightmap.exe height.png gradient.png 30
The program outputs two image files: color.png and shadow.png
The program colors the heightmap based on the gradient image. For every pixel of the heightmap, the program determines the color at the coordinate (x,y) based on the color at the gradient coordinate (floor((r+g+b)/3),0) where r, g, and b are the color channels of the heightmap image at (x,y).
Any of the parameters can be left out and the default values will be used. For example
- Code: Select all
heightmap.exe myheightmap.png
is a valid input.