---
title: "QGIS 3D map view: turn a DEM into 3D terrain"
description: "Make 3D terrain from a DEM in QGIS with no plugins: set the project terrain, open a 3D map view, exaggerate the relief and export it. Tested in QGIS 3.40."
url: https://www.technicalgis.com/tutorials/qgis-3d-map-view-dem/
author: Sean Blaney (https://www.technicalgis.com/about/#sean-blaney)
publisher: TechnicalGIS (https://www.technicalgis.com/about/)
published: 2026-11-24
updated: 2026-11-24
language: en-GB
---

# QGIS 3D map view: turn a DEM into 3D terrain

> Make 3D terrain from a DEM in QGIS with no plugins: set the project terrain, open a 3D map view, exaggerate the relief and export it. Tested in QGIS 3.40.

- Level: Beginner
- Tested with: Python 3.12
- Source code: [Download scripts](https://www.technicalgis.com/code/qgis-3d-map-view-dem/)

## Key takeaways

1.  QGIS can show any DEM in 3D with no plugins. Set the DEM as the project terrain under Project › Properties › Elevation, then open View › 3D Map Views › New 3D Map View.
2.  Reproject the DEM to a projected CRS in metres first. Our Copernicus tiles came in latitude and longitude; we warped them to British National Grid at 25 m.
3.  The 3D view drapes your 2D map over the terrain, so style the DEM first. A colour ramp with a hillshade set to Multiply on top looks far better than greyscale.
4.  A vertical scale of 1.5 makes hills read clearly without turning them into spikes. A tile resolution of 64 px and a skirt height of 60 removed the blocky edges and hairline cracks we saw at the defaults.
5.  Save as Image gives a screen-sized picture; Export 3D Scene writes an OBJ model; a 3D Map item in a print layout gives a high-resolution image at a camera angle you can set exactly.

## Before you start

-   QGIS 3.34 or later (tested with QGIS 3.40.12 LTR)
-   A DEM, or an internet connection to cut one from the free Copernicus DEM
-   For the optional script: the Python that ships with QGIS

**Short answer:** QGIS turns a DEM into 3D terrain with no plugins. Make sure the DEM is in a projected CRS in metres, set it as the terrain under **Project › Properties › Elevation**, then choose **View › 3D Map Views › New 3D Map View**. Raise the **Vertical scale** to about 1.5 in the view’s configuration, tilt with **Shift + drag**, and export with **Save as Image** or **Export 3D Scene**.

This tutorial builds a 3D model of the northern Lake District around Keswick, from the free Copernicus 30 m DEM: Skiddaw and Blencathra to the north, Derwentwater and Borrowdale in the middle, and the Helvellyn ridge above Thirlmere to the east. Every step was run in QGIS 3.40.12 LTR, and every picture on this page came out of that run. If you’d rather script it, the same workflow is in [`qgis_3d_dem.py`](https://www.technicalgis.com/code/qgis-3d-map-view-dem/).

![A QGIS 3D map view of Skiddaw and Blencathra seen from the south, with green valley floors, brown fell sides and pale summits, built from the Copernicus 30 m DEM.](https://www.technicalgis.com/_astro/07-qgis-3d-skiddaw-blencathra-from-south.CW-dqshP_ZVkrib.webp)

_Skiddaw (left) and Blencathra (right) from above Keswick, looking north. QGIS 3.40.12 3D map view, vertical scale 1.5. Copernicus DEM GLO-30: © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018, provided under COPERNICUS by the European Union and ESA._

## What you need

-   **QGIS 3.34 or later.** The 3D map view is built in; you don’t need a plugin.
-   **A DEM.** Any single-band elevation raster works: a national LiDAR DTM, SRTM, or the Copernicus DEM. Our [LiDAR and elevation atlas](https://www.technicalgis.com/lidar-elevation-atlas/) lists the free sources for every country; for Britain, the [United Kingdom page](https://www.technicalgis.com/lidar-elevation-atlas/united-kingdom/) covers the 1 m and 2 m LiDAR from England, Scotland, Wales and Northern Ireland.
-   **A projected CRS in metres.** The 3D view measures distances and heights in the same units. A DEM in latitude and longitude has heights in metres but positions in degrees, so the terrain comes out squashed into a thin sliver or stretched into needles. Reproject first.

We used two 1° tiles of the Copernicus DEM GLO-30, N54 W004 and N54 W003, because our window straddles 3° west. The Copernicus DEM is free for any use, including commercial, as long as you show the credit in the captions on this page.

## Step 1: Reproject the DEM to metres

1.  Add your DEM tile or tiles to QGIS. If you have more than one, merge them with **Raster › Miscellaneous › Merge…**, or build a virtual raster with **Raster › Miscellaneous › Build Virtual Raster…**.
2.  Open **Raster › Projections › Warp (Reproject)…**.
3.  Set **Target CRS** to a projected CRS for your area. We used **EPSG:27700 – British National Grid**. Elsewhere, pick the UTM zone your area falls in.
4.  Set **Resampling method** to **Cubic** so the reprojected surface stays smooth, and **Output file resolution** to 25. Copernicus cells are about 30 m by 18 m at this latitude, so 25 m keeps the detail without inventing any.
5.  Under **Advanced Parameters**, use **Georeferenced extents** to clip to your area. Ours was 318000, 344000, 510000, 534000 \[EPSG:27700\], a window 26 km wide and 24 km tall.
6.  Click **Run**.

Our result was 1,040 by 960 cells. Heights ran from 63 m by Bassenthwaite Lake to 946 m on Helvellyn. The real summit is 950 m; a 25 m cell averages the ground across the top, so it sits a few metres lower. Skiddaw’s highest cell is 928 m and Keswick sits at 91 m.

## Step 2: Style the DEM, because the 3D view drapes your 2D map

The 3D view takes its shape from the terrain and its colours from your 2D map. A plain greyscale DEM gives you grey 3D terrain, so spend two minutes on the style first.

1.  Right-click the DEM › **Properties** › **Symbology**. Choose **Singleband pseudocolor**, set **Min** and **Max** to your height range, and pick a colour ramp. We made a simple hypsometric ramp: green on the valley floors, tan and brown on the fell sides, pale grey on the tops.
2.  Make a hillshade with **Raster › Analysis › Hillshade…** (Z factor 1, azimuth 315°, vertical angle 40°).
3.  Put the hillshade above the DEM in the Layers panel. In its **Symbology**, open **Layer Rendering**, set **Blending mode** to **Multiply** and **Opacity** to about 55%.

![QGIS 3.40 with the Layers panel listing Hillshade above Copernicus GLO-30 DEM (25 m), and the map showing the northern Lake District in green, tan and brown with hillshading: Bassenthwaite and Derwentwater in the valley on the left, Skiddaw and Blencathra at the top and the Helvellyn ridge at the bottom right.](https://www.technicalgis.com/_astro/01-qgis-keswick-dem-2d.B6ynK_In_wvDNm.webp)

_The 2D map that the 3D view will drape over the terrain: the DEM with a hypsometric colour ramp and a hillshade multiplied on top, in British National Grid._

## Step 3: Set the DEM as the project terrain

1.  Open **Project › Properties…** and choose the **Elevation** page.
2.  Under **Terrain**, set **Type** to **DEM (Raster Layer)** and **DEM layer** to your reprojected DEM.
3.  Leave **Vertical scale** at 1.00 and **Offset** at 0.00 here; it’s easier to change them in the 3D view, where you can see the effect.
4.  Click **OK**.

![The QGIS Project Properties dialogue on the Elevation page, with the Terrain section set to Type DEM (Raster Layer), DEM layer Copernicus GLO-30 DEM (25 m), Vertical scale 1.00 and Offset 0.00.](https://www.technicalgis.com/_astro/02-qgis-project-properties-terrain.KgQO4BGV_Z2srw9j.webp)

_Project › Properties › Elevation in QGIS 3.40. Older releases call this page Terrain; the settings are the same._

Every 3D map view in the project starts from this terrain. Saving the project saves it too, so next time you can go straight to Step 4.

## Step 4: Open a 3D map view

Choose **View › 3D Map Views › New 3D Map View**, or press **Ctrl+Alt+M**. A new panel opens, looking straight down on the same extent as your 2D map. Drag it out and maximise it if you want more room; the button at the right-hand end of its toolbar docks it back.

![The QGIS View menu open with 3D Map Views highlighted and its submenu showing New 3D Map View (Ctrl+Alt+M) and Manage 3D Map Views.](https://www.technicalgis.com/_astro/03-qgis-view-menu-new-3d-map-view.DL63PtEI_15i2Cm.webp)

_View › 3D Map Views › New 3D Map View. Manage 3D Map Views reopens, renames or duplicates views you've saved in the project._

## Step 5: Exaggerate the relief and smooth the terrain

At true scale, even the Lake District looks flatter on screen than it does from a fellside. Open the view’s **Options** menu (the spanner icon) › **Configure…** and choose the **Terrain** page:

| Setting | Default | We used | Why |
| --- | --- | --- | --- |
| Vertical scale | 1.00 | 1.50 | Makes the fells read clearly without turning them into spikes. Use 2–3 for gentle landscapes; keep 1.0 for any measurement or a “true scale” view. |
| Tile resolution | 16 px | 64 px | At 16 px the ridges looked blocky; 64 px followed the 25 m DEM closely. Try 128 px on a powerful graphics card. |
| Skirt height | 10 map units | 60 map units | At 10 we saw thin white cracks between tiles on steep slopes; 60 hid them. |
| Terrain Shading | Off | On | Lights the slopes from the scene’s light, so the shape still shows where the hillshade texture is faint. |

![The QGIS 3D Configuration dialogue on the Terrain page: Type DEM (Raster Layer), Elevation Copernicus GLO-30 DEM (25 m), Vertical scale 1.50, Tile resolution 64 px, Skirt height 60.0 map units, Offset 0.00, and Terrain Shading ticked.](https://www.technicalgis.com/_astro/04-qgis-3d-configure-terrain.COMXc-AJ_cBpDk.webp)

_The 3D Configuration dialogue with the settings from the table. Lights, Effects and Camera & Skybox are on the pages to the left._

Click **OK**. The terrain reloads in a few seconds, sharp tiles near the camera first and coarser ones in the distance.

## Step 6: Move around the 3D view

| To | Mouse | Keyboard |
| --- | --- | --- |
| Tilt the terrain | Shift + left-drag up or down, or middle-drag | Shift + Up/Down |
| Turn the terrain | Shift + left-drag left or right, or middle-drag | Shift + Left/Right |
| Move the camera | Left-drag (with Camera Control on) | Arrow keys |
| Zoom | Scroll wheel (Ctrl + scroll for small steps), or right-drag |  |
| Raise or lower the camera |  | Page Up / Page Down |
| Look around from where you are | Ctrl + left-drag | Ctrl + arrow keys |
| Start again | **Zoom Full** on the toolbar |  |

The **Toggle On-Screen Navigation** button adds a compass and arrows, which are handy on a trackpad. The **Camera** menu can synchronise the 2D and 3D views, so the 3D camera follows as you pan the 2D map, or the 2D map follows the 3D camera.

These three views were all made from the same project, with different camera positions:

![A wide 3D view of the northern Lake District from the south-west: the green vale of Keswick and Derwentwater in the foreground, Skiddaw and Blencathra behind, and the Helvellyn ridge and Thirlmere valley on the right.](https://www.technicalgis.com/_astro/05-qgis-3d-lake-district-from-south-west.QhgwGbOT_Z2cYhdh.webp)

_The whole 26 by 24 km model from the south-west. Derwentwater and the vale of Keswick are the green floor in the foreground; Thirlmere's valley runs up the right beneath the Helvellyn ridge._

![A 3D view from the north looking south down Derwentwater into Borrowdale, with the fells of Newlands on the right and the Helvellyn range in the distance on the left.](https://www.technicalgis.com/_astro/06-qgis-3d-derwentwater-borrowdale-from-north.DAJG4Wi3_ZDN8rN.webp)

_Looking south from above Keswick, down Derwentwater into Borrowdale. The flat green floor is the lake and its valley: the DEM has no water, so lakes show as level ground._

## Step 7: Export the 3D view

Everything is under the **Export** button on the 3D view’s toolbar:

-   **Save as Image…** saves exactly what’s on screen, at the panel’s size. Make the panel bigger before you save for a bigger picture.
-   **Export 3D Scene** writes the terrain, with its texture, as an OBJ model you can open in Blender, MeshLab or a web viewer. Set **Terrain resolution** and **Terrain texture resolution** higher than the defaults for a detailed model.
-   **Animations** (the play button) records a fly-through. Add keyframes at different camera positions, preview it, then **Export Animation Frames** and join the frames into a video with any video editor or ffmpeg.

For a high-resolution picture at an exact angle, use a print layout instead. Add a **3D Map** item with **Add Item › 3D Map**, click **Copy Settings from a 3D View…** in its properties, then set the camera’s centre, distance, pitch and heading by number. That’s how we made the images on this page: 320 by 180 mm at 150 dpi.

If you want a 3D print rather than a picture, see [Creating a 3D printed digital elevation model in QGIS](https://www.technicalgis.com/2022/08/13/creating-a-3d-printed-digital-elevation-model-in-qgis/) or the Python route in [From DEM to 3D-printable STL](https://www.technicalgis.com/tutorials/dem-to-stl-python/).

## The same workflow as a PyQGIS script

[`qgis_3d_dem.py`](https://www.technicalgis.com/code/qgis-3d-map-view-dem/) runs every step above with the Python that comes with QGIS, with nothing to install:

1.  It cuts the window from the two Copernicus tiles straight from the AWS Open Data bucket (without downloading the whole tiles) and warps it to British National Grid at 25 m.
2.  It makes the hillshade, styles both layers and sets the DEM as the project terrain.
3.  It renders the three views above through a print layout 3D Map item.
4.  It saves `keswick-3d.qgz`, ready to open in QGIS.

Run it from the OSGeo4W Shell, or on Windows with:

```bat
"C:\Program Files\QGIS 3.40.12\bin\python-qgis-ltr.bat" qgis_3d_dem.py
```

`Output`

```text
DEM: 1040 x 960 cells at 25 m, EPSG:27700, 63 m to 946 m (mean 357 m) in 1.4 s
lake-district-from-south-west: export result 0, 1889 x 1062 px, stable after 23 s
derwentwater-borrowdale-from-north: export result 0, 1889 x 1062 px, stable after 20 s
skiddaw-blencathra-from-south: export result 0, 1889 x 1062 px, stable after 22 s
Project saved: output\keswick-3d.qgz
```

Export result 0 means success. The 3D engine loads terrain tiles in the background, so the script keeps exporting each view until three exports in a row come out identical; that took about 20 seconds per view.

## Troubleshooting

-   **The terrain is flat.** Check that **Project › Properties › Elevation** has your DEM selected, not **Flat terrain**, and that the DEM’s heights are in metres. If the land rises a little but looks pancake-flat, raise the vertical scale.
-   **The terrain is a thin sliver or a field of spikes.** The DEM or the project is in latitude and longitude. Reproject the DEM to a projected CRS (Step 1) and set the project CRS to match, in the bottom-right corner of the QGIS window.
-   **Part of the terrain is missing.** Your DEM has no data there. Ours did at first: one Copernicus tile stops at exactly 3° west, which cut Helvellyn in half until we merged the neighbouring tile.
-   **Thin white or black lines between tiles.** Raise **Skirt height** in the 3D configuration.
-   **The terrain looks blocky.** Raise **Tile resolution**. 64 px suits a 25–30 m DEM; LiDAR at 1–2 m benefits from 128 px.
-   **The 3D view is black or empty.** Click **Zoom Full**. If it’s still empty, update your graphics driver: the 3D view needs OpenGL 3.3 or later.

## Frequently asked questions

### How do I convert a DEM to 3D in QGIS?

Set the DEM as the project terrain under **Project › Properties › Elevation › Terrain** (Type: DEM (Raster Layer)), then open **View › 3D Map Views › New 3D Map View**. No plugin is needed. Reproject the DEM to a CRS in metres first.

### Do I need a plugin to see 3D terrain in QGIS?

No. The 3D map view has been built into QGIS since version 3.0. Plugins such as Qgis2threejs add extras, such as exporting an interactive web page, but you don’t need them to view or export 3D terrain.

### How do I exaggerate the height in a QGIS 3D view?

Open the 3D view’s **Options › Configure…**, choose **Terrain** and raise **Vertical scale**. 1.5 suits mountains; gentle lowland terrain often needs 2 or 3.

### Why is my QGIS 3D terrain flat?

Usually because the terrain type is still **Flat terrain** in the project’s Elevation settings, or the DEM is in degrees rather than metres. Set the DEM as the terrain and reproject it to a projected CRS.

### Can I export a QGIS 3D view as a 3D model?

Yes. **Export › Export 3D Scene** in the 3D view writes an OBJ file with the terrain mesh and its texture, which opens in Blender and most 3D software. For a printable STL, see our [DEM to STL tutorial](https://www.technicalgis.com/tutorials/dem-to-stl-python/).

### Where can I download a free DEM?

The Copernicus DEM GLO-30 covers the whole world at about 30 m and is free for any use. Many countries publish finer LiDAR DEMs; our [LiDAR and elevation atlas](https://www.technicalgis.com/lidar-elevation-atlas/) lists them country by country.

## Related tutorials

-   [XYZ tile URLs for QGIS: 27 free basemaps](https://www.technicalgis.com/tutorials/xyz-tile-urls-qgis/): imagery and maps to drape over your terrain
-   [Creating a 3D printed digital elevation model in QGIS](https://www.technicalgis.com/2022/08/13/creating-a-3d-printed-digital-elevation-model-in-qgis/)
-   [From DEM to 3D-printable STL with Python and NumPy](https://www.technicalgis.com/tutorials/dem-to-stl-python/)
-   [3D terrain visualisation in Python with PyVista](https://www.technicalgis.com/tutorials/3d-terrain-visualisation-pyvista/): Helvellyn from LiDAR, Sentinel-2 and a GPX route
-   [Terrain analysis in Python with rasterio](https://www.technicalgis.com/tutorials/raster-terrain-analysis-rasterio/): slope, aspect and hillshade from a DEM

## Key terms

- **DEM**: Digital elevation model: a raster where each cell holds a ground height, here in metres above sea level.
- **Project terrain**: The elevation surface that every 3D map view in a QGIS project uses. Set it under Project › Properties › Elevation.
- **Vertical scale**: A multiplier on heights in the 3D view. 1.0 is true scale; 1.5 makes every hill half as tall again.
- **Tile resolution**: How many elevation samples QGIS uses across each terrain tile. Higher values give smoother, more detailed terrain and take more graphics memory.
- **Skirt height**: Short vertical walls QGIS adds around each terrain tile to hide thin cracks where neighbouring tiles meet.

## Data for this tutorial

-   [Copernicus DEM GLO-30 and GLO-90](https://www.technicalgis.com/data-sources/#src-copernicus-dem-glo-30-glo-90) · Free 30 m global DEM; free to use with the Copernicus credit
-   [LiDAR and elevation atlas: United Kingdom](https://www.technicalgis.com/lidar-elevation-atlas/united-kingdom/) · 1 m and 2 m LiDAR and national DEMs for England, Scotland, Wales and Northern Ireland
-   [LiDAR and elevation atlas](https://www.technicalgis.com/lidar-elevation-atlas/) · Where to download free DEMs for every country

Licences and formats for each source are listed in the [GIS data sources catalogue](https://www.technicalgis.com/data-sources/).

---

Source: https://www.technicalgis.com/tutorials/qgis-3d-map-view-dem/
