Finally, some terrain

I finally got some terrain rendering. Pictured above is the 7.5 minute data for hills just north of Corvallis.

The complete 7.5 minute quad is about 1.3M vertices ~= 2.7M faces. I know this is a lot, but I didn’t think that it would be too much for my graphics card to handle (Ti 4600). Apparently it is, because at full-resolution this scene only gets about 1.5fps. If I bump things down by sub-sampling the elevation data at every-other point I get about 8fps, and at every third sample (what you see above) I get about 30fps.

The data comes from USGS SDTS files. I finally bit the bullet and went with SDTS because a) it’s the new format (new as in after 1996) and b) it’s the only format you can get 7.5 minute data in for free. The USGS doesn’t have it on their site, but if you fight hard enough and create a fake registration account you can get it for free from mapmart.com.

I’m parsing the SDTS files using sdts++, an open source package from the USGS. Earlier I complained about sdts++, but after using it some more it ain’t so bad. Its one major downfall is its heavy reliance on RTTI and C++ exceptions. For debugging I just compiled it right into my program and ate the performance hit so that I could catch the exceptions. I need to figure out how to segment it into a library so I don’t need to have RTTI going in the main app.

Todo: I really want to get some orthoimagery and try and do an overlay. I think that would be badass. Real-time weather data and cloud rendering would be neat too.

Leave a Reply