Earlier this year, in collaboration with North Road we were awarded a grant from Cesium to introduce 3D tiles support in QGIS. The feature was developed successfully and shipped with QGIS 3.34.
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:
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:
Alternatively, you can add the service from your Browser Panel:
To test the feature, you can use the following 3D tiles service:
Name: 3D Tiles example
URL: https://pelican-public.s3.amazonaws.com/3dtiles/agi-hq/tileset.json
You can then add the map from the newly generated connection to QGIS:
By default, the layer is styled using texture, but you can change it to see the wireframe mesh behind the scene:
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:
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:
You can use the excellent Cesium ion plugin by North Road from the QGIS repository to add the data 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:
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.
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.
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:
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:
If you would like to see those features in QGIS and want to fund the efforts, do not hesitate to contact us.