Exploring 3D options of MapBox v3

At August 8 2023 there was a Mapbox announcement about supporting 3D environments in an upcoming release v3, see the blog post https://www.mapbox.com/blog/standard-core-style

There is a live demo site, see https://labs.mapbox.com/labs-standard/#16.64/48.86137/2.290976/-20/62. It shows 3D Tiles models (glTF/b3dm) like the Eiffel Tower in Paris and 3D model trees (glTF models):

Exploring at bit further, there are 2 new data sources defined: ‘model’ (for glTF 2.0 models) and ‘batched-model’ (for 3D Tiles – b3dm). With these new data sources we can add our own (building) 3D models and instanced 3D models (like trees, benches, traffic lights) to the map.

I’ve created some samples that demonstrate how to use these new data sources.

One sample is demonstrating how to add a 3D glTF model to the map using GeoJSON. In this demo a new building placed on the Dam Square in Amsterdam, see https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/3dmodel/

image

The location of the building is defined in a GeoJSON file (building.geojson):

image

The glTF model (building.glb) is added in the ‘models’ section of style.json (see https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/3dmodel/style.json)

image

In the building layer the building source and model are combined:

image

This construction works on a small number of items, but doesn’t scale well for a lot of items (like trees of a country). Instead of using a GeoJSON data source we can also use a vector tiles data source.

For a demo of using vector tiles in combination with a ‘model’ data source see trees of Utrecht demo (https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/trees/#15.1/52.08999/5.12577/0/58).

image

In this case the location of the trees is defined in vector tiles (these are protocol buffer files), they are visualized using a tree.glb model:

image

Tree Layer:

image

The vector tiles are created by Tippecanoe, see https://bertt.wordpress.com/2023/01/06/creating-vector-pmtiles-with-tippecanoe/ for more information about this tool.

In a next blog I’ll explore  the new ‘batched-model’ data source for placing 3D models of buildings.

13 thoughts on “Exploring 3D options of MapBox v3

  1. very nice.
    What else is possible?
    i checked queryRenderedFeatures on click but this doesnt give me any features.

    would be filtering, dynamic coloring on feature properties possible?

    also in your example are only lod1 building, but i think lod2 should than also be possible?

  2. thanks.

    good point.

    i thought that mapboxGL will automatically place it on the terrain. I’m wrong?

    that means that also mapboxs landscapes objects will not automatically be placed on the terrain surface?
    hope boath, selection and placing on terrain will be supported in the near future.

  3. which tools you are using to create 3dtiles with b3dm? i dont think there are so much tools on the market for creation.

Leave a comment