How to work with NavMesh and big Landscapes?

I’m slowly crawling towards AI and NavMesh stuff in my game aaand I’m not sure how to handle NavMesh in big location built with World Composition.
With little dynamic levels you don’t even think about this stuff - everything is smooth, rebuilding and etc, but what is current workflow for… let’s say 2km x 2km location divided in 4 sublevels? And landscapes in general :slight_smile:
Should I create huge 1km x 1km nav mesh in each sublevel and then they will blend or what?
I never worked with huge navmeshes and I don’t even know is it okay to have such big NavMesh or not - there is zero documentation about recommended size policy and etc :frowning:

Anyone? :frowning:

I am intgerested in this as well. Another big problem I see with the navmeshes currently is that I have to generate them again every time I restart the editor. On small maps this may work, but for an open world game, this takes quite some time. Why aren’t navmeshes saved properly?

1 Like
  1. You can turn off navmesh generation either in Project or Editor Settings
  2. Make your navmesh volume tiny unless you are testing gameplay. Or move it into the area you are testing.

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

So I try to put NavMeshBounds volume on ContentExample “StreamingLevel1”

But when i play “Level_Streaming” its does’t show NavMesh when “StreamingLevel1” is loaded (With console “show Navigation” turn on)

And This my Setting:

Same problem as n0sam3, does anyone know how to solve this?

Look at the videos of the kite demo they sould give some more info.

If it is anything like fallout 3. Which I am sure is much better. It will depend on what type of game it is and it must recycle back to original state if proper triggers arnt met… Need a plan of what you have next to occur. Navmesh are like a lines of patrols that you send out and repeat even if pattern isnt precieved as in a basic guad patrol. Or a NPC who if isnt asked ther right questions triggers the next sequence within a location an mission (usually havin an item to trigger). Look at the basic patrol of npc in the geck if you have it and are familure with it. It will give u ideas of what you can do. Take time get fallout3 (not through steam I have always had issues with them when modding). But get it learn the geck and basic patrols from there it will save u time of what you will not have learned.In other words you will come out with faster knowledge than freestylin of not know what to do period. If u need help with the geck I will help. Navmesh I cant wait to get in. I am stuck with cheesy fbx and obj,lol.

Hey guys,

We are building an open world game using the world composition editor and we are having some similar issues and having tried what ddvlost suggested we are not able to save the RecastNavMesh into sub maps. I have placed a NavMeshBounds volume in the persistent map (it intersects with nothing) and another in the sub map which intersects the terrain for which we want to generate a RecastNavMesh. When we generate the RecastNavMesh it is placed in the persistent map not the sub map even when I enable bFixedTilePool. We are using UE4.9 and we really just want to achieve nav meshes that stream in client side when requires rather than constantly loaded which is what I assume will happen if the RecastNavMesh is in the persistent map. Any advice on this is appreciated. bRebuildAtRuntime is DEPRECATED so I set the runtime generation field to static.

Thanks.

I’ve been testing setting our navmesh to DynamicModifiersOnly( I would assume static would work in a similar way) and using bFixedTilePool size. I put nav bounds volumes in both our persistent level, our environment level (streamed sub level), and our gameplay level(streamed sub level) and rebuilt paths. The key thing that messed me up was that nothing worked will testing the streaming inside the editor. However once running a cooked and packaged build, the nav was there. The volumes in all three of those levels were able to generate nav even though the static mesh they were generating nav on was in our environment level.

put navmesh on persistent, not streamed levels

but the case is to have navmesh in sublevels and stream the static data when needed.

I’m trying to achieve this as well and without any luck.

I have done a tutorial on this subject using navigation invokers.

3 Likes

thanks for the tutorial, but my navmesh isn’t generating at all, it generates, then when I hit simulate it can remove tiles, but wont generate more tiles.