Ter and Bmp File Format Issues

There are some issues with the Terragen .ter and Bitmap .bmp file formats exported in World Machine.

According to the Terragen file format spec (http://www.planetside.co.uk/terragen/dev/tgterrain.html) the SIZE chunk value is supposed to be “n-1”, where “n” is the number of data points on a side (ie. horz or vert heightmap resolution).
So for a heightmap that is 256x256 (0x100) the SIZE chunk value is 255 (0xFF). For a heightmap that is 128x128 (0x80) the SIZE chunk value is 127 (0x7F).

World Machine is incorrectly writing the SIZE chunk value as “n” and not as “n-1”.
This causes WM .ter files to error on various applications that validate the header values to the total size (W*H) of the ALTW heightmap data chunk.

I still have to look at the .bmp error. I’ll post back with the information soon.