CesiumGS / CesiumGS/cesium

Terrain tiles

Open
#11,234 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Hi all
I have a problem with terrain tiles. Im using maptiler quantized mesh to get the terrain.
Here is the sandbox which will crash when you select a point on the map and try to zoom (in/out) or move the camera and ONLY in ortho mode.
Sandcastle example:
https://sandcastle.cesium.com/#c=fVNdb9owFP0rVp6CBA5fKSUDNgmpHRpV2Yr2FGkyySVxm9iZ7cDSiv8+Ox+Upt2ebF+fY99zfLzPWaAoZ0jxHySkhElkhxAJANlBLz7zlQCVC4aWIGme4juiYnzGnqGffHbyWcCZVOhA4QgCzRGDY0P7WdZs3wrK9ZIzRSgD4VtdcwvylQIhdGkj+IGGILxLdjVs3yLssjtfN5d4yLdipTLpOQ7JKE5JpmgCAgc8dcxMOvXxvd85YYo+Q9hLQcbO5yco5jffv0bT2527ih5Xt+ubaKK+PevGzPGnThdpaUZfIy8T/BFKzzY0eGoL3bR2teQ24Y34yiwsA2BgbmmDsQHc8RASLI9UBfGW3wsV80iQLKaBXXVWn0JTEoEo1qQAITEJw1VVOFt20ehW27LkXISUEQWyjTSPgrR1lEUPQQwpeE2rrYfCl6Cu8erSLNBmq0JbVJPLNYWyueoOhDIuqRHsnZ+bCN2RztcI7wVPm6xVaPSaVHvgYvd6PL0eTieT6dC96nTfY3rDIR6MB1euO5303avx6BXULyfNOuOUKQ+9NLu6Qv9A8qDD4qFhv0ad6pGGJnQl55dv1RGpRe6TYsvtSnoVbxTmglQaR90abHWtmVRFAovmxi80zbhQSCfaxlhHNs0S8zbOLtdRUDiQ5Ucz0JlzSZ2F9KA7mn/wvVCQECn1zj5PSi2+tZg5Gv+OmnDtGIvuDyASUhhYPFisqyLGeObo5cdMxXmyI+KfJ//nA9SMvw

**Actual error:**
![image](https://user-images.githubusercontent.com/122796886/232493278-201fc5af-f1c1-458a-aa2b-a860b9d29feb.png)

There is a problem with the maptiler api which can't give Cesium some tiles (you can see this error in the console). But the point on the map doesn't lie on any of them.

**Missing tiles:**
![image](https://user-images.githubusercontent.com/122796886/232493613-92214fdf-0801-4c09-98fa-00f3a7c155d2.png)

**Point is on another tile:**
![image](https://user-images.githubusercontent.com/122796886/232493797-a9a56cde-1936-4474-89bb-52a0b6b3c920.png)

If I change ```terrainProvider``` to:
```
terrainProvider: new Cesium.CesiumTerrainProvider({
url: "https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=FQHg9Gb5IgjIGLFg7tKz",
}),
```
(just added **-v2** after **...-mesh**) the problem with missing tiles is gone and Cesium does not crash.

So my questions:
- Why it does crash only in ORTHO mode?
- Why it does crash when I operate with the points in different tile (which is totally valid)?

Contributor guide

Open the contributing guide

Research direction

Open the linked Sandcastle example and reproduce the crash by selecting a point, then zooming or moving the camera in orthographic mode. Compare the configured terrainProvider URL with and without the -v2 suffix, and inspect the console and missing-tile behavior. Done means the valid point interaction no longer crashes despite unavailable terrain tiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.