Writing for Hackaday isn’t all fun and games; occasionally I need to actually write posts and reply to emails from builders around the globe. Usually, though, I’m knee-deep in a personal project, or just hanging out playing a few video games. Recently I’ve gone off the deep end with Kerbal Space Program, an awesome little space flight simulator set in an alternate reality where everyone is just slightly incompetent.
As it turns out, there’s actually a lot of fairly technical objectives in this game, from performing orbital rendezvous to mapping the surface of another planet. It didn’t take long for me to go off the deep end and start mapping the Kerbal moon and turning it into a 3D object. Check out how I did this after the break.
Kerbal Space Program is a little indie space simulator where you manage your own space race. There’s no real object to the game; is a completely open sandbox where you build your own rockets, launch them into orbit, and hopefully make it to the moon. Think of it as a cartoony version of Orbiter and Eagle Lander 3D. To me, KSP is the perfect mix of the nerdtacular orbital dynamics, Hohmann transfers, and massive explosions.
There’s an amazing amount of user-contributed content for KSP. From 3D printed figurines to a bunch of additional rocket parts to an orbital laser, there’s a lot of fun to be had in this game. One of the most interesting add-ons I’ve found is [Innsewerants] satellite mapping module. The idea behind this mapping module is simple; just attach a radar dish to your spacecraft, launch it into orbit, and a .CSV file of altitude data is generated for celestial body you’re currently orbiting.
Here’s my satellite mapping probe orbiting Kerbal’s Mun
With the command-line tool included with the satellite mapping module, it’s very easy to generate topographical maps of the planets and moons in the Kerbal universe. Since these worlds are procedurally generated, it’s also the only way to do large-scale reconnaissance looking for flat landing areas. After parking my satellite mapping probe in a polar orbit around Kerbal’s Mun, all I had to do was sit back and let the data grow:
Yes, I cheated and put another probe at a 30° inclination to get more data from the mid-latitudes.
After a few days of watching my probe circle around the Mun, I had a fairly complete data set. Now, what to do with it? From the outset of my little topographical endeavor, I thought it would be cool to have a three-dimensional globe of this video game moon. I already had the tools to generate a greyscale height map; all I needed to do was make a 3D mesh out of this data.
I ended up using [William A. Adams]‘s BanateCAD. It’s a tiny little CAD package reminiscent of OpenSCAD. There’s also an example of applying a heightmap to a sphere, so making a Kerbal Mun 3D mesh is as simple as changing a few lines of code.
The result of several days’ data collection from munar orbit
I haven’t gotten around to printing my Munar globe just yet, but I did put the .STL up on Thingiverse, along with the large versions of the color and grayscale topomaps. The data in those heightmaps isn’t completely accurate; despite the data file being about 400 MB, there were still a few small patches without terrain data. I filled those in with a judicious use of the Photoshop ‘smudge’ tool.
I’m also thinking about recreating the fabulous National Geographic moon poster (shown below) using the data from my Kerbal Mun probe. In any event, it was a fun project and a fantastic way to keep from having to deal with the regular Hackaday rigmarole.