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

Fix: #11516, #11041. Terrain: buildings on tile borders. #11530

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

astojilj
Copy link
Contributor

@astojilj astojilj commented Feb 18, 2022

Fix #11516: unecessary optimization approach disabled border intersection calculation for complex polygons: when enumerating polygon rings, if previous rings were outside aabb calculated so far would prevent check if edge crosses tile border and would, as a consequence, disable joining and displaying features split and asserting on check (in dev build).

Backporting fill extrusions on terrain #11041 fix from gl-native is related: when adjacent tiles are of different zooms, breaks or no building parts were visible.

Situation before this PR:

before.mov

After:

after.mov

Render tests:
Screenshot 2022-02-18 at 18 34 12

render-tests/fill-extrusion-terrain/flat-roof-over-border-of-different-zoom && zoomin removed from ignore list

Skipped changelog - cosmetic issue (missing building parts) that doesn't assert in production code.

Fixes: #11516, #11041

Launch Checklist

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
    - [ ] document any changes to public APIs
    - [ ] post benchmark scores
  • manually test the debug page
    - [ ] tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
    - [ ] tagged @mapbox/gl-native if this PR includes shader changes or needs a native port
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
    - [ ] add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog></changelog>

…tion calculation for complex polygons: when enumerating polygon rings, if previous rings were outside bookkeeped aabb would prevent checking if edge crosses tile border and disable joining and displaying features split and asserting on check (in dev build).

Backporting fill extrusions on terrain #11041 fix from gl-native is related: when adjacent tiles are of different zooms, breaks or no building parts were visible.

Fixes: #11516, #11041
@astojilj astojilj added bug 🐞 skip changelog Used for PRs that do not need a changelog entry labels Feb 18, 2022
@astojilj astojilj self-assigned this Feb 18, 2022
There is occasional flakiness on rendering fill color (zoom 16 evaluation is not seen on drape but zoom 15) and fill color is made constant to prevent it.
Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the port @astojilj, I compared both js and native and the fix looks good compared to the state of gl-native and good to merge to be on-par.

A separate issue should be captured for cases that aren't tied to low building footprints. I noticed some issues present in both js/native with regards to sometimes missing polygon at the edges of the viewport and polygons cutting through for large polygon spans:

gl-native

native.mp4

gl-js

Screen.Recording.2022-02-22.at.3.16.04.PM.mov

It's reproducible at location http://localhost:9966/debug/globe-fill-extrusion.html#2.17/36.04/-65.84 at a resolution of about w: 1440 by h: 740 by toggling terrain on/off.

@karimnaaji
Copy link
Contributor

Going ahead with merging as the main issues reported in #11516 are fixed with this PR.

@karimnaaji karimnaaji merged commit 3e64369 into main Mar 8, 2022
@karimnaaji karimnaaji deleted the astojilj-fix11516 branch March 8, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 skip changelog Used for PRs that do not need a changelog entry
Projects
None yet
2 participants