Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Symbols canned up when switching between high and low zoom levels #12356

Closed
brunoabinader opened this issue Jul 10, 2018 · 6 comments
Closed
Labels
archived Archived because of inactivity bug Core The cross-platform C++ core, aka mbgl rendering

Comments

@brunoabinader
Copy link
Member

I noticed this behavior recently while switching from the demo route (E) and going back to world view (X) in our GLFW demo app:
screenshot from glyph-glitch ogv
From the image above, you can see all the symbols fading from a single point on the map. @ChrisLoer
I am assuming this as a side effect of #10436 - I'd like to propose that we establish a zoom range threshold for the fade transition to happen.

/cc @mapbox/gl-core

@brunoabinader brunoabinader added bug Core The cross-platform C++ core, aka mbgl rendering labels Jul 10, 2018
@ChrisLoer
Copy link
Contributor

This behavior was introduced with cross-tile symbol fading -- we were aware of it and decided it was OK:

#10468 (comment)

But if it's a problem, it shouldn't be too hard to address, I think we'd basically put some kind of "zoom delta cap" on the tiles that we hold onto in the "holdForFade" logic, so that maybe after you crossed three zoom levels out we just immediately made symbols disappear.

@ChrisLoer
Copy link
Contributor

@m-stephen if you're interested in taking a look at this, probably the easiest place to modify is right here in the TilePyramid logic:

if (tile.holdForFade()) {
// Since it was rendered in the last frame, we know we have it
// Don't mark the tile "Required" to avoid triggering a new network request
retainTileFn(tile, TileNecessity::Optional);
renderTiles.emplace_back(previouslyRenderedTile.first, tile);
rendered.emplace(previouslyRenderedTile.first);
}

If you look higher up in that logic, you'll see where we calculate the idealZoom for the transform state. I think the logic you want would be something like "hold for fade if the holdForFade() == true and the tile's zoom is within +/- 1 of the idealZoom". That way, for instance, if we're rendering at z12.4, we'll show z12 tiles but we'll also hold onto z13 or z11 tiles for fading. If we were holding onto a z13 tile while zooming out, we'd stop rendering the tile as soon as we crossed to z11.99. When you crossed from z12 to z11.99, the z13 tile would get discarded. If you crossed back to z12, it wouldn't start rendering again (you'd have to go all the way back to z13 to get it to show again).

I think we should try making the change and play around with it for a while to make sure it gives us a visual effect we like -- we might want to tweak the "how long to hold" parameters one way or another.

@stale stale bot added the archived Archived because of inactivity label Apr 10, 2019
@stale
Copy link

stale bot commented Apr 10, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Apr 10, 2019
@stale stale bot removed the archived Archived because of inactivity label Apr 11, 2019
@stale stale bot added the archived Archived because of inactivity label Oct 8, 2019
@stale
Copy link

stale bot commented Oct 8, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Oct 8, 2019
@kkaefer
Copy link
Contributor

kkaefer commented Oct 10, 2019

We've added something similar to GL JS recently: mapbox/mapbox-gl-js#8628

@kkaefer kkaefer reopened this Oct 10, 2019
@stale stale bot removed the archived Archived because of inactivity label Oct 10, 2019
@stale stale bot added the archived Archived because of inactivity label Apr 7, 2020
@stale
Copy link

stale bot commented Apr 7, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity bug Core The cross-platform C++ core, aka mbgl rendering
Projects
None yet
Development

No branches or pull requests

4 participants