STL relief of a city: 3D printing and engraving from a heightmap

2026-08-116 min read
STLрельеф3D-печатьЧПУслайсерDEM

Making an STL relief of your own city is a clear goal: you want to hold the hills, the river valley and the slopes you walk every day — or to cut that surface on a CNC machine. Let's go through the whole path: where the relief comes from, how it turns into a mesh, which parameters decide everything, and what to check in the slicer before printing.

Relief and buildings are two different models

The first thing to separate. Relief is the surface of the ground: elevation changes, slopes, a river valley. It's built from a digital elevation model and knows nothing about the built environment. A city model is buildings extruded by floor count from OpenStreetMap data, standing on a flat base.

You can mix them in one print, but the result depends on the terrain: where a city's elevation range is only tens of metres, buildings at scale end up taller than the relief and swallow it. How the built environment itself is printed is covered in 3D printing city maps: export to STL.

Where the relief comes from

The basis is a global digital elevation model (DEM): a regular grid where each cell has a height. The service takes a window of that model over your area (Copernicus GLO-30, roughly 30 metre spacing) and turns each cell into a pair of triangles. The result is a continuous triangulated surface — exactly what gets saved into the STL.

Two practical consequences follow. First: detail is limited by the grid step — the model won't show an individual ditch or embankment. Second: the bigger the area, the more triangles, so over large territories the grid is thinned while keeping the overall shape of the relief. The mechanics in detail are in the 3D terrain model guide.

Vertical exaggeration: why flat land prints flat without it

The most important parameter. At true scale, an elevation range of a few hundred metres against tens of kilometres horizontally is barely visible: a lowland city prints as a flat slab and the model disappoints.

Vertical exaggeration multiplies the heights without touching the plan:

  1. Mountains and foothills — a factor of about 1, the true proportions are already expressive.
  2. Hilly terrain — 2–3.
  3. Plains, deltas, coastal cities — 3–5, otherwise the relief simply doesn't read.

This is a standard technique in physical models, not a cheat: the plan stays accurate, only the vertical grows.

Base, thickness and model integrity

You can't print a surface "film" — you need a closed (watertight) solid. The relief export gives exactly that film: an open ground surface with no floor and no side walls. Adding a base under it is a five-minute job in any 3D editor:

  • How to add it — in Blender, the Solidify modifier with a thickness in model units, then Apply; without Blender, Microsoft 3D Builder or Meshmixer turn a surface into a solid.
  • Base thickness — aim for 2–4 mm at final size. Thinner warps and is fragile; thicker just wastes plastic and time.
  • Overall size — 150–200 mm on the long side for a desktop FDM printer: a sensible trade-off between detail and print time.
  • Watertightness — once the base is there, the model must have no holes or flipped normals, otherwise the slicer will show artefacts.

Checking in the slicer before printing

  1. Open the STL in a slicer (Cura, PrusaSlicer, OrcaSlicer) and look at the actual bounding box: STL units are dimensionless, so the model sometimes arrives at the wrong scale — set the size you want by hand.
  2. Check integrity: slicers repair simple errors themselves, for complex ones use Meshmixer or Netfabb.
  3. Layer height 0.15–0.2 mm for PLA: fine relief simply disappears at 0.3 mm.
  4. Supports are usually unnecessary — the model has a flat base, and relief slopes are rarely overhanging.
  5. Print a 50×50 mm test piece before committing to an eight-hour job.

CNC and laser need different files

STL isn't the only route, and for machines it's often not the best one:

  • Height-based milling needs a greyscale heightmap where pixel brightness equals elevation. The elevation itself comes from HGT — a raw array of 16-bit integers over your area (Copernicus GLO-30), not an image. One GDAL command turns it into greyscale: gdal_translate -of PNG -ot UInt16 -scale 0 500 0 65535 N55E037.hgt height.png, where 0 and 500 are the real elevation range of the patch. CAM packages and "heightmap → relief" plugins read that raster happily. Don't confuse it with GeoTIFF, which here is a rendered OSM map as a georeferenced raster, not an elevation matrix. Where to get the data without a USGS account is in SRTM HGT and GeoTIFF.
  • Image engraving — use a hillshade: a ready image of slope shadows that a laser transfers as a raster. A walk-through is in the hillshade guide.
  • Layer cutting and contour engraving — DXF with contour lines: the relief is assembled from cut sheets of plywood or acrylic. See contours in DXF and DXF for laser cutting.

Easier — get a ready file straight away

There's no need to download DEM tiles, stitch them and triangulate a grid by hand. Select the area on osm2cdr.ru, choose the 3D terrain model with the STL subformat, set the vertical exaggeration — and get a finished mesh. If you need the built environment rather than the ground surface, take STL with buildings; a technical breakdown of the format is in the STL deep dive.

If you publish the model or a photo of the print, credit the elevation source with the exact line produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved — that wording is fixed by the licence.

In short

  • Relief is built from a DEM and contains no buildings; a buildings model is a separate export.
  • Without vertical exaggeration flat land prints flat: about 1 for mountains, 3–5 for plains.
  • The export is an open surface: add the 2–4 mm base yourself (Solidify in Blender, 3D Builder), keep the size at 150–200 mm, and check scale and integrity in the slicer.
  • For CNC take elevation as HGT and convert it to greyscale with gdal_translate; for a laser — a hillshade or DXF contours.
  • Elevation credit when publishing: produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.
← All articles