Baked navmesh and large world transformations using data layers

The question is quite simple: what is the Unreal way for dealing with large world transformations when using baked navmesh?

The way we are planning on supporting this is to set ANavigationDataChunkActor’s data layer property in our custom WorldPartitionNavigationDataBuilder. We will also need to create multiple ANavigationDataChunkActors for the region where the large world transformation is taking place, each with different data layer settings. Would this be considered a good approach? Any plans to support this in future releases?

Hi,

Your approach for large world transforms when using baked navmeshes should work and sounds like a good approach.

If it doesn’t work, you could try utilizing navigation invokers with dynamic navmesh updates.

Please let me know your thoughts on this.

I can’t speak on the plan to support future releases, and will escalate to Epic after! Epic offices are closed until 7/14, but they’ll get back to you as soon as possible.

(Note: World Partition Navigation Mesh is an experimental feature - priorities for bugs and features can shift at any time)

Regards

Hi John,

Thanks for this.

I did prototype this and it works in some extent, but sometimes when I activate a data layer and stream in a ANavigationDataChunkActor I get this warning:

“Null rawdata. This can be caused by the reuse of unloaded sublevels. ‘s.ForceGCAfterLevelStreamedOut 1’ can be used until this gets fixed.”

Indeed enabling s.ForceGCAfterLevelStreamedOut does fix this issue, but it’s not something that is supposed to be on, so I am trying to figure out why this is happening. I seems that the GC is not handling things correctly when I unload a data layer and activate it back. Or I am doing something wrong when registering the data, I don’t know.

Answering your question about using navigation invokers, we did consider it but we don’t want to pay the cost of updating the navmesh continuously. We think that modifiers will be enough for the dynamic aspects of our world. Large world transformations can happen but not close to the player, which allow us to use the bake approach.

Regards,

Denis

Hi John,

I can confirm everything works as expected now, and this approach is feasible is anyone else is thinking on adopting it.

I brought in CL39827496 from Epic’s Perforce and the that warning when away as you mentioned.

I had to modify WorldPartitionBuild to allow multiple runs with different data layers settings though. Modifying data layer settings after the LoadAdapters had loaded the level didn’t seem to work.

Thanks for you help!

Thank you for the follow up and information!

The error your seeing might stem from streaming out the navmesh and streaming the area back into the world before the GC runs similar to this public issue tracker: Unreal Engine Issues and Bug Tracker (UE\-243852)

While it’s not the same as it uses dynamic modifiers, it should have a similar cause by the ANavigationDataChunkActor being streamed back in too fast or having a stale reference.

The “s.ForceGCAfterLevelStreamedOut” workaround seems to be an older one, you’d want to use “LevelStreaming.ShouldReuseUnloadedButStillAroundLevels 0” instead as this git commit updated it: https://github.com/EpicGames/UnrealEngine/commit/0c8af87858ac569e8d505d22c66721c1060b5d0c

But as you mentioned that seems to be a workaround - I’ll go ahead and escalate this to Epic along with your earlier question about plans for the future after I hear your thoughts on the above!

Thank you.

Glad to hear it worked out for you! I’m closing this case, but feel free to respond here if you have follow-up questions.

Thank you!