[QGIS-Developer] QGIS3D: Caching triangulation of terrain data

Martin Dobias wonder.sk at gmail.com
Sat Nov 4 01:49:30 PDT 2017


Hi Andreas

On Fri, Nov 3, 2017 at 5:28 PM, Andreas Neumann <a.neumann at carto.net> wrote:
>
> While exploring QGIS3D more, I noticed that my terrain is triangulated each
> time I load the project.
>
> I wonder if it wouldn't be better to store this triangulation along with the
> Geotiff storing the DEM, e.g. in a sidecar file. Terrain is pretty static.
> We only get updates of our LIDAR data every 5-10 years ... it doesn't make
> much sense to triangulate this data again and again.
>
> Is this something that could be improved in QGIS 3.2?

With terrain we actually do not do triangulation - we just take a
square 2D grid and elevate vertices according to the DEM - the
triangles are always fixed and so that is a cheap operation. If there
is anything that feels slow with terrain rendering, it may be either
fetching of blocks of raster data from DEM or rendering map images (to
be used as textures for terrain tiles).

I think we would need to do a bit of profiling of your project to see
what takes more time to avoid premature optimization. Anyway I was
thinking that it may be useful to add some Processing algorithms in
the future to support 3D rendering - to prepare data into formats that
are efficient and fast to access. For example, a DEM raster could be
processed into "quantized mesh tile" format that is used by Cesium
project.

Cheers
Martin


More information about the QGIS-Developer mailing list