Nav Mesh and Streaming Levels

I dont think I tried it with hiding the persistent level. Wouldn’t you also need to build paths for the persistent level then too after? The bulk of my level is in the p-level, my sublevels are only small variations inside of that.

Thanks for the tip anyway, I will try this!

Yes, 3 navbounds (1 is a dummy in P-level, 2 in each sub level) and 1 recastnavmesh in P-level. You may also try delete your recastnavmesh and create a new one. Also be sure your pool size are enough. Nav-mesh should stream when start play. Be sure you have rebuild nav-mesh with Navigation Build Paths. Use P key to see nav-mesh cover your area.

I use composition and let unreal do all streaming for me. I use dedicated standalone server as well. If you load streaming by your self and not using composition, I don’t know the affect of that I’m afraid.
I also use dungeons in separate servers. The dungeon is a streaming level. When I connect to that server I point out the composition persistent level that contains the streaming sub dungeon level. The dungeon level may be a demo level from any vendor or market place. Just loading it as it is.

Try increase “Fixed Tile Pool Size” to see if you get more area covered with P-key. Check hole area for any green nav-mesh. Also if you have water surface, disable “Can Ever Affect Navigation” for it.

Only build for sub levels not the persistent level

Hi Swe08, thanks for the detail. I have something not fully understood. I followed all your steps, after navmesh built, I use PIE or play game standalone to test, and press P to show green navmesh. But when my pawn run away from a sub level, to let it unload, its green area is still shown. Dost that mean the sub level’s navmesh failed unloading? Did I do something wrong?
Update: I forgot check “Force rebuild on load”, everytime when I retry and add a new navmesh Vol in p-level I should recheck that. It works all good now. Thank U

Yes, “Force rebuild on load” will refill the dummy NavVolume when loading. When level is unloaded in PIE, I guess it still are cached in dummy NavVolume, but will be overwriten when levels are loaded later.

What do you mean about

“At least one dummy NavVolume has to be in P-level covering the whole world, even if it does not have any geometry. This is important due to all streamed static NavVolumes will be put there.”

I’ve create a nav mesh volume that covers the whole world but it is affecting every sub level. What do I have to do?

Thanks

Anyone figure out how to do this for procedural generation? Spawning instances of levels into a persistent level and each level has navigation in it. I found settings in the engine for “should discard sub level nav data” so I’m thinking there is a possible work flow for this. I just have no idea how to go about building the nav data and still only have one recast nav mesh actor. or if that is even the way to get the result.

When you do this for PS4, the persistent level is so heavy that it generates main thread errors, QA will not accept your game like this. It is not a solution to put the navmesh of all the other sublevels at the persistent level, the loading time of this level increases enormously. Although it lags, the only valid option for now is dynamic navmesh only in sublevels

not sure you’re on the same page. Dynamically adding level with baked in navigation is not the same as putting navigation in sublevels that are referenced by the persistent level. That would cause bloat.

In my case, I’m using dungeon architect to spawn level instances that have their nav mesh baked. I have no performance issues with this and I’m doing it on an oculus quest which has far less power than the ps4. I think you need to validate your set up as likely what is happening is your navmesh is being regenerated.

I’ll do a quick blog post or something about how to set this up properly at some point.

Can you post your blog address?

For UE5 I just abandon static navmesh and instead using one dynamic navmesh volume cover the holw world and set it to “is spatially loaded” to false. Then just add NavigationInvoker to npc character. Could probably have done that long time ago. Should be used for large worlds according to documentation.

For future references, this solution also worked

hope so)
Also can try “invokers” technique as alternative.
I guess there will be less problems than with recast

Ran into this issue, and found the solution.

In Navigation System Settings, you want to make sure ‘Should Discard Sub Level Nav Data’ is unchecked…appears to be enabled by default.

Statically built nav data in sub levels is used correctly.

4 Likes

If there are still people looking for answers, I think the simplest and cheapest method is as follows.

I’m throwing a NavMeshBoundVolume into my world that will cover my whole world and is at my persistant level.
So all my world will have a navigation and it will load.

But I check “Generate Navigation Only Around Navigation Invokers” from project settings. So I have navmesh all over my world but it is not loaded.
Thus, it does not cause a waiting or memory problem at startup.

And I add a simple Navigation Invoker to my characters that need nav mesh.

And I make “runtime generation = dynamic” from Project settings or RecastNavMesh.
This provides that. There is a nav mesh on my persistent level, but it is not loaded, thanks to the ai invoker that I want, it can create its own dynamically when needed.

If it’s not a problem for you, you can only give the invoker to the characters so that the ai can have the nav mesh and walk only when the character is near.

And as far as I can see, this invoker always works because it is dynamic, regardless of the lower level.

This doesn’t fix the problem, it just means that you generate navmesh at runtime, instead of generating it offline and serialising the data.

1 Like

In UE5.2, it will work!

[ Preparation ]
ProjectSettings → Auto Create Navigation Data : Off
WorldSettings → Auto Spawn Missing Nav Data : Off in persistent Level and streaming Levels
Delete all RecastNavMesh Actors in persistent Level and streaming Levels

[ In Streaming Levels ]
Locate NavMesh Bound Volume

[ In Persistent Levels ]
Locate NavMesh Bound Volume, the location of volume doesn’t matter.
Build → Build Path then you can see recastNavMesh actor is created
turn “Fixed Tile Pool Size” option on in the recastNavMesh actor

That’s it! you can see streaming level with navmesh will work!

3 Likes

Frickin genius. I love you.