Converting a .ter file into a 16 bit PNG heightmap (revised)

Author Topic: Converting a .ter file into a 16 bit PNG heightmap (revised)  (Read 1769 times)

I'm aware maps have been gone for years, but something like this was never made, so I'll make it as a resource to anyone who's interesting in doing so.

The proper method

Tools needed:
HxD
GIMP

1. Open the .ter file using HxD.
2. Press Ctrl + E or go to edit and select block to select a block.
3. Set the Start-offset to 1 and the End-offset to 20000, which should show a length of 20000 as well. Make sure you're using Hex mode.
4. Copy the selection, and paste it into a new file in HxD. Save this file as the original name of the .ter file but with the .data extension.
5. Open GIMP.
6. Drag and drop or otherwise open the new .data file you made using HxD. The "Load Image from Raw Data" GUI should show up.
7. Change the Image Type to "Gray unsigned 16 bit Big Endian", and set the Image Width and Height to 256.
8. Export the image as a PNG and change automatic pixel format to "16 bpc GRAY", then export.
9. You now have a perfect 16 bit heightmap of that .ter file!
« Last Edit: December 17, 2018, 03:03:22 PM by QuadStorm »

The mission/terrain editor can also export 256 resolution heightmaps


I've added in the proper method of doing this since the first byte is actually the version number and not part of the heightmap's data.
Attached is the slopes heightmap.
« Last Edit: December 17, 2018, 04:07:03 PM by QuadStorm »