In this blog post, you can read more about how to work with this feature, where to get data and how to display your maps in 2D and 3D. For a video demo of this feature, you can watch Nyall Dawson’s presentation on Youtube.
3D tiles are a specification for streaming and rendering large-scale 3D geospatial datasets. They use a hierarchical structure to efficiently manage and display 3D content, optimising performance by dynamically loading appropriate levels of detail. This technology is widely used in urban planning, architecture, simulation, gaming, and virtual reality, providing a standardised and interoperable solution for visualising complex geographical data.
Examples of 3D tiles:
Data from Swisstopo (https://map.geo.admin.ch/)
Washington - 3D Surface Model (Vricon, Cesium)
To be able to use 3D tiles in QGIS, you need to have QGIS 3.34 or later. You can add a new connection to a 3D tile service from within the Data Source Manager under Scene:
Adding a new 3D tile service from Data Source Manager in QGIS
Alternatively, you can add the service from your Browser Panel:
3D tiles data provider in the Browser panel
To test the feature, you can use the following 3D tiles service:
Name: Bathurst URL: https://nsw.digitaltwin.terria.io/api/v0/data/bathurst-reality-mesh-2022-03-29/Scene/Cesium_Bathurst.json
Creating a new connection to a 3D tiles service
You can then add the map from the newly generated connection to QGIS:
Adding a new 3D tiles to QGIS
By default, the layer is styled using texture, but you can change it to see the wireframe mesh behind the scene:
3D tiles’ mesh wireframe
You can change the mesh fill and line symbols similar to the vector polygons. Alternatively, you can use texture colors. This will render each mesh element with the average value of the full texture. This is ideal when dealing with a large dataset and want to get a quick overview of the data:
3D tiles with texture color for meshes
To view the data in 3D, you can open a new 3D map. Similar to 2D map, by zooming in/out, finer resolution tiles will be fetched and displayed:
Cesium ion is a cloud-based platform for managing and streaming 3D geospatial data. It simplifies data management, visualisation, and sharing.
To add 3D tiles from Cesium ion, you need to first sign up to their service here: https://ion.cesium.com/tokens
Under Asset Depot, you will see a catalogue of publicly available datasets. You can also upload your own 3D models (such as OBJ or PLY), georeference them and get them converted to 3D tiles.
You can also add one of the existing tile service under https://ion.cesium.com/assetdepot and select the tile service and then click on Add to my assets:
Adding an existing dataset to your Cesium ion assets
You can use the excellent Cesium ion plugin by North Road from the QGIS repository to add the data to QGIS:
Adding Cesium ion assets to QGIS
In addition to accessing Google Photorealistic 3D tiles from Cesium ion, you can also add the tiles directly in QGIS. First you will need to follow the instructions below and obtain API keys for 3D tiles: https://developers.google.com/maps/documentation/tile/cloud-setup
During the registration process, you will be asked to add your credit card details. Currently (November 2023), they do not charge you for using the service.
Once you have obtained the API key, you can add Google tiles using the following connection details:
Adding Google Photorealistic tiles in QGIS
When dealing with large scenes, map extents should be set to a smaller area to be able to view it in 3D. This is the current limitation of QGIS 3D maps as it cannot handle scenes larger than 500 x 500 km.
To change the map extent, you can open Project Properties and under View Settings change the extent. In the example below, the map extent has been limited only to a part of London, so we can view Google Photorealistic tiles in the 3D map without rendering issues.
Limiting project extent in QGIS
3D tiles from Google in QGIS
If you are handling a large dataset, it is recommended to increase network cache size to 1 GB or more. The default value in QGIS is much lower and it results in slower rendering of the data.
Increasing Cache size in QGIS for faster rendering
When you try to overlay other data sets on top of a global 3D tiles, the vertical datum might not match and hence you will see the data in the wrong place in a 3D map. To fix the issue, you may need to use elevation offsetting to shift the data along the Z axis under Layer Properties:
Offsetting elevation of a layer in QGIS
This is the first implementation of the 3D tiles in QGIS. For the future, we would like to add more features for handling and creation of the 3D tiles. Our wishlist in no particular order is:
Styling of 3D tiles (image from https://cesium.com/learn/ion/stories-styling/)
If you would like to see those features in QGIS and want to fund the efforts, do not hesitate to contact us.