Skip to content

Tile3DLayer: black gaps when switching viewport type (FirstPersonViewport ↔ WebMercatorViewport) #10066

@charlieforward9

Description

@charlieforward9
fpv-map-occlusion-bug.mov

Description

When transitioning from FirstPersonViewport back to WebMercatorViewport (crossing a zoom threshold in a unified view system), black/empty gaps appear in the rendered scene. Parts of the 3D tile surface go missing, revealing the black clear color underneath.

Reproduction

Using a custom View subclass that switches getViewportType() between FirstPersonViewport and WebMercatorViewport based on zoom level:

  1. Start in map mode (WebMercatorViewport) at zoom ~18 with Google 3D Photorealistic Tiles
  2. Scroll in past a zoom threshold to enter FirstPerson mode (FirstPersonViewport)
  3. Scroll back out past the threshold to re-enter map mode (WebMercatorViewport)
  4. Result: large black gaps appear in the tile rendering — sections of the 3D tileset are missing/culled

The gaps persist for several seconds until the LOD system catches up and re-fetches appropriate tiles for the new viewport.

Expected Behavior

Smooth transition with no visible gaps. Tiles from the previous viewport should remain visible while new tiles load.

Likely Cause

When the viewport type changes from FirstPersonViewport to WebMercatorViewport:

  • The frustum culling volume changes dramatically (FP has a narrow forward frustum, map has a top-down wide frustum)
  • Tiles that were loaded for the FP frustum get culled immediately
  • Replacement tiles for the new map frustum haven't loaded yet
  • Result: black gaps during the loading window

The Tile3DLayer / Tileset3D LOD traversal appears to discard tiles that fall outside the new frustum before replacements are available, violating the "best available" refinement strategy.

Environment

  • deck.gl 9.2.6
  • @loaders.gl/3d-tiles 4.3.4
  • Google 3D Photorealistic Tiles (tile.googleapis.com/v1/3dtiles/root.json)
  • Custom View with getViewportType() switching between FirstPersonViewport and WebMercatorViewport
  • _TerrainExtension enabled, operation: "terrain+draw"

Potential Mitigation

A refinementStrategy: "best-available" approach that retains parent/sibling tiles during viewport type transitions would prevent the gaps. Alternatively, the tile cache could be given a grace period before evicting tiles after a frustum change.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions