Nav:  [home][render][images][mars] > [tech]
 

Mars renderings: Some technical details

Converting raw MOLA data

In order to store the topogaphy data, grayscale PNG is the format of choice because it has fairly well lossless compression. PNG supports 16bit grayscale images which can be used to store the 16bit of the topography. However, as POVRay up to version 3.5 had limited 16bit support, I decided to use two 8bit grayscale PNGs instead.

Converting the data is pretty straightforward because it is in a very simple format. I wrote a little program which reads in the 16 tiles (which must therefore be present as bzip2 compressed files) and combines them into PNGs. It works line-by-line and hence does not allocate tons of memory. It also has some graphical output which draws a scaled-down version of the data being processed (primarily for control reasons).

The source code of this program can be downloaded below here. It has worked for me on my Linux box using GCC (version 3.2) as compiler.
Note the requirements mentioned in the below table: You need them all in order to compile this program (unless, of course, you patch the source code).

Source: topocv64.cc   [11kb C++ source]
Version:1.2   (2004-02-13)
Author:Wolfgang Wieser   (report bugs here)
License:GNU GPL (Version 2)
Requires:HLib (>=1.0.0), QTXlib, Qt-3.x, libz, libbz2, libpng

After compiling, try topocv64 --help.
Note: You may need to change the hard-coded tile file names in the source code to fit your needs.
Note: The above program will convert the 1/64° topography files. If you want to convert the 1/128°, you need to trivially patch one single line in the source code (and maybe change "64" into "128" in some strings).


[home] [site map] [Impressum] [Datenschutz/privacy policy]
Valid HTML 4.01!
Copyright © 2003-2005 by Wolfgang Wieser
Last modified: 2005-05-06 14:08:30