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:

output:

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.
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:

output:

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.
Torque Owner Artur Hallmann
i did this to use the raw file with TSE atlas terrain