When QGIS revealed that they were going to add a 3D viewer I was sceptical. Rumours were going around about it being a bolt on functionality and not really being fully adopted, to be perfectly honest, I was put off before there was anything to look at. As screenshots started to appear from Lutra Consulting, the company behind the new 3D viewer, I started to get interested again…the screenshots I was seeing from the early development screenshots showed proper terrain and real 3D buildings.
In mid October there was a quiet little tweet from Lutra Consulting just simply saying
How could I refuse a little play? So this is what I posted on October the 18th, only a day after that initial post:
So, in true Dragons8mycat style, I’m going to show you through how to create the very same map.
- If you don’t already have OSGeo4W, download it from here – it includes lots of different open source software but most importantly the latest QGIS releases
- If you already have OSGEO4W and the 2.99 QGIS nightly build, skip to X, otherwise stick around to see how to get QGIS 3
- Convert your data to GEOPACKAGE…At current time of writing QGIS 3D prefers the multipolygon 3D multipatch. Don’t sweat it, this is easy to achieve, the example I made was from an ESRI multipatch shapefile.
If you have OGR2OGR, you can simply run something like this obvs change it for the relevant file format and use the LATEST OGR version:
ogr2ogr -f GPKG [NAME OF FILE WANTED].gpkg [FILE TO BE CONVERTED].shp -nlt multipolygon
- Turn on the 3D renderer – Make sure that the styling window is open (shown below) and click on the 3D cube symbol, check the “enable 3D renderer” box
- But what if you don’t? First of all, ensure that you are using a projected coordinate system and that you’ve checked the geopackage, I’ve found that these have been the main issues when things have gone wrong. If these aren’t to blame, then make sure your data isn’t too large, again, I found that rendering a 500mb file was hard going. If all that fails, try a different machine….these are early days and I’ve found that this renderer doesn’t like integrated graphics cards as much as it does the dedicated type, preferably a gaming card, though don’t let this put you off as it can be very hit & miss.