Heightmapping Japan

So I decided that carving out rivers and mountains in Unity’s terrain editor by hand would probably make me suicidal, and since Anabelle and Noreen have enough work to do, I figured I’d look for some heightmaps of Japan. Turns out that, once again, Google has all the answers.

Using Google Earth, a plugin called Ambiotek (direct download link), and a mapping tool called MicroDEM written by a Professor Peter Guth of the US Naval Academy’s Oceanography Department, I was able to extract a heightmap from Google Earth and import it into Unity. And I have to say…it totally kicks ass.

Here are two tutorials that outline the steps involved in pulling heightmaps out of Google Earth: one and two. The process is really easy.

Unfortunately, the area that our world will take place in is a pretty small piece of Hiroshima, and the resolution of the heightmap, while impressive, wasn’t high enough for the relatively small scale of our world. Initially, I cut out a 512×512 section of the heightmap and mapped it onto a 512×512 Unity terrain, which actually looked pretty good. However, this forced me to shrink our models down to a ridiculously and irritatingly small size. Additionally, even though the terrain looked great from far away, from our character’s point of view, the terrain was really jagged and blocky, especially around the riverbank.

Jaggies…ick!

Fixing the scale issue was easy — just increase the terrain dimensions. Fixing the jaggedness was a bit more complicated. In order to make the terrain look smoother from close up, I’d have to increase the resolution of the terrain itself, which is tied to the resolution of the heightmap.

I spent a couple hours scouring the corners of the internet for a higher resolution heightmap (aka Digital Elevation Model) of Japan, but to no avail. I decided instead to just try using Photoshop to increase the size of the image — that actually worked out better than I expected. Whatever interpolation algorithm Photoshop uses works really well. After decreasing the noise, I imported my new, higher-resolution heightmap into Unity.

She’s a beaut

Looks great! Except…

This ain’t Minecraft!

No problem…just run a smoothing brush over it. Five minutes of smoothing and voila!

 

One Response to “Heightmapping Japan