Open qandeelabbassi opened 3 months ago
@qandeelabbassi Thanks. This issue is related to tile cover: internally, geojson is split into tiles, and when the underlying tile gets out of the viewport, each of the 3D model objects anchored to the positions on that tile is not rendered.
We will work on resolving this. Meanwhile, as a workaround, would it help to lower layer.maxZoom = 22, to e.g. layer.maxZoom = 5? Larger tiles (occupying larger geometry) would be less likely to get out of the viewport. The workaround would be problematic for a high zoom situations due to precision loss.
@astojilj, thanks for the quick response.
When the underlying tile gets out of the viewport, each of the 3D model objects anchored to the positions on that tile is not rendered.
But the models never get out of the viewport in the above video. My understanding of the viewport might be incorrect, so I would like to know what viewport you are referring to here.
Meanwhile, as a workaround, would it help to lower layer.maxZoom = 22, to e.g. layer.maxZoom = 5?
According to my understanding, decreasing the maxZoom would cause the model to disappear quickly or when we get closer to the model. Wouldn't this worsen the issue?
@qandeelabbassi My mistake here:
Meanwhile, as a workaround, would it help to lower layer.maxZoom = 22, to e.g. layer.maxZoom = 5?
According to my understanding, decreasing the maxZoom would cause the model to disappear quickly or when we get closer to the model. Wouldn't this worsen the issue?
I meant GeoJSONSource source's maxzoom.
But the models never get out of the viewport in the above video. My understanding of the viewport might be incorrect, so I would like to know what viewport you are referring to here.
Models don't, but the tile on the ground gets out of viewport. This we need to resolve but I hope that the workaround (lower maxzoom for source) would help on this meanwhile.
@astojilj, setting maxzoon on geojson source doesn't solve the issue. If i use 3D puck would it solve the problem?
3D puck should solve the issue, and could be used as a workaround until we fix this, since the underlying data is not tiled.
@astojilj using maxzoom=4
(or even 0) fixed the issue for now. Thanks a lot for the help!
@qandeelabbassi thanks, good to know that the workaround helped. We are working on a proper solution for this
@astojilj Although maxZoom solves the described issue, it causes the model to shift away from the center of the map. Any idea how I can fix this? I am willing to contribute if you can point me in the right direction
@qandeelcc if setting geojson source's "maxzoom" to 6, and "buffer" to 512, the effect on precision should be visible only after zoom 20.
With maxzoom set to 0, precision issue would be the worst, visible also on lower zooms. What value are you using for maxzoom: 4 or 0?
Environment
Observed behavior and steps to reproduce
ModelLayer disappears abruptly on panning when pitch is applied. Sometimes, initially, it doesn't even appear until I move the camera around
Code for adding model
Code for setting camera:
Video
https://github.com/mapbox/mapbox-maps-ios/assets/14296772/93b8176b-8cfc-4997-9f64-518aeea589fc
Expected behavior
The model shouldn't disappear