-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Experiment: don't fade in line labels showing for the first time #10460
Experiment: don't fade in line labels showing for the first time #10460
Conversation
- Background placement code now just generates static symbol buffers - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker. - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment) - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other. - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either). - Generate vertices for new debug collision boxes and collision circles - Only add symbols within tile boundaries (reduces work, avoids double-draw) - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
Brings gl-native shaping closer to gl-js.
- CollisionTile - FrameHistory - PlacementConfig
Add 'GridIndex' unit test.
…items but in a different order.
…atrix` being initialized during placement.
- Revert to 16x16 grid for FeatureIndex. - Indentation/dead code fixes - unordered_set<uint32> -> set<uint32>
`Tile` makes sure the symbols in the resulting tile are tileable while symbols in `Still` match rendering in `Continuous` mode.
Don't mark items that are outside the collision grid range as placed. Requires new ignore because GL JS issue #5654 allows insertion of symbols outside the CollisionIndex range, and those symbols can cascade in to affect items within the viewport.
Update ignore links to specific issues. Bump mapbox-gl-js version to get latest text-pitch-spacing test.
…ymbols into a separate function
… making renderTiles entirely public.
…iously outside the range of the CollisionIndex. Otherwise there's a weird mix on panning of some labels fading in vs. some popping in.
I think the behavior in master/this PR is superior to the current vanish + fade-in. As you mentioned, I think a crossfade behavior would also work. In the GIF you posted, I'm noticing that there are some frames that don't have any street labels (just neighborhood labels). It looks like there are some situations in which the new labels aren't ready yet, but we no longer show the old labels either. Master continues showing the old labels until it has new labels to display in that position. |
Yeah, on The current GL JS approach is a little different -- because it requires running a full/synchronous placement every time a tile is added to/removed from the tile pyramid, there's no gap in placement timing (although the fade animation is still an issue: but basically if we did the equivalent to this PR on GL JS, we could replicate |
There are two closely-related "flicker" situations for point labels:
|
1d8b170
to
89d27d8
Compare
PR #10468 is looking like a more promising approach. |
Reviewing PR #10436 called our attention to a way
master
s behavior might be superior. When you cross an integer zoom level, most line labels will move to slightly different positions, so they don't get detected as "duplicates" by theCrossTileSymbolIndex
. The old versions will immediately disappear and the new ones will fade in. Onmaster
, because there's no fading, and because placement happens before a tile is first loaded, the symbols never disappear, they just instantly shift location. The overall effect is thatviewport-collision
looks more flickery.One solution we've discussed is to hold onto the old symbols for a little while so we can do a cross-fade.
This PR experiments with a different approach -- try to replicate
master
s behavior by disabling fade animations for line labels that are being placed for the first time (e.g. they're part of a higher-res tile that just loaded). There are some kinks I would need to iron out, but after playing with it a little bit I think I'll probably abandon this approach. The problem is that even with the fade animation removed, there's still a gap between when a new tile first loads and when the next placement happens. Depending on how you hit the timing of placements, it can feel more or less flickery.master
behaviorviewport-collision
behaviorThis PR behavior
![proposed_faster_switch](https://user-images.githubusercontent.com/375121/32759074-6665ad2e-c89c-11e7-84d8-6c130fe600be.gif)
/cc @ansis @kkaefer @jfirebaugh @nickidlugash