How to work with NavMesh and big Landscapes?

NavMesh is just one object that can cover your whole world. It’s basically almost infinite regular grid. In each grid cell it can hold several mesh tiles (usually just one).
Do you need dynamic navmesh, that can rebuild itself when geometry in the world is changed? In this case I would suggest enable new option (4.6 version) in ARecastNavMesh actor - bFixedTilePool. Adjust TilePoolSize property with expected number of tiles that can be in navmesh at any moment, usually about “navigable area size / tile area size”. If pool will overflow it will give you a warning in the log. This will allow add/remove NavMeshBounds volumes at runtime without invalidating whole navmesh. Only part that was added/removed will be regenerated. So you can put NavMeshBounds volumes into sub-levels.

In general: place NavMeshBounds volumes only where you need navmesh and use smallest possible number of volumes. Also disable NavMeshRelevant flag on actors/components which will not affect your navmesh, this will decrease memory usage by navigation system. Also make sure that you have at least one NavMeshBounds volume in the persistent level, otherwise navigation system could delete ARecastNavMesh actor :slight_smile:

Static (bRebuildAtRuntime==false) navmesh supports streaming. When you place NavMeshBounds volume in the sub-level tiles that intersect that volume will be saved in sub-level. So when sub-level is streamed in/out tiles will be attached/detached to navmesh.

Also take a look at AI support stream, it explains some of navmesh build options. Twitch

1 Like