Repository navigation
Extrusions: Do not try to triangulate non-polygon type features - #7685
Conversation
|
[v2] added fix to lint styleguide errors |
|
@greysail thanks for the contribution! Are you interested in trying to add a render test for this fix? If you are, the way to do this is:
|
|
[v3] added render test |
mourner
left a comment
There was a problem hiding this comment.
Should we put the check somewhere up the method chain? It might be confusing to have it this way down, inside a loop where non-polygon features will simply have all iterations skipped with continue.
|
Also, can we make the render test as small as possible (while still testing what we need)? Each new test impacts the running time of the test suite and the bigger the image, the longer it runs. |
|
I have reduced the render image size to 32x32. Below that, the overhead for setting up the render pipeline is probably bigger than the time for rendering itself. |
|
The rationale for putting the code into addFeature() in fill_extrusion_bucket.js is that it actually does not skip loops: Extrusions consist of two parts:
For polygon-type features, we want to generate geometry for both parts while for line-type features we only want to generate geometry for the vertical parts since they do not have a base area. If one were to move the logic for distinguishing between line-type and polygon-type features somewhere higher up, this would from my understanding mean having to split up addFeature() into two seperate routines (one for the base area and one for the vertical parts of the extrusion). |
|
[v4] rebase on master & squash commits for test case into a single patch |
|
Note: the render test actually fails on native, so please do not merge until this is fixed |
|
[v5]: fix test for native implementation |
Trying to triangulate the area of a feature without area (e.g. GeoJSON LineStrings) just creates invalid excess triangles, yielding visual artifacts fix lint styleguide error in previous commit
This test draws - a Polygon -> base are shall be rendered and - a MultiLineString -> base area shall not be rendered
…implementation For some reason, native cannot render on framebuffers with height less than 67 Pixel, hence we increase the framebuffer height to 128
|
[v6] rebase on master |
|
Thank you! |
* release-liquid: (84 commits) v0.54.0 (take two) (#8184) Fix disappearing controls in Safari 12+ (#8193) (#8194) [docs] token refactor in docs-page-shell (#8174) (#8181) v0.54.0-beta.2 (#8166) Bugfix - removeFeatureState fails with target.id === 0 (#8150) (#8164) update one more frame after canvas source paused (#8130) (#8163) move docs dependencies to dev (#8121) (#8129) v0.54.0 (#8115) CP removeFeatureState fix (#8090) v0.54.0-beta.1 (#8084) Allow setStyle diff by default with localIdeographFontFamily on (#8081) Upgrade various (mostly dev) deps, downgrade GL (#8078) Fix default marker positioning (#8074) Use @mapbox/gazetteer for benchmark coordinates (#8063) bump react-dom to v16.3.3 to fix minor vulnerability warning Fix and refactor the benchmark suite (#8066) Add max width for popups (#7906) Extrusions: Do not try to triangulate non-polygon type features (#7685) docs fixes after the merge limit flow max_workers and upgrade to v0.95.1 (#8061) ...
…ox#7685) * Extrusions: Do not try to triangulate non-polygon type features Trying to triangulate the area of a feature without area (e.g. GeoJSON LineStrings) just creates invalid excess triangles, yielding visual artifacts fix lint styleguide error in previous commit * Add test for rendering line-type extrusions This test draws - a Polygon -> base are shall be rendered and - a MultiLineString -> base area shall not be rendered * Add test for rendering line-type extrusions: make test run on native implementation For some reason, native cannot render on framebuffers with height less than 67 Pixel, hence we increase the framebuffer height to 128
…ox#7685) * Extrusions: Do not try to triangulate non-polygon type features Trying to triangulate the area of a feature without area (e.g. GeoJSON LineStrings) just creates invalid excess triangles, yielding visual artifacts fix lint styleguide error in previous commit * Add test for rendering line-type extrusions This test draws - a Polygon -> base are shall be rendered and - a MultiLineString -> base area shall not be rendered * Add test for rendering line-type extrusions: make test run on native implementation For some reason, native cannot render on framebuffers with height less than 67 Pixel, hence we increase the framebuffer height to 128
Trying to triangulate the base area of a feature without base area (e.g.
GeoJSON LineStrings) just creates invalid excess triangles,
yielding visual artifacts
There is an equivalent pull request for mapbox-gl-native, which I will post shortly
Launch Checklist
@mapbox/studioand/or@mapbox/maps-designif this PR includes style spec changes (none)