We’re excited to share that Mapzen is building open-source tools to use map data in Unity3D! You can try out Tangram Unity using Mapzen’s vector tile service and contribute your feedback and improvements.
Between Tangram and Tangram ES, you can already run Tangram maps on almost every current platform, but to date, Unity has been elusive. Games have a very different set of priorities when it comes to using maps.
For instance, a mapping application needs to cover scales ranging from a city block to the entire world, but a game environment usually only needs a fixed scale. Running within the Unity engine also imposes some new engineering constraints. Our current architecture relies on multithreading and access to low-level graphics APIs, both of which have limited availability in Unity.
To meet these challenges, we decided to start from scratch. Tangram Unity brings what we’ve learned from Tangram and Tangram ES to the Unity ecosystem.
Tangram Unity is a library of code and GUI tools for building a map using real-world data in your Unity game scenes. Choose an area of data to download, configure a set of filtering and styling options, and then press a big green button to build an entire region of GameObjects with meshes. You can do all of this from the Unity Editor using GUI tools, or hook up your own pipeline using the classes in the library.
For now Tangram Unity is primarily for building map data into your scenes in the editor, before you deploy your game. This lets you view and edit the scene before the game is running, so you can make sure it looks exactly right for your game. Looking forward, we’d also like to enable building map data at run-time so you can procedurally generate a scene for any location in the world. We’ve also experimented with elevation data and plan to incorporate a terrain option in the future.
There’s plenty you can do with the features in Tangram Unity right now. Our team put together a small game made in Unity both to help us develop the library and to play around with what’s possible using OpenStreetMap data. Naturally, the game is open-source so you can go and check out Super Map Ball for yourself!
This project is still young and growing! Want to try it out? Have ideas for other things the toolkit can do? Head to the Github repository to see examples, file issues, or submit your own changes.