INTRODUCING 3D TILES FOR GODOT

Brent Elmer

01 May 2025

Over the past several months, we’ve worked closely with the talented engineers at Cesium to bring the innovative capabilities of 3D Tiles to the Godot game engine - the premier open-source game engine on the planet.

At Battle Road, we reap the benefits of open-source software through technologies we love and use every day. Some of our favorites include Godot, Kubernetes, Nakama, and – of course – Cesium. That’s why we’re excited to be giving back. Over the past several months, we’ve worked closely with the talented engineers at Cesium to bring the innovative capabilities of 3D Tiles to the Godot game engine - the premier open-source game engine on the planet.

The 3D Tiles for Godot plugin joins the family of Cesium Native offerings already available for other 3D creation engines via Cesium for Unreal, Cesium for Unity, and Cesium for Omniverse.

What Is 3D Tiles?

3D Tiles is an open specification introduced by Cesium in 2015 to stream and visualize large-scale 3D geospatial datasets. It enables efficient transmission and rendering of diverse data types, including photogrammetry models, point clouds, and building information models (BIM), by organizing them into a spatial hierarchy of tiles. This structure allows for level-of-detail rendering, optimizing performance based on the viewer's perspective and distance.

In February 2019, the Open Geospatial Consortium (OGC) approved the 3D Tiles Specification 1.0 as an official Community Standard, accelerating its widespread adoption. Since then, 3D Tiles has become integral to applications requiring interactive visualization of extensive 3D datasets, such as urban planning, geospatial analysis, and virtual reality environments. Its adoption has been bolstered by its compatibility with web technologies and its ability to handle heterogeneous data sources.

More recently, in May 2023, Google announced the release of Photorealistic 3D Tiles through its Map Tiles API, aligning with the OGC's 3D Tiles standard. This development enabled developers to access Google's high-resolution 3D geospatial data using compatible renderers and visualization libraries, such as CesiumJS and Cesium Native.

3D Tiles and AtomEngine

At Battle Road, we develop AtomEngine - a simulation and modeling platform that recreates the world as a digital twin of Earth, allowing users to build and run detailed scenarios spanning a wide range of use cases such as disaster response planning, humanitarian aid, urban development, and infrastructure planning. AtomEngine allows users to zoom in from space all the way to street view seamlessly. Not only does the platform provide rich visualization, it also accurately simulates the physical characteristics of the real world. Serving up an accurate, interactive version of Earth is no small task and our mission regularly sees us bumping up against the limits of today's technologies.

In this journey, the 3D Tiles standard has been a welcome exception, offering substantial improvements in performance, flexibility, portability, and rapid evolution. Thanks to 3D Tiles, we're able to more easily represent a realistic mesh of the planet at every level-of-detail (LOD) - complete with all the bells and whistles game engine developers are used to. Out of the box, 3D Tiles provides physics-based collision, performant raycasting, vertex-level properties, and more.

Potential Applications

With 3D Tiles for Godot, developers can easily fetch, stream, and render vast amounts of geometry and texture data at a high level of visual fidelity in real time. This means players can explore their way through massive datasets (even hundreds of gigabytes) seamlessly. The 3D Tiles plugin renders real-world terrain at proper scale and detail as a WGS84 globe within Godot, allowing you to visit and interact with any location on Earth at its correct geospatial positioning. The plugin can stream a wide variety of geospatial content: high-resolution photogrammetry (entire cities and landscapes scanned from drones or aircraft), detailed 3D building models (such as Cesium OSM Buildings), textured meshes, and even massive point cloud datasets from LiDAR scans.

The geospatial content appears as ordinary Godot scene objects, which means you can interact with it using Godot’s normal systems (lighting, physics, collision, etc.) without special handling. For example, collisions and physics work on the terrain and buildings, and you can use Godot’s character controllers to walk on the streamed terrain or through a 3D city.

In addition, users who want to import their own data (e.g., custom scans, architectural projects files, etc.) can use Cesium’s powerful 3D Tiling Pipeline to generate 3D Tiles and get them running in Godot in no time.

In short, 3D Tiles for Godot blurs the boundary between games and digital twin applications in new and exciting ways. Imagine playing a traffic simulator set in New York City or leading search-and-rescue missions through zombie-infested London. We can’t wait to be inspired by the innovative applications you create.

Downtown Salt Lake City, Utah

Developer Diary

Integrating 3D Tiles into Godot was an exciting challenge that demanded deep research into the specification, data format, and broader 3D Tiles ecosystem. We focused on developing a solution that brought the standard into Godot while preserving performance and usability, aiming for seamless integration across both standard and custom Godot builds.

This section dives into the technical hurdles encountered and how they were tackled. Jump to the bottom for a guide on how to get started with your own projects!

Cesium Native

We owe much of the plugin's development to the Cesium Native library, which powers the existing implementations of Cesium for Unity, Cesium for Unreal, and Cesium for Omniverse. This library offers a standardized and adaptable way to fetch tiles and accurately place them in engine space. The architecture bridges the gap between the engine's specific code and Cesium's internal systems, making our work much smoother.

In addition, Cesium Native provides advanced tools that radically shorten the integration and customization time across various technologies. We used these tools to efficiently prepare and manage rendering resources and access and handle assets.

Key Goals for the Plugin

For the plugin to be widely adopted and useful, we established a set of core requirements:

  • Easy to integrate into standard Godot builds.
  • Custom build support for advanced use cases, such as double precision tilesets.
  • High performance, considering the large amounts of data involved.
  • Usability, ensuring developers can easily navigate available options via a dedicated Cesium panel.

Technical Challenges and Solutions

Official Builds vs Modified Engine Builds

Godot’s modular nature made it necessary to support both drag-and-drop installation using GDExtensions and modified engine builds using a core module.

  • GDExtensions: Allows easy integration by simply copying files into a project folder.
  • Modified Engine Builds: Provides more performance and direct access to engine internals.

Ensuring compatibility across both methods required conditional compilation, so we took advantage of the SCons build system's flexibility and implemented a compileTarget option that lets you quickly build the plugin as either an extension or a module.

Note that, for most developer use cases, we recommend building as an extension, as the process is simpler and more modular.

Godot Nodes System

Godot is a general-purpose engine with a mission to provide an easy-to-use data model and interface. For the development of this plugin, we were split between using the node system or working directly with the low-level RenderingServer interface. In the end, we chose to use the node system for its flexibility, ease of use, and development velocity. This decision required us to come up with solutions to connect Godot’s low-level systems with Cesium Native.

We needed full-featured tiles that offer both visuals and collision. In Godot, this meant we needed to add three nodes to the scene tree (MeshInstance3D, StaticBody3D, and CollisionShape3D). While the performance we achieved is good, it can be enhanced in the future by leveraging the low-level rendering and physics APIs directly. This would allow us to interface with Godot's scene tree through a single node.

Additionally, we faced challenges with nodes while working across multiple threads. While nodes provide tools for synchronizing operations to the main thread, in practice it proved tricky to get this right without introducing delays. In the end, we adopted an approach that instantiates tiles in batches and synchronizes them to the main thread with deferred calls.

HTTP Requests

For loading tiles, we found Godot's HTTP systems didn't meet our needs. Globe rendering demands a lot of network traffic to be processed efficiently, and Godot's systems fell behind when processing these requests. In the case of HTTP requests, the performance impact of dealing with nodes became a major bottleneck for the volume of requests we emitted. We evaluated the HTTPClient interface but found it costly and difficult to implement. We decided to use libcurl, which gave us great performance with an easy-to-use API.

After some iteration, we're proud to have achieved good performance with large datasets even while running a debug build of the plugin.

What’s Next?

Check out the open Issues list on GitHub for a sneak peek at where we’d like to take the project next. Who knows – you might even be inspired to pitch in! We’re excited to see how your use cases and feedback help shape the future roadmap.

###Getting Started Getting a project up and running with the plugin is simple. To begin, you’ll need a stable release of Godot 4.1 or newer. Next, either head to the asset library or directly visit our project's repository at https://github.com/Battle-Road-Labs/3D-Tiles-For-Godot and go to the Releases section to find the newest version of the plugin. Download the binaries and follow the README instructions starting from the Setting Up a Project section.

After importing everything to the project and signing into Cesium ion, you are ready to start adding and fetching your geospatial data and imagery! If you run into issues along the way, we invite you to open a GitHub issue from the repository or post to the Cesium community forum 3D Tiles Godot category.

Special Thanks to Cesium

We’d like to extend our sincere thanks to the Cesium Ecosystem Grants program for making this project possible. Their approach is a standout example of how grant programs should be run — fair, supportive, and creator focused. To learn more about this fantastic initiative or to submit your own ideas, visit the Cesium Ecosystem Grants page and click “Apply Now.”

SHARE THIS POST

Subscribe to Our Newsletter

Keep informed on our latest news, events, and announcements.

ADDRESS:

3597 E. Monarch Sky Ln

Suite 240

Meridian, ID 83646

CONTACT:

(208) 615-2203

© BATTLE ROAD 2024. ALL RIGHTS RESERVED.