-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Activating 3D terrain distorts 3D building parts #2513
Comments
Thanks for taking the time to report this. |
Each fill-extrusion object is elevated by the altitude at its centroid coordinate. The centroid is calculated in https://github.com/maplibre/maplibre-gl-js/blob/main/src/data/bucket/fill_extrusion_bucket.ts#L162 . So, if a building has several parts, the centroid should somehow the same value. May this can be a data-value, or an expression in style. I dont know, but i think the current maplibre tools/logic is not sufficient to fix this issue. |
Interesting, thanks for the valuable input @prozessor13! |
@prozessor13, |
I think the "ceilings" moving up because of terrain. the floors are moving down because of https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/fill_extrusion.vertex.glsl#L31. But you are right, here is a bug/problem: https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/fill_extrusion.vertex.glsl#L39 |
Fixes #2513 Fixes #2544 * Fix 3D building offsets in 3D Terrain mode * Rename variables for clarity * Fix `base_terrain3d_offfset` Code review comments: - Substract, rather than add, 10 meters from `height_terrain3d_offfset` - Spelling error in variable names * Keep build-dist result as an artifact * change build-dist result source location * Update CHANGELOG.md * Improve comments in the code Clarify the original intentions of the modified calculations * Apply the same changes to `fill_extrusion_pattern` * Add a test * Add dummy `expected.png` * Use properly-sized dummy expected * Use proper expected * Move test location below sea level * Increase delay for test results * Revert "Increase delay for test results" This reverts commit 5a06650. Wrong file was commited * Increase delay for test results * test workaround: reduce pitch * Increase delay for test results * test: temporarily disable other tests * test: temporarily disable more tests * test: temporarily disable more tests * test: Add debug, reset bearing and sleep * test: move debugging to workflows * test: try another place for `--debug` * test: use `wait`, add terrain tiles * test: another try * test: update expected, modify --debug * test: rename TerrainRGB tiles and use them * test: use untimed `wait` operation * tidy-up * Review comments
I'm planning to claim this bounty once the paper work is completed. |
I have submitted the following expense request on behalf of @zstadler: |
Thank you for submitting the request on my behalf |
Note: I Edited the description, updated screenshots, and removed no-longer-necessary references to openmaptiles/openmaptiles#1541
When Activating 3D Terrain, 3D building parts are enlarged and strange overlaps may occur:
Compare with the same location and viewpoint, with 3D Terrain inactive
maplibre-gl-js version:
2.4.0
browser:
Chrome 113.0.5672.93
Firefox 112.0.2
Steps to Trigger Behavior
Expected Behavior
The shapes and the relative positions of the 3D building parts should not change when 3D terrain is activated or deactivated.
Actual Behavior
See the above differences
The text was updated successfully, but these errors were encountered: