AI navigation, Large world, A lot of units, perfomance.

Hi! I’m working on a large-scale UE project and I’d like to get your advice regarding navigation architecture, runtime generation, and scalability.

Our maps are approximately 30×30 km or larger. Currently, we do not use World Partition for streaming — the entire world is loaded at once.

We can have a large number of AI units active simultaneously, including infantry and vehicles, with separate navigation agents / Recast NavMeshes.

Generating navigation for the entire map at runtime is obviously too expensive, so our current approach relies heavily on runtime navigation generation with Navigation Invokers around active units.

The main problem appears when many units move through areas where navigation has not yet been generated. Multiple invokers can request new tiles at roughly the same time, which results in a significant amount of Recast tile generation/rebuilding. With enough active units, navigation generation starts competing heavily for CPU time and can cause noticeable performance spikes.

Our setup is roughly:

  • Map size: 30×30 km or larger
  • Entire world loaded at once
  • Large number of simultaneously active AI units (100-200)
  • Separate navigation agents / Recast NavMeshes for infantry and vehicles
  • Runtime Recast NavMesh generation
  • Navigation Invokers

We have also experimented with World Partition Navigation as a possible alternative. However, for maps of this scale, building the navigation chunks is extremely time-consuming — in some cases, generating the chunks can take around half a day. Because of this, it has been difficult for us to use that workflow efficiently during development, especially when navigation-relevant geometry changes frequently.

I’m currently investigating parameters such as TileSizeUU, CellSize/CellHeight, Navigation Invoker generation/removal radius, dirty tile processing, and MaxSimultaneousTileGenerationJobsCount.

My main question is: what navigation architecture would you recommend for a world and AI count at this scale?

Would you recommend continuing with runtime Navigation Invokers, investing in prebuilt navigation despite the very long build times, or using some hybrid approach where larger portions of the navigation are precomputed and only selected areas are updated/generated at runtime?

I’m particularly interested in how Unreal’s Navigation System is intended to scale when hundreds of moving units may require navigation in different parts of a 30×30+ km world simultaneously.

Also, are there any specific Recast/NavigationSystem settings, workflows, or architectural approaches you would recommend for reducing both runtime tile-generation cost and offline navigation build times for maps of this size?

Any guidance would be greatly appreciated.

Could possibly lighten the load by unregistering nav invokers on actors in a large group. Like, when you assign units to an infantry squad or something, unregister the invoker on all except the leader. Or maybe make a “reconnaissance drone” actor which moves ahead of groups and has a nav invoker on it.

For a flying combat game with a decent number of npc units on a appx 22km map, i decided on pre built nav mesh… my world doesn’t have dynamic change that affects navigation. The mesh i generate is for npc vehicles sizes ranging from cars up to aircraft carriers. I generally use Tile size 8000, Low Cell Size 800, Height 100, Max step height 800, Medium 400, 100, 300, and High 200, 50, 200. My agent radius and height are 300. The low res generally gets mapped to open water, the medium to open land and high to more dense areas. The nav mesh is pretty rough and takes tweaks with nav volumes and area overrides but once generated works well with a decent path smoothing setup on the npc. With no invokers the requests run fast on mobile hardware. My navmesh generations run at most a couple minutes, most maps less than 30 seconds.