NavMesh limit

Does the NavMesh have a size limit, even when using multiple volumes?

My project is currently using long pathways of very large size (0.5 - 1.5 kilometers in length), and the navmesh simply runs out of juice after a while. It will be generating the navmesh as expected until about partway through the volume, and then it simply stops generating any further.

Tweaking the Navigation Mesh attributes in the engine settings allows me to push it a little further, but I have to start sacrificing resolution to fill out the entire area, and in the largest areas, the resolution is simply too low to function when I adjust it to fill out the entire area.

This limit seems to be for the level, or the sum of all the navmeshes in the currently loaded areas - adding more Nav Mesh volumes does not seem to help at all.

Is there a built in limit in Navmesh size? (Either literal, or perhaps memory based) And if so, how do I bypass this limit?

My project has much larger areas planned, so it is imperative that we are able to bypass this limit without sacrificing resolution. Attached is an image of my current navmesh settings; the current resolution of 35 is not a high enough number to fill more than %75 of the larger areas, but I simply cannot lower it anymore or the resolution starts to cause AI issues.

Thanks for your time.

The easiest thing to try is to increase tile size.

Navmesh is limited in number of tiles it can hold, and there’s also a limit for number of navigation polygons, but both values are pretty big (30 and 29 bits respectively). I get a feeling a bug crept in there somewhere. I’ll file a ticket to have it investigated.

Adding extra navmesh bounds won’t help since all apply to the same navmesh instance, so if you hit the limit you hit the limit.

A more game-specific solution would be to have multiple navmeshes that you switch between, or use world offsetting or transforming navmesh. These however depend on specific game’s requirements/design.

Hope it helps,

–mieszko

Forgot to ask, which UE4 version are you using?

I’m using 4.7.3.

Increasing the tilesize did help, and allow me to sufficiently fill the map with a good resolution. It does cause some stuttering on play for a few seconds (I assume as it rebuilds the navmesh?) but the most interesting issue is that it massively increases the time it takes to exit PIE and return to the normal editor (20 ~ 30 seconds usually, vs virtually instant without navmesh)

Thank you for your Navigation Livestream, without that I wouldn’t have understood most of the options on the list.

The PIE-exit slow down is puzzling. Will investigate that.

Regarding navmesh generation on big areas 4.8 will contain the changes I did for the GDC 256km^2 map. Stay tuned :slight_smile:

I’m definitely anticipating the large world optimizations that are all over Trello, as my project uses a very large map. Literally every one of those items on the list will benefit our project substantially.

Thank you for your help, I believe the issue is solved (I’m sure 4.8 will bring improvements or optimizations, but it’s functional for now!)

I’m about to create a huge map myself and need some help and tips using the Nav Mesh. You are here talking about navmesh for a map 256km^2, do you have a tutorial or something for it?

I’m not sure if you’ll get a staff answer, but here’s some info from our project.

As far as we could tell, as of 4.8 it was unfeasible to have the navemesh encompass our entire project map. It simply would’t work unless you were reducing the resolution to such a low level that it was causing gameplay issues.

Our project was first person, but on a much smaller scale ~8x8km at the moment. Depending on the scope of your project there may be some wiggle room.

The solution?

We added a navigation invoker to our AI blueprint with a radius of 3000, and a removal radius of 5000. So a dynamic navmesh was generated around the NPC. In 4.8 it was a little unstable, but in 4.9 it seems to have stabilized and we rarely have navigation related issues.

If there’s a way to put a navmesh on the entire map(s) I would certainly be interested in this as well, as our solution only works for navigation within 3000 units.

Your solution is correct. Having navmesh covering a huge map is impractical due to memory issues is you wanted to have it rebuild at runtime. If you need a static navmesh it should be fine - after some tweaking 256km^2 msp of GDC demo map was using 0.5GB when using static navmesh. If you need dynamic then navigation invokers are your only options really.

But even with using navigation invokers, there seems to be a limit to navmesh bounds size after which navigation invokers just stop working and no longer generate any navmesh.

Mieszko, could you tell me how big exactly the navmesh bounds are allowed to be while still working correctly? I have only tested with the default tile size of 1000, and I see that the navigation builds correctly with a 100k100k60k navmesh bounds volume, but the navigation no longer builds correctly with a 200k200k200k navmesh bounds volume (then I get no navigation at all).

Also, I think you should me more clear about this in the log if it’s not a bug. There should be an error displayed in the log when the size of the navmesh bounds volume is too high. When I set up the navmesh for my project I just directly set it to 200k200k200k because I thought too much wouldn’t hurt since I use navigation invokers, and then I spent quite a bit of time with trying to find out why I get no navmesh at all. It would have greatly helped if the log would have given me some error that the bounds size just exceeded some artificial limit in size. I hope you agree with that, Mieszko?

This issue still does not seem to have a workaround. Could any Epic Staff give a workaround to the limitations of navmesh in terms of height and overall size? I have a landscape that is 10 km by 10 km, which is far smaller than this game called Citadel which came out recently. There absolutely must be a workaround without having to do gimmicks or some cheap hacky solutions. Please assist!!

I don’t believe there is a “solution” for having the entire map covered by a navmesh at once. It’s simply too demanding to be able to do it with any sort of reasonable resolution on the nav mesh.

The workaround we utilized (listed above) a few years ago when we ran into this problem was to use Navigation Invokers generating a dynamic nav mesh around them. As far as I recall, all you need to do is add a navigation invoker to the character utilizing the navmesh, and configure your project to allow runtime generation. I suggest googling Navigation Invokers and/or runtime navmesh generation.

If you want to have characters navigating across your map, you’re going to need to come up with a custom solution, potentially utilizing their new Asset Manager in 4.16 to keep track of distant actors.