We have an issue with wp navmesh generation in a world partition map. The issue seems to be isolated to only the main map, but other maps with world partitions that we use for testing still seem to be working without issue.
Besides checking the IsWorldPartitionedNavmesh flag to true, and RuntimeGeneration to DynamicModifiersOnly, everything else is set to default. And the issue persists no matter what the RuntimeGeneration is set to. Even when it’s set to Dynamic, and ForceRebuildOnLoad is set to true, the navmesh is still missing.
However, when we start the PIE session after the commandlet finishes, there are only a few navmesh tiles at a very few locations. The locations are always the same, but make up less than 1% of the map.
We have FastGeo and StaticMeshTransformers enabled in the project as well, but navigation seems to be missing even when they are disabled with cvars (both during the build, in PIE, or in the game).
Looking inside tiles inside URecastNavMeshDataChunk, we see some data, however, we can’t be sure whether there’s everything there, or just those few tiles that are working for us.
And lastly, we’ve noticed that package builds contain navigation data only for persistent actors. Sometimes manually loading all the wp data layers makes the navmesh appear in PIE, but that has happened only rarely and seemingly at random
Are the tiles that are generated in locations where the world partition is always loaded? If an area is unloaded, it may not assign the navigation data properly.
Are the navmesh volumes in the map covering all of the necessary areas? I would also check the tile pool size to make sure it’s big enough for your level.
I did also come across this older thread here where a recent reply describes some setting changes they did for a similar issue.
Let me know if any of that helps or if any new info comes to light!
Even if the log seems clear of errors, getting a log of the failed generation and then the log of the duplicate level’s successful generation would be useful so they can be compared. If confidentiality is an issue, the ticket can be made confidential so logs can be shared. We’re having a tough time reproducing this on our end so it’s hard to say what to look for in the logs at this time.
Considering that the duplicated level’s navmesh generation works, it might be useful to clean up redirectors to see if that has any effect on the original level’s generation:
Asset references in the duplicated level may be getting refreshed upon duplication, whereas the existing level may have some stale refs persisting through resaves. Cleaning up redirectors could fix those stale refs.
We have managed to make the navmesh build work in the editor by cleaning, and then adding all data layers to BaseNavmeshDataLayers in World Settings (it was empty before), so in the editor, we can now build the navmesh with a 100% success, but they are all missing in the cook. The navmesh chunk actors aren’t even in the manifest, and putting a breakpoint into ARecastNavMesh::GetNavigationDataChunk, we can see that InChunks is empty for all but 2 actors in the world when starting a cooked game. The issue is for Debug all the way to Release configurations.
Our theory is that there were duplicate nav data chunk actors, and the ones in the cook were the wrong ones with missing data. After a clean and a new build, the amount of navigation chunk actors was cut in half, since after that, the editor navmesh started working. Although the cook was still broken.
However, we have managed to build it exactly once in Debug configuration, but haven’t been able to reproduce the cooked build, even with the exact same setup as before.
There is no issue with the tiles, or the bounds, and we have tried all possible combinations of Dynamic, Static, dynamic modifiers, and Rebuild on load, in project settings, and on the recast actor.
QUICK EDIT: It seems that the navmesh is also sometimes missing in standalone editor.
I’m still currently investigating possible causes for this, and an issue I do see come up is that the “secondary” actor created by the navmesh (which I believe to be the RecastNavMesh actor) somehow got offset by a thousand units, and deleting it and re-adding it solved the user’s issue.
Looking into the documentation I’m not sure how this would have happened, but it seems like an easy thing to check in on.
I did also come across this thread which may provide some useful information, as well as this older one that (while for a much earlier version of Unreal) may have some usefulness in debugging this.
Let me know if any of this is helpful!
In the meantime I will continue to research this and attempt to reproduce it on my end.
sorry for the late reply, we have managed to turn on dynamic navmesh somehow. We had to turn off world partitioning for it on a clean workspace, and then it worked. So we have at least managed to reach a temporary solution, however, none of the other links seem to have helped us, and the dynamic navmesh obviously isn’t a long term solution (it takes roughly 5-30ms every frame to update it in our game). The static/dynamic modifiers only navmesh is still a mystery to us.
We have also tried updating agent settings, or navmesh bounds settings, to force a clean cache, but that didn’t help either.
One thing that did help, which we still don’t quite understand, was duplicating the entire partitioned world, with all it’s actors. The duplicated level has navmesh being built without an issue, which makes me think that there are still some strange cached data somewhere causing issues (a clean workspace still has this issue, so the cached data has to be somewhere in a .uasset file). However, resaving the world didn’t seem to fix it, only duplicating the world to a new file.
Kyle will be out of the office until Dec 8th, so I’ll step in and try to assist.
Would you be able to share the log of the commandlet output, for reference adding a -Log would allow you to specify the output.
Alternatively, you can build it from the editor by enabling “ai.nav.bNavmeshAllowPartitionedBuildingFromEditor 1”, and running Build > Build Paths and checking Verbose (where you can find the output log named WPNavigationBuilderLog.txt in the Saved > Logs directory of your project).
Would you be able to share the level as an example, if not that’s totally okay and we can continue troubleshooting.
On the duplicated level, does it have world partitioning enabled as you mentioned it was turned off on a clean workspace and worked.
Lukas is out of office till the end of the year, so I will be taking over. Unfortunately, we will not be able to share the level, but I will try to gather the required logs this week.
Sorry for the delays. Sadly, we did not get permissions to share the logs, due to them having too many confidential information contained in them.
A short overview is that there are no navmesh related warnings in it, only a few small assets saved with an empty engine version, which most likely unrelated, and no errors at all.
And the builder finishes with all cells processed:
Hello, I am bumping this so that the issue isn’t automatically closed yet, as we are currently working on gathering the logs and trying to replicate the issues, but it is taking longer than expected. I hope to provide the logs this week, or at the start of next week by the latest.
Understood- I can’t stop it from automatically closing, but you’ll be able to reopen it easily when you’re ready to share those. Let us know if there’s anything we can help with in the meantime.