Saturday, March 06, 2021

Storks and Rockets

When Mapbox first announced the release of 3D terrain as part of Mapbox GL I briefly toyed with the idea of creating a 3D terrain map with a 3D model of a plane in order to create a very basic flight simulator. This flight simulator would combine the Mapbox demo maps Add a 3D Model and Add 3D Terrain to the Map to load a 3D model of a plane on top of a 3D terrain Mapbox map. 

Unfortunately I haven't had the time to work on this idea but I have been keeping an eye on the work of Pratik Yadev. Back in December Pratik released a 3D Map of the Golden Gate Bridge. This map of San Francisco displays a 3D model of the Golden Gate Bridge using the glTF file format for 3D scenes and models.


Two days age Pratik released a new map which animates a 3D model to recreate a Space X space launch. This cool interactive map shows a Space X rocket actually taking off and flying into orbit above the Earth. 

Two years ago Concept3D created a similar animated Mapbox map of a Space X launch (there is a screenshot of that map above but unfortunately the Concept3D map no longer seems to exist). Pratik's map doesn't use as many 3D models as the Concept3D map but his map does use the new 3D terrain options in Mapbox GL to create a more 'atmospheric' map. 

If you are impressed with Pratik's map then you might also enjoy Darren Wein's glTF playground. Darren's interactive map shows a large animated bird flying over San Francisco. The map includes a number of options which allow you to rotate the 3D model of the bird on the map and change the bird's size. The map also allows you to swap the 3D model of a stork to the model of a duck, horse or flying head.

glTF is a well used format for 3D models and there are plenty of freely available glTF files of 3D models on the internet. If you want to experiment with adding other 3D models to Mapbox GL then you really are spoiled for choice of freely available 3D models. For example try Sketchfab. If a Sketchfab model has a download button then you can download the model as a glTF file. You only then need to copy the code for the Add a 3D Model demo map and switch the glTF link to your own downloaded file.

If you want to follow Pratik's and Darren's future mapping experiments then you can follow them on Twitter, @PrtkYdv & @dkweins

No comments: