It seems that GIS (Graphic Information Systems) are playing an increasingly important role in, well… everything these days. At some point, you might need to import GIS data into your 3D application. Let’s say you’re doing an architectural rendering, or a sight line study, or something, and you need to see how the terrain affects your site. So, the typical method of doing this is to ask your GIS person for a 3D model of the terrain, and then bring that into your 3D application, merge your models… and then deal with a bajillion polygons eating up all of your RAM, crashing your computer, and taking up many hours of rendering time.
Guess what? There’s an easier way. Almost any 3D application these days (Maya, Cinema 4D, 3DS Max, etc.) will support Displacement Maps. First of all, if you have GIS shape files (*.shx) you can view them in ArcGIS Explorer, which is a free download. This should give you some idea of what your terrain is supposed to look like.
At this point, most people ask their friendly GIS expert to export the terrain as some kind of 3D file, dxf, or possibly VRML, or fbx, resulting in a massively huge, lockup-inducing mesh of zillions of triangles and much frustration. There’s another way!
Instead, ask your friendly GIS expert to export a DEM file. What’s a DEM file? It’s simply a grayscale raster image that represents the terrain instead. And what are those useful for? That’s right, displacement maps! See, this is what our DEM file looks like:
Black represents the lowest points in the map. White represents the highest points. Now it’s a simple matter of placing one flat plane (it can be one polygon,) applying the dem file as a displacement map, setting your tiling and scale correctly, and you’ve replaced many, many triangles with one simple plane and a texture map. This image took a scant few seconds to render in Cinema 4D:
You can then ask your friendly GIS person what elevations are the lowest and highest in the map, set your displacement map accordingly, and *poof* everything is to scale. Remember that the GIS elevation is in feet above sea level! This is why you have to ask for relative heights instead of absolute.
In this case, I have asked for a few reference points from the GIS data. I have then eyeballed the locations on my ground plane in the XZ plane, then placed a cube and scooted it back and forth in the Y axis until it was sitting at the same height as the displaced terrain. Then I took a note of the Y position in feet.
It turns out it is not too far off. Of course, it’s not exact, and I did have to keep doing test renders over and over again to see where the placeholder cubes were, but it’s pretty close. And again, using this method, the test renders are lightning fast.
There are limitations with this, however. The displacement map typically won’t render in your working viewport, so you won’t get to see it until you render your project out.
So if your project requires very close work with the terrain (for example, showing a house sitting on a mountainside,) you’ll have to do things the old way, by importing 3D data directly. An alternate solution is to “bake” your displacement map into your geometry if your 3D package allows you to do so.