Hi,
I am currently working on a hybrid mapping application (MapLibre GL JS for 2D, CesiumJS for 3D) for a large-scale Villa & Resort project. Our goal is to maintain visual consistency when users switch between the 2D and 3D views.
Our Data & Setup:
-
We use custom Vector Tiles (MVT) served from our backend.
-
Our Mapbox style JSON is quite complex, utilizing
match,case, andinterpolateexpressions for base layers (roads, water, sidewalks, boundaries). -
We use custom Sprite atlases for POIs, trees, and labels.
-
In Cesium, we have 3D Terrain enabled.
The Problem: Initially, we wanted to reuse the MVT and Mapbox style directly in Cesium. We tried using cesium-vector-provider (which uses MapLibre under the hood to render to a canvas and drape it over Cesium as an ImageryProvider). However, this approach is not viable for our production environment due to several critical issues:
-
Performance Bottleneck: Running MapLibre in the background to rasterize vector tiles causes severe VRAM overhead and frame drops.
-
Distortion on Terrain: When draped over 3D terrain, text labels and POI icons get baked into the raster image. They stretch and distort along the slopes instead of behaving like proper Billboards facing the camera.
-
Texture Stretching: At low pitch angles, the draped imagery becomes blurry/pixelated unless we generate excessively high-resolution canvases.
Our Proposed Architecture (Seeking Validation): To solve this, we are considering completely decoupling the data pipeline for the 3D mode:
-
Base Map (Roads, Water, Grass): Move rasterization to the Server-Side. Use a tile server to consume our MVT + Style and serve standard XYZ Raster Tiles (
.png/.webp) to Cesium’sUrlTemplateImageryProvider. -
3D Buildings: Convert building footprints to 3D Tiles (
.b3dmor.glb) via our backend pipeline. -
POIs & Labels: Fetch POI data via a separate JSON/GeoJSON API. Load our sprite atlas (
sprite.png&sprite.json) and render them natively in Cesium usingBillboardCollection(imageSubRegion) andLabelCollectionso they orient correctly in 3D space.
My Questions:
-
Is this decoupled approach (Server-side raster for base + 3D Tiles + Native Billboards) considered the industry standard for this kind of Hybrid MVT/Cesium architecture?
-
Are there any recommended tools or pipelines for server-side rasterization that perfectly replicate Mapbox GL JS styling (especially complex expressions)?
-
Is there any native feature on the Cesium roadmap that will handle Mapbox Vector Tiles and their styling more elegantly in the future?
Any insights, advice, or alternative approaches would be greatly appreciated. Thank you!