Game Development Community

Topography maps 2 heightmap converter

by Artur Hallmann · in Torque Game Engine · 10/10/2005 (3:28 pm) · 1 replies

Hi all!

I was thinking about creating a mars game with real topographic data from the NASA.
An example is this, full globe topographic map of the mars:

www.solarviews.com/cap/mgs/mgstopo2.htm

Its quite a simple algorithm, i'm uploading the source package with executable to my webserver, but it won't be there for a long time, so if someone would like to mirror it, it would be great (i'm so often frustrated because links won't work anymore :/ )

I coded it with wxWidgets, so if you want to recompile, you need to setup wxWidgets first and use my code, or just implement it in your favorite language & library... should be simple.

First, i give you an screenshot of the input and the output image:

input:
tigral.technicx.net/input.jpg
output:
tigral.technicx.net/output.jpg
i'm using two files for the conversion, legende.bmp (or jpg, gif png i guess) which defines the color range for the topographic map, and the topographic input.

because the topographic input is quite big, just download the big tiff file from the link i gave, and cut out the map part, and save it as 24-bit bitmap.


Get the archive here: tigral.technicx.net/Topography2Heightmap.zip

I'm happy for any comments, and maybe code optimations, it takes quite long ...
And i know its not perfect yet, but i think its quite nice, of course you should edit the resulting raw file (f.e. blur it) to make it more usable.

#1
10/10/2005 (3:32 pm)
Btw. if someone does not know what a raw file it, i saved it as a 16-bit raw file, you can load it f.e. with photoshop and enter the width and height values, select 16 bit and IBM encoding (not mac).

i did this to use the raw file with TSE atlas terrain