I suppose, most of you have certainly realized that the above amazing view of the Valles Marineres on Mars is actually a 'collage' of hires photographs rather than a Celestia texture...
Yet, let me illustrate below, where I stand with the MOLA 16bit/channel 16k sized normalmap attempts. These
are indeed Celestia screendumps. The main Mars texture is a 8k FLAT one from Mario/Space-Graphics.com. So any 3d detail you see is actually from the normal map!
With my somewhat oldish equipment, it was not entirely trivial to handle such big textures. Remember, I have 512MB of RAM and an old GeForce2 GTS/32MB card.
Perhaps some of you are interested, how one may arrive nevertheless at a 16k normalmap that is of very high quality. Below I summarize the commands, I used under Linux. An essential role was played by the ImageMagick command line utilities (5.4.7), that exist also for Windows! The great thing is that -- unlike Photoshop-7 or the standard GIMP -- they work perfectly for
16bit/channel and also, under Linux, collaborate with a STDIN/STDOUT pipeline. Hence these utilities are very practical together with Chris' recent 'nm16' 16bit/channel *.img -> 8bit normalmap converter code!
1) The highest resolution 64pix/degree MOLA Mars elevation data come in form of 4 tiles (11520x5760) in 16bit grayscale *.raw/*.img format:
megt00n000gb.img, megt00n180gb.img, megt90n000gb.img, megt90n180gb.img.
from
http://wufs.wustl.edu/missions/mgs/mola/megdr.html
2) after downloading, I seamlessly reassembled these 4 tiles into a huge 23k 16bit/channel elevation texture in *.img format by means of the very flexible ImageMagick utility 'convert', after renaming *.img -> *.gray. The trick was to do this in
console batch mode, such that no memory is vasted on the X-server etc.
2a) reassemble megt90n000gb.gray, megt90n180gb.gray left-to-right into a 23kx5.76k *.gray texture at 16bit/channel depth via
convert -depth 16 -size 11520x5760 megt90n000gb.gray megt90n180gb.gray +append upper.gray
2b) reassemble megt00n000gb.gray, megt00n180gb.gray left-to-right into a 23kx5.76k *.gray texture at 16bit/channel depth via
convert -depth 16 -size 11520x5760 megt00n000gb.gray megt00n180gb.gray +append lower.gray
3) reassemble upper.gray and lower.gray into a 23kx11k elevation texture top-to-bottom:
convert -depth 16 -size 23040x5760 upper.gray lower.gray -append Mola23k-16bit.gray
4) In principle one should now reduce the size to 16kx8k before converting the elevation map into a normal map. However, strong artefacts seem unavoidable this way. Hence I converted first to a 23k normal map with Chris' tool and
thereafter size reduced the result with the fancy Lanczos algorithm to 16kx8k!
This requires a
renormalization step at the end to retain a proper normalmap after resizing!. Before that, we must do a warped offset by width/2 in order to get the prime meridian into the center.
Here are the steps:
nm16 23040 11520 100.0 0 < Mola23k-16bit.gray | convert -resize 16384x8192 - Mola16k-8bit-nm16.bmp
Chris' conversion routine is applied and STDOUT piped again into ImageMagick's convert routine to do the resizing. The '-' sign in 'convert' indicates as usual that the input to 'convert' comes from STDIN.
Finally, the resulting normalmap is loaded into GIMP, the width/2 offset is done and at the end the GIMP-normalmap plugin does the renormalization of the map!
That's it! Now have a look at the result. You may compare with the above hires photo and judge yourself, how far we are still away from that quality with Celestia;-)
Since these steps take several
hours on my 1GHz PIII machine, I wrote all above commands into a shell script and went to a restaurant with my wife while things were working;-). Also note that the 23k *.bmp files are about 531MB and the 16K *.bmp is ~ 400MB!
The *.bmp files may then be converted with Pixel's 'bmp2dxt.exe' tool under Windows to 24bit DXT1c without using much RAM, or alternatively under Linux, with my own DevIL based tools ('texconvert')...
Bye Fridger