Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closest terrain tile detail level seems incorrect when camera pitch is too high #4703

Open
maxmueh opened this issue Sep 13, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request PR is more than welcomed Extra attention is needed terrain

Comments

@maxmueh
Copy link

maxmueh commented Sep 13, 2024

-->

maplibre-gl-js version: 4.5.2 and also in the maplibre 3d terrain example

browser: chrome

Steps to Trigger Behavior

  1. incline camera as much as possible
  2. fly slowly over a mountain top
  3. might need a few tries

Link to Demonstration

Reproducable in the 3d terrain example: https://maplibre.org/maplibre-gl-js/docs/examples/3d-terrain/

Expected Behavior

The closer you get, the higher the detail of the tile

Actual Behavior

While moving slowly over the peak of a mountain with an inclined camera, the closer you get, the higher gets the resolution of the tile.

When reaching the peak, a tile with a lower resolution is loaded though, instead of the highest resolution.

It seems that since the tile is 'under' the camera and not in camera direction, it is not recognized as being close.
This is also reproducable in regions without mountains, but the effect gets more obvious here.

maplibrebug.mp4
@HarelM
Copy link
Collaborator

HarelM commented Sep 13, 2024

I believe that level of details is calculated for the camera center and not for every part of the scene separately.
Feel free to dig into this, a PR would be welcomed!

@HarelM HarelM added bug Something isn't working enhancement New feature or request PR is more than welcomed Extra attention is needed terrain labels Sep 13, 2024
NathanMOlson added a commit to NathanMOlson/maplibre-gl-js that referenced this issue Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request PR is more than welcomed Extra attention is needed terrain
Projects
None yet
Development

No branches or pull requests

2 participants