mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

TileLoading / TileMesh-Generation causing visual glitches --> non necassary empty tiles

Open Markovicho opened this issue 3 years ago • 8 comments

We using the latest commit from performance branch:

Basic 2D Map is working really well and i see no bugs in terms of a critical issues or crashes at all. Nice work so far and we are pretty much looking forward to the refactored version of AbstractMap and VectorFeatures.

@brnkhy But we experience visual glitchtes while lerping between zoom-levels. Especially in some cases where the ZoomLevel changes to the next whole number (11.01 --> 10.99) seems to trigger the glitch based on the regeneration of the tilemesh-layout combined with tile-texture loading. Whats happening in the below video for a few milliseconds can be extrapolated to multiple seconds for RangeAroundCenter with large extents. By the way it does not matter which kind of TileProvider you're using (CameraBounds, RangeAroundCenter etc)

If it would be helpful to reproduce the issue i could create a little sampleproject including an animated zoomlevel-change which is causing the issue constistently. @brnkhy would that be helpful or is the issue easy to reproduce ? :-)

https://user-images.githubusercontent.com/11967926/151337757-e6d35d93-08fb-4e6b-be9a-97f3c1bb972b.mp4

Markovicho avatar Feb 03 '22 17:02 Markovicho

@Markovicho this is the torturous issue I have been struggling for months (in different branches/applications/ways etc). I can't remember latest on performance branch but I thought it was fixed there. I'll try to look into that soon. but tile management seems wrong in the code you are using. when that white background happens, you can see there are no tiles in the scene view. latest solution actually didn't dispose tiles until new ones are properly loaded 🤔

brnkhy avatar Feb 07 '22 15:02 brnkhy

I checked this quickly today turns out it's not the default behavior and branch normally acts as I thought it should (tiles filling in for each other etc). so this should be a bug, probably due to some sort of different settings (or a cache related issue). can you verify that @Markovicho ? does this disappearing tiles thing happens on test/demo scene by default for example?

brnkhy avatar Feb 08 '22 14:02 brnkhy

Hey @brnkhy

thx for taking your time so quickly regarding this issue. I will check out performance branch in a separate project and try to reproduce it.

Markovicho avatar Feb 08 '22 16:02 Markovicho

bad news @brnkhy

  • used Unity 2021.2.10 (on 2020 it's the same...)
  • created new unity project
  • checked out your latest commit on performance branch
  • no changes made at all
  • imported mapbox sdk folder and set up mapbox access token
  • Opened Zoomable Map Scene
  • cleared file cache
  • build target : Windows (doesn't matter)

Result:

It seems to work well for the first time i move up to zoomlevel 2. Moving back to 16 it seems to happen for every full integer zoom value oO (f.e happening around 0:20min) I saw you changed the exception print-out in CachingWebFileSource.cs. But the console looks still fine.

https://user-images.githubusercontent.com/11967926/153036265-a38b86c3-5cb8-4f88-a23d-1ae74c9b09fd.mp4

switched to Android and this what it looks like on phone:

https://user-images.githubusercontent.com/11967926/153039985-cff5649c-5b45-40bc-86bc-83f26ed4acc2.mp4

Markovicho avatar Feb 08 '22 17:02 Markovicho

@brnkhy any news on this one ?

Markovicho avatar Mar 16 '22 12:03 Markovicho

Hello: any resolution to this problem?

neoneper avatar May 01 '22 13:05 neoneper

@Markovicho @neoneper I haven't had a chance to look into it for that exact commit (branch) but I think it's working much better now. https://twitter.com/brnkhy/status/1518894938351669248 I'll try to share it with you all as soon as possible.

brnkhy avatar May 17 '22 09:05 brnkhy

Hello, where can i find the vector layer feature ? i would like to replace the raster tile with vector maps

SpadaccinoIgnorante avatar May 21 '24 13:05 SpadaccinoIgnorante