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.38k stars 2.98k forks source link

[3D-tiles scene] Support Color-by-Height Symbology + allow DSM export #56070

Open jo-chemla opened 7 months ago

jo-chemla commented 7 months ago

Feature description

First of all, thanks for adding the ability to integrate OGC 3D-tiles scenes to the 2D or 3D Map views since 3.34, impressive feature! The textured mode is great, as is the EDL (Eye Dome Lighting from CloudCompare/Potree) mode in enhancing micro-details in the geometry.

On top of that, it would be great to allow the user to apply a color-by-altitude Symbology - the same way one can do it for any raster layer via single-band pseudo-color with min-max edition. Applying this style to the tileset in the 2D or 3D view, with EDL on top, can be very powerful in interacting with tilesets.

Moreover, adding the ability to export a DSM directly from the 3D-tiles tileset could be a very powerful feature. Using the Z reference of the 3D-tiles tileset if it exists or WGS84 ellipsoid height would be useful.

PS It does not seem possible to use the 3D view with the Wireframe symbology. This would allow a user to visualize 3D-tiles with a single color (white fill with no border for example) and apply only EDL to the tileset

Probably a feature request for Lutra who did the great integration @nyalldawson

Additional context

Load a Google 3D Tiles tileset, set the project properties footprint to that of a restricted area, enter the 3D-view which will always use Textured Mode.

jo-chemla commented 2 weeks ago

Parsing through the qgstiledscenechunkloader_p.cpp#L103, QgsTiledSceneChunkLoader::QgsTiledSceneChunkLoader points to QgsGltf3DUtils::gltfToEntity which relies itself on parseModel -> parseNode which calls Qt3DRender::QMaterial *material = parseMaterial( model, primitive.material, baseUri, errors ); here.

Could it be that this qgis material instance could be overridden by a custom material the same way the parseMaterial method calls defaultMaterial = new QgsMetalRoughMaterial;? But one would replace that material by a custom shader material with color-ramp indicating world-elevation. Or should it happen live, on rendering, parsing through the 3dtiles scene tree and aplying a custom material to all gltf tiles loaded? Would love some pointers here, and as always thanks a lot for all the amazing work around qgis!