17 April 2009

Real world data. (SRTM Heightmaps)

One of the major shortcomings with the draft environment was the reliance on approximate eyeballing for the terrain modelling. In a architecture where millimeter accuracy is king these kind of approximations are just fundamentally blasphemous, especially, when there are alternatives. Enter SandBox2s height mapping capability. first established in GIS applications and a well worn concept in other gaming engines, Sandbox2 allows you use a pixel per unit greyscale bitmap to act as the reference for height data. An accurate enough heightmap can produce pretty stunning results.

After searching the moding forums I came across two old threads and a link to another outside forum each detailing methods for creating accurate heightmaps. Originally I thought I would be creating one from the contours I generated in sketchup previously, however I found there was a much better way for achieving the same result.

4K1R4’s tutorial on CryMod (http://crymod.com/thread.php?threadid=17539) Shows the method of using Google Earth, Google Sketchup and 3Dem (a GIS modelling program) to create heightmaps. Unfortunately the video tutorial is no longer in existence and 4K1R4 is no long and active member and has not responded to my request to re-post the tutorial, but reading through the thread I was able to glean some insight into how the process worked.

From what I can gather the preliminary stages are similar to those for making a 1:1 texture map of your area. First you bring your area into SketchUp from Google Earth, place a 2048 x 2048 square around the data you wish to map. Then, placing that square back into Google Earth as a reference, you can find the real world co-ordinates for each corner of your site.

Once those co-ordinates have been found you can download SRTM data from a source and the create a greyscale BMP for the area you need.

The best workflow I found was on the Transport Tycoon forums where MGSteve has posted a pretty comprehensive tutorial (http://www.tt-forums.net/viewtopic.php?f=29&t=27052) of how you can use a google earth add on to quickly download data for the area you need rather than trawl through the cryptic ftp sites that usually host such data. This approach uses a program called MicroDem for the data manipulation and is the one I used for my tests.

This first image shows the google earth plugin in action, once you’ve found the data set you need, you can download it and open it in MicroDEM.

This image shows the data set loaded in MicroDem.

The resulting greyscale bitmap for the Hyde Park area.

And the results in our map.

Unfortunately after several attempts, I am still unable to create a working heightmap, however I will keep trying some alternate methods.