My friend Rich — an experienced climber who has climbed Rainier, Hood and Denali — had an idea to make small desktop models of famous mountains. At the time, I thought “easy enough” and over the holiday break I decided to tackle this as a 3D printing project. This post is about some of the things I learned along the way, and a it’s a bit of a journey from “how hard could it be” to “easier said than done”.
Before starting, I want to say that there is probably an easier and quicker way to do all this, and if you’re reading this and have any tips or instructions, please let me know! That said, I spent a fair amount of time researching the options and what other people had done, and I didn’t find a method that would give the same results without requiring knowledge of some fairly advanced GIS (Geographic Information Systems) software. And even then, many of the GIS examples I researched weren’t aimed at 3D printing as the final output. Again, there is probably someone out there who has a good cookbook on how to do this… If you know it or find it, I invite you to share your input in the comments section.
The goals for this project were:
- Find a source for accurate, high resolution terrain data of Mount Rainier
- Bring that data in to Autodesk 3D Studio Max
- Using 3D Studio Max, create a small (about 6″ x 4″) terrain relief model of Mount Rainier
- 3D print the model
A main requirement for me was to start with terrain data at a high enough resolution to show detail and recognizable features (more on that later).
One of the most common sources and formats for terrain data is a Digital Elevation Model (DEM) file, which was developed by the United States Geological Survey (USGS). A single DEM file contains elevation data for a rectangular section of land, stored as height (elevation) information measured at each point on a grid spread out over the rectangle. The grid spacing is typically 90 meters or 30 meters, but some data is available at a 10 meter spacing.
30m and 90m DEM data is widely available on the internet, most of which came from the NASA Shuttle Radar Topography Mission in the year 2000, which digitally scanned most of the land masses on the planet. Higher resolution data often comes from LIDAR scans done from airplanes. In recent years, drones and UAVs have been used to scan terrain at resolutions measured in inches. However, high resolution data is often scanned for a specific use or study and is limited to a local region. Almost all of the data online that you’ll find will be 30m or 90m data.
If you start poking around on the internet looking for DEM data files and information on how to 3D print them, you will quickly run into a lot of information and references that come from the Geographic Information Systems (GIS) world. People working in GIS create, manage, analyze and visualize all kinds of data about our physical world including terrain, roads, vegetation, drainage, and land usage. There are many professional software packages used in GIS, some of which are open source or publicly available.
Looking around for usable DEM data is when you’ll likely first bump in to the “easier said than done” syndrome. For example, both of these sites
seem to offer straightforward solutions for making 3D prints from DEM data. “It’s Surprisingly Easy” says the first. However, both posts quickly get in to using fairly complex software like Netfabb, MeshMixer, QGIS and Open Topology. Software like AccuTrans3D and MicroDEM are also called out. Some of these are commercial (and expensive) software packages, while others are open source academic tools (and perhaps not the most user friendly). While I enjoy learning new software, it was not practical for me to take the time to learn two or three new software packages or become an expert in topics like Python scripting inside GDAL. (For what it’s worth, casually suggesting that someone use Netfabb software is a bit like saying, “Just use your personal Caterpillar 966M Wheel Loader to move that dirt pile in your backyard.” It’s fairly industrial power software.)
So I decided that I would do all my work inside Autodesk 3D Studio Max, a program that I know fairly well and is capable of importing DEM files.
I downloaded several software packages and plugins to see how they worked, what resolution they could output, and whether they could output files suitable for 3D printing. One of the tools I came across, Terrain2STL, is a fantastic, free, easy to use online tool that produces STL format files that are ready to print. It’s well designed and very straightforward to use. The only drawback is that it uses 90 meter data, which is lower resolution than I wanted for this project. However, for someone wanting a quick and hassle-free source of terrain data instantly converted in to files that can be 3D printed, I can’t imagine a better site.
Let’s take a look at what we can get for Mount Rainier using Terrain2STL. Using a familiar Google Maps interface, we pan and zoom on the map until we find Mount Rainier. Then we click “Generate Model”:
It takes a couple seconds to generate the model, and then we click “Download” and get a ZIP file with an STL file that can be sent to a 3D printer. This is what the STL file output for the red box selected above looks like:
It kinda, sorta looks like the peak of Mount Rainier. The bottom is south and you can kind of make out the summit with the crater in the center, Liberty Cap in the upper left and Point Success below the summit, but it’s all a bit blobby. That’s the problem with 90 meter data… It’s not quite high enough resolution. Another drawback with Terrain2STL is that the area you can capture and convert is fairly small. For something like Mount Rainier, you need to show more of the mountain to make it recognizable.
There is also a plugin for 3D Studio Max that I think accesses the same 90m data source. You can find it here:
I tried it out and got similar results to what Terrain2STL produces. One advantage of the plugin is that you can select larger areas to capture, but the user interface is more technical and you have to enter latitude and longitude coordinates instead of using an easy map interface.
Terrain2STL is really well done free, online software, and for anyone wanting to try this out, it is hands down where I would recommend starting. But the goal of this project was something higher resolution, so off we go in search of 10 meter data for Mount Rainier.
Mount Rainier DEM Data
After some poking around on the internet, and bumping in to various academic research papers on this topic, I found 10 meter data for Mount Rainier here:
This particular data set was created by digitizing traditional topographic maps and is broken down in to “quads”. You can see that Mount Rainier is in the upper left corner of this Yakima area, and I picked the four quads surrounding the summit to use as my data.
Once I had the four files downloaded, I opened one of them in 3D Studio Max:
The first thing I noticed is that the files are big: Each quad contained about 2.6 million triangles. Next I noticed a lot of extra data: big patches of random triangles, triangles spanning certain points for no reason, etc. DEM files can vary, and I have an older 2014 version of Max, so it’s not clear what was causing the “pollution” in the file, but the models looked cluttered and ugly when first opened.The screen grab below shows the issues as they looked in Max:
It took me about 20 minutes per file to study the file and select and remove the data that was clearly erroneous. All four quads brought in to one scene resulted in over 10 million triangles, which is a lot (more on that coming up), but they came together as a glorious 3D version of Mount Rainier and the surrounding area:
This is what I was after! In this data set, we are looking from the east to the west, with north in the upper right corner, and you can see peaks like Little Tahoma (center, in front of the summit) and clearly make out the crater at the top. Here is a top down view (north at the top), with the quads shaded so you can see the extent of each:
(You may notice that the quads are not lined up perfectly vertical. One thing I learned during this project is that mapping data comes in all kinds of orientations and in all kinds of projections. North isn’t always straight up, projections aren’t always flat and there are many different ways that people divide up land in to a grid.)
Now that I had this beautiful, high resolution model inside 3D Studio Max, the next step was to get the 3D model sized and massaged in to a format that could be 3D printed. I was pretty excited about how cool this 3D model of the mountain looked, and I knew it would make a great 3D print. At this point, I figured I was a couple hours away from uploading an STL file to Shapeways and ordering the 3D print. Turns out, not quite…
10 million triangles in one object is not particularly huge in this era of fast video cards, but yet it is a lot more than most 3D design software can handle fluidly. And the export function that saves a file in STL format was not going to be able to handle a dataset that big. The real problem, though, is that we need to scale the data down to an object about 6 inches across, and we need to clean up the edges and bottom so that we have a solid object for printing. With a smaller data set, this is easily done.
The problem I ran in to was that running “optimize” or “reduce” tools on 10 million triangles was crashing 3D Studio Max. When I was able to get an optimization tool to work, it was preserving the data on corners and edges, but the flat and broad areas became overly faceted and disjoint from the rest of the model. Most importantly, 3D printing requires a solid “shell” for printing, so I had to be able to close off the edges and bottom of the model. Many of the GIS and mapping software packages mentioned above have a large part of their functionality focused on data reduction for this very reason.
I needed a way to get the triangle count down to 1/10th or 1/100th of what I had, and that problem had me stuck for a day or so trying to figure it out.
3D Studio Max has a function where a grayscale image can be used to generate a height map (sometimes called a displacement map). This video does a good job of explaining how it works:
The useful thing about using a height map is that you can exactly control the size of the grid you want to use for your terrain. You can create a grid that is ten polygons by ten polygons or one that is 1,000 polygons across in each direction. This makes it easy to dial in the level of geometric 3D detail in the model and make sure it’s within limits for 3D printing.
So now the task was to convert my very high resolution model in to a height map that I could use to create a lower resolution model at any uniform grid spacing I wanted. I created a color map for the model where the lowest areas are black and the highest points are white. Viewed from the side, this is basically a color gradient that goes from bottom to top, black to white.
When viewed from the top, we have a height map, as shown in the upper left of the image below. The lowest areas of terrain are dark and the highest areas are white. To render out the height map I had to fiddle with the scene lighting and the render exposure to make sure that the full range from pure black to pure white was being captured, with no additional lighting coming from side shadows.
Using the “displacement map” tool in Max, I could create a grid and then use the grayscale image as a modifier to raise and lower each grid point. The image sequence below shows the results from top to bottom as the spacing on the grid increases, which creates more detail. The first grid is about 30 x 20, and the bottom one is about 1500 x 1000.
Another subtle advantage of using the height map to generate a grid is that the output is quads (four sided polygons) instead of triangles (found in the DEM file). For reasons I won’t get in to here, quads are more stable and easier to work with for these kinds of projects than triangles. The quads are also evenly spaced, so that no matter what grid resolution we pick, the resolution is the same across the whole model.
As a side note, I ran in to an interesting problem when I first applied the grayscale height map to the grid. The grid was full of small spikes and peaks that didn’t seem to have anything to do with the original DEM file or the grayscale image:
This had me stumped for a while, until I looked really closely at the grayscale image. The black-to-white gradient that I had used to color map the high resolution file had been made in Photoshop, and by default, Photoshop “dithers” a gradient, which means adding noise to help prevent banding.
It would be great to find an easy (and free) tool that could reduce the 10 million triangles in the DEM file data down to about a million quads for modeling and 3D printing, without creating irregular patches of differing resolution. Professional tools like Simplygon and Polytrans are certainly an option, but can also be expensive. (I have professional experience with Polytrans, and it is an amazing software package created by a team of people who are extreme experts on all kinds of CAD and 3D file formats and how to convert between them.)
After all that data wrangling and file management, this was the easy part! 🙂 Once I had a detailed quad mesh, I added edges, a bottom and some lettering along the side.
I saved this as an STL file and uploaded it to Shapeways.com. As I’ve talked about in some of my other posts, I am a big fan of using Shapeways as opposed to buying and maintaining my own printer. They have a wide range of options for materials, resolution and cost as well as great tools for checking your model before you buy a print. They are also always upgrading to the latest and greatest 3D printers and I’ve had good interactions with their customer service folks.
To capture the detail, I decided to print this model in acrylic “fine detail plastic” which can hold detail roughly equivalent to what you’d get in a plastic model airplane kit, down to about 0.3 to 0.5 millimeters.
It took a couple weeks for the print to show up and the print looked great in terms of detail. The part is slightly warped, and I think that is because the acrylic is really not meant to print big “slabs” of plastic. If I do this again, I would probably make the mountain relief a thin shell and design it to fit in to a base printed in nylon or ABS, which is better at holding shape in big pieces and a lot cheaper.
Pretty cool that features like the crater and river beds made it through the whole process from DEM file to height map to STL file to 3D print! In the pic below, you can see how the piece is a bit warped end to end like a canoe.
To finish off the painting, I used a satellite view of the area as a guide to paint the various major features like glaciers, rivers, high terrain, forest, snow and rock. Adding paint obscures detail so I was hesitant to get too involved with the painting. I used Tamiya acrylic model paints to do the painting.
Overall, the finished model looked like what I set out to make. My friend Rich, who had the initial idea, brought up the idea of focusing more on the actual peak and less on the surrounding landscape, and we also talked about exaggerating the vertical scale to make the mountain look more “peaky”. Most of the software involved along the way has a “vertical scale” setting that allows you to do this, and it’s common when making maps, globes and dioramas to exaggerate the vertical scale. But for this project, which ended up being about 1:100,000 scale, I wanted the proportions to be accurate.
Acrylic plastic offers the best detail for 3D printing, but the final model needs to be painted in order to see that detail. Shapeways offers the option to print files in color, so what if we could use an actual satellite photo to “color” the 3D model and then print that out?
The first step to creating a color 3D print is that we need a color map, or texture, to “drape” over the landscape. It would seem easy enough to just grab a view from Google Maps and cut it out to match the rectangle we’re using for our model. The problem is that there’s no easy way to match the location, the scale, the tilt and the projection between Google Maps and the DEM data file. This is a place where professional GIS software would be the most direct and useful route. However, even for GIS professionals, this isn’t totally straightforward, as the post below outlines.
“How to make overlays of topographical maps over DEMS” – http://www.terrainmap.com/rm14.html
The guy in the post above actually won a national prize for figuring this out! 🙂 Here’s another example of a thread on the topic:
“How can I visualize DEM terrain data with the corresponding realistic satellite image?” – https://www.researchgate.net/post/How_can_I_visualize_DEM_terrain_data_with_the_corresponding_realistic_satellite_image
What I ended up doing was grabbing an image from Google Maps that was roughly equal to the rectangle my model covered, and then rotating, scaling and warping the image in Photoshop to line up. Not precise, and fairly time consuming, but good enough for the goal of seeing what a color print would look like.
Here is the edited image — screen grabbed out of Google Maps — ready to be “draped” over the landscape:
In this render out of 3D Studio Max, you can see that the text from the Google Maps image is still legible. The “texture map” works out to be about 200 DPI on a 6″ x 4″ model, and 200 DPI is about what you get out of a laser printer or good magazine. My experience with color 3D printing is that you get about 50 DPI with sandstone.
Shapeways needs the file in VRML format for color prints, which is a somewhat outdated format, but it has the advantage of being an open format and a text file, which makes it easy to use and debug. (In the process of making this color print, I found a bug in the Shapeways VRML importer. The 3D Studio MAX VRML exporter can add text that is valid VRML format but the Shapeways importer doesn’t know how to handle, and in response generates really misleading error messages. To their credit, I had a great email exchange with a technical artist there and we found a workaround. Now they need to fix the bug!)
Here is the color print:
You can see that most of the text is blurred and not readable. If I were doing this again, I would paint out any text or turn it off in Google Maps. The detail in the glaciers and river beds really pops in the color print.
So how does the color print compare to the acrylic print? The color print is about a third of the cost, and the color looks really cool. The detail is not as crisp, but the material is more durable and not as brittle as acrylic, so it’s probably better suited for a desktop model. The color print is on the left and the painted acrylic print is on the right:
If I make another one of these (“production” instead of “prototype”) I would design for the color sandstone print, paint out any text in the Google Maps screen grab, add a base like the acrylic version has, and make the text on the side of the model bigger and easier to read. I would also probably exaggerate the vertical scale by 10% or 15% to make the features easier to read.
Scale models and dioramas of mountains and landscapes are fascinating because they give such great context about places that we can hike and explore at ground level. A tabletop model of Mount Saint Helens, for example, makes it immediately clear how the eruption unfolded and how the blast traveled over the landscape. (Maybe Mount Saint Helens should be the next project?)
On this project I learned:
1. How to find digital files containing terrain and elevation data and what results can be obtained with 90 meter, 30 meter and 10 meter DEM data.
2. There is a big world of professional and hobbyist GIS software out there if you’re interested in learning it, and that there are many different ways you could go about creating 3D prints from elevation data.
3. Great (free and online) tools like Terrain2STL give super fast and usable results for 3D printing if 90 meter resolution is enough.
4. What to expect when working with 10 meter DEM data in terms of file wrangling and data cleanup.
5. How to use a high resolution triangle mesh to create a grayscale height map and then use that to generate lower resolution uniform quad meshes that are better suited for modeling and 3D printing.
6. Shapeways “fine detail plastic” delivers fantastic detail, but using it for big, flat solid objects is not ideal.
7. How to create a 3D print in color sandstone.
If you have experience working with these kinds of files or have created 3D prints of mountains and landscape, I’d love to hear from you in the comments section. Thanks for reading! Now I just need to find 10 meter data for Mount Hood, Mount Saint Helens, Mount Baker…