top of page

Streaming City-Scale Environments: Unity and Geopipe Part II

Updated: Feb 9, 2023

The real world is an increasingly important component of games, from small indie projects to huge AAA productions, of simulations for training humans and machines alike, and of visualizations and VR experiences.


As we discussed in our last blog post, putting the real world into a game or simulation today is expensive, time-consuming, and for many projects, prohibitive. It can take teams of environment artists years to design and refine a large world modeled from the real world, then fill it with enough detail to truly immerse a user in the environment - but what if putting reality in a game was even simpler than downloading an asset and dropping it into your favorite (or your own) game engine?

The advent of powerful, democratized game engines has opened up game development to teams of any size and have greatly shortened development timelines for larger teams. Similarly, Geopipe empowers any team to rapidly and cost-effectively set their game or simulation in a huge, complete environment – and for those who need it, an environment faithfully reproducing the real world.

New York City loaded in Unity with the Geopipe Unity SDK, looking north from near Geopipe's office towards Midtown.

From roots in putting the real world into specialized games like Minecraft, Geopipe now makes it possible to put realistic, detailed models into our customers own software. Our first product, Geopipe ContextSnap, focused on workflows where customers knew exactly what area of the world they wanted at the beginning of their design process: it allows artists to download sections of cities in industry-standard mesh file formats that can be loaded and manipulated in your own software.

We quickly discovered that many of our customers, from architects to game designers to simulation creators, wanted to pull environments directly into game engines like Unity and Unreal. Many of them wanted to be able to access entire cities, but as you might expect, all of a city like New York City at Geopipe’s highest level of detail is hundreds upon hundreds of gigabytes of meshes and object instances. It would be prohibitive to try to download and edit a single, monolithic model of such a large area.

To make matters worse, no player would have a powerful enough computer to play a game in such a weighty environment. To solve this problem, Geopipe released its API and Unity SDK in December 2018, making it possible to explore entire cities within game engines like Unity at an interactive framerate. How does it work? We start with a concept similar to Cesium’s 3D Tiles: instead of generating huge models, we break up the world into 128x128-meter squares, and produce our highest-level-of-detail (“LOD 13”) models for each of these squares separately.

Each LOD 13 region contains terrain (including the ground, water, roads, and sidewalk), repeated objects like trees, and the buildings and structures that populate the world. If you want to see a larger area at this high level of detail, you (or our SDK) can place several of those LOD 13 squares next to each other, and they form a seamless tapestry. But in game design, you rarely want to supply a section at a single level of detail, so we produce successively lower level-of-detail models for each region.

The key to interactive framerates and fast loading times is not to simply decimate each LOD 13 tile into an equal-sized but less-detailed replacement, but to intelligently produce larger, lower-detail tiles.

What does this look like? We step tile sizes by a factor of two for each lower level of detail. An LOD 12 Geopipe tile is 256x256 meters, and uses our semantic data about environments to selectively replace panes of glass with textures and simplify terrain meshes without losing realism or accuracy. It covers the same area as 2x2 LOD 13 tiles, so for a region further away from the camera, a game can load a single LOD 12 tile instead of four LOD LOD 13 tiles. An LOD 11 Geopipe tile is 512x512 meters and covers 2x2 LOD 12 tiles or 4x4 LOD 13 tiles, an LOD 10 tile is 1024x1024 meters, and so on.

Four of Geopipe's levels of detail (LODs) for use in game engines like Unity, showing how each successive LOD refines each tile in the previous level of detail with four smaller, higher-detail tiles.

The final advancement is to load a large area around the camera, but only refine low-detail tiles into higher-detail tiles where necessary. We load our lowest LOD tiles to cover an area out to near the horizon, then for each tile we judge to be close enough to the camera to need more detail than it currently contains, our Unity SDK loads the 2x2 “children” of that tile.

For example, if an LOD 10 tile is too close to the camera, we replace it with its four LOD 11 children (and then might need to further refine one or more of those children). This environment does not need to be static: a player can explore an entire city, and Geopipe’s SDK will successfully replace low-detail tiles with higher-detail tiles as the player gets closer, and groups of high-detail tiles with fewer low-detail tiles as the player moves further away. Throughout the experience, a reasonable amount of geometry is loaded at any given time, and careful timing of tile loading and unloading can mean that the player is never aware of the geometry-swapping.

How the tiles loaded in Unity change as the camera moves through a Geopipe world. We keep small, high-detail models loaded near the camera, but are able to put larger, lower-detail tiles further away.

With Geopipe’s 3D Tiles capability, it is now possible to load truly massive environment in games, environments populated with dense complements of buildings, objects, roads, sidewalks, foliage, and everything else that makes the real world recognizable as itself.

If you need to build or prototype a game or simulation quickly, or don’t have the budget for a few computer science PhDs on your dev team, the Geopipe Unity SDK lets you bring a real city into your own project without writing a single line of code. If you want to fine-tune the placement of objects and the artistic style of Geopipe’s worlds to your needs, you can still download Geopipe’s models directly, or even load our rich 3D map data into your favorite procedural generation tool.

Whatever your needs are, let’s talk about how we can help you rapidly bring huge or real-world environments into your game, simulation, or experience.


Comments


bottom of page