Mapbox-gl-js: Terrain: holes in ground on negative elevation (cut on far clipping plane)

Created on 22 Jan 2021  路  4Comments  路  Source: mapbox/mapbox-gl-js

Reproducible:

Set terrain exaggeration to 5 in terrain-debug.html,
Navigate to http://localhost:9966/debug/terrain-debug.html#18.1/35.685084/139.768292/12.7
With no pitch hole is visible in ground - larger the exaggeration, larger is the hole.
For default exaggeration 1.0 there's no hole.

http://localhost:9966/debug/terrain-debug.html#18.1/35.685084/139.768292/12.7

https://user-images.githubusercontent.com/549216/105491103-75831a80-5cbe-11eb-9569-62c8f54dc01f.mov

3d bug

All 4 comments

Elevation at the point is around -20 meters (-4m read from DEM tile multiplied by exaggeration 5).

馃憢 One more location where I spotted this issue https://pratikyadav.github.io/maps/3d/#11.06/31.7289/35.5292

@rreusser I pushed the diff we were chatting about, it makes use of the minimum elevation seen through the DEM mipmaps and pushes the far plane forward to account for that: https://github.com/mapbox/mapbox-gl-js/commit/8b724c82363d877ac34425047beecf2c0a94ed2e. I haven't tested that change thoroughly, only in some of the locations known to be problematic.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muesliq picture muesliq  路  3Comments

aaronlidman picture aaronlidman  路  3Comments

rigoneri picture rigoneri  路  3Comments

iamdenny picture iamdenny  路  3Comments

stevage picture stevage  路  3Comments