qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.32k stars 2.97k forks source link

Raster to mesh #52313

Open saberraz opened 1 year ago

saberraz commented 1 year ago

Feature description

It would be good to have a native QGIS tool under processing to convert Raster to Mesh. See details here: https://lists.osgeo.org/pipermail/qgis-developer/2023-March/065630.html

Additional context

No response

kannes commented 1 year ago

As pointed out by Jean-Baptiste Peter in https://lists.osgeo.org/pipermail/qgis-developer/2023-March/065636.html, different algorithms can create vastly different triangles.

It would be great to have both a "dump" algorithm that simply meshes the terrain in lots of squares of two triangles each (like e.g. Qgis2threejs does it) and a one that creates triangles as actually needed to represent the raster's surface in a more natural way, building an optimal topology with fewer triangles.

Additionally, being able to define breaklines would be a very nice feature.

wonder-sk commented 1 year ago

It would be great to have both a "dump" algorithm that simply meshes the terrain in lots of squares of two triangles each

QGIS 3D internally does exactly that - from a DEM it creates squares of two triangles each, without any further optimizations.

The whole thing is maybe a bit more complicated - once we have a mesh, what are we going to do with it? If it is a large mesh from a big DEM raster, it is impractical to load it at once in a 3D view - it would take both a lot of GPU memory and the rendering would be slow. So in the end one would typically want to use some "level of detail" approach - using a tiling scheme like with XYZ tiles, to make it possible to show detailed mesh from close up and approximate mesh when looking from distance. But that also brings us to more complications :slightly_smiling_face: - e.g. how to make sure the mesh is always watertight (with no holes on edges), or how to store such tiled mesh data (e.g. 3D tiles?)

nyalldawson commented 1 year ago

Could https://github.com/OpenDroneMap/dem2mesh be of use here?

kannes commented 1 year ago

More potential candidates from my bookmarks:

Jean-Roc commented 1 year ago

I'm adding two others repositories of kyle baron