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

3D: Strange shadows #49601

Open benoitdm-oslandia opened 2 years ago

benoitdm-oslandia commented 2 years ago

What is the bug or the crash?

When displaying shadows with a flat or dtm terrain, a strange big black appears and no shadows are displayed inside.

Here with a dtm: strange_shadow_dtm

Here without a dtm ie. all dtm layers are removed (only building layer remains), using a flat terrain: strange_shadow_wo_dtm

Also when this bug occurs, only a small scene part can have shadows: strange_shadow_partial_triangle

Here is a screencast: strange_shadow

Steps to reproduce the issue

Here is an example project: elevation_building_issue.zip elevation_building_issue_attachments.zip

dtm and building are from the test data folder (tests/testdata/3d/dtm.tif and tests/testdata/3d/buildings.shp).

Versions

Built from master source tree

Supported QGIS version

New profile

Additional context

No response

wonder-sk commented 2 years ago

Yeah in some cases the shadow rendering does not work well. Some of it may be bugs in the implementation, but more generally I think we need a different approach to shadow rendering (there are lots of different algorithms with different tradeoffs)