Generating Navmeshes

I have seen no tutorial or documentation describing how to generate navmeshes using cesium. Is this possible at this time?

Hi @JohnGarcia,

In the near future I will be experimenting with AI characters and navmeshes within Cesium for Unreal. I believe it should be possible, and I would suggest trying Navigation Invokers to dynamically generate a nav-mesh at runtime.

Because Cesium for Unreal will unload tiles outside your view by default, you may want to disable “Enable Frustum Culling” if the AI character begins falling through the world when you look away.

Let me know how it goes!

Thanks you!!! I’ll be exploring cesium a bit more in the next few days and this should make for a great start.

I went ahead and set up a project using navigation invokers. The problem it seems is that I can’t generate a navmesh for the cesium terrain, does this have something to do with the how cesium is streaming in terrain?

I’m using sublevels so I did place the navmesh bounds in the persistent level, though I also attempted to place one in the sublevel itself when that failed.

Thanks for the update @JohnGarcia. I tried this on my end and ran into the same issue. I believe it has something to do with the “Can Ever Affect Navigation” setting, which is not exposed in the Cesium3DTileset actor class. Nav meshes were successfully generated with the cube static mesh, which does expose this parameter, and is checked by default.

I can take a look into enabling this setting on the Cesium3DTileset actor class (hopefully tomorrow).

Thank you, if you can update me when you learn more that would be appreciated.

Hi @JohnGarcia - I took a bit of time to look into this and created an issue / branch on Github for it: Generate navigation mesh on Cesium3DTileset · Issue #327 · CesiumGS/cesium-unreal · GitHub

Unfortunately I was unable to get it working by simply adding a UNavLinkComponent to the Cesium3DTileset actor. If you have any further findings to share, your comments on the issue would be much appreciated. There are some other tasks I must work on for now, but I will let you know if I revisit this issue in the future.

I was trying to do this as well, but then I realized that if you want this to work, you’re going to need a “globe aware” nav mesh as well, otherwise it won’t work on the whole earth right? It would work to a certain point, but since the earth is round, I figured you might run into problems as the surface curves. I didn’t need this for AI, but for teleporting in VR using Unreals out of the box VR stuff. I ended up removing the navmesh entirely and just checking collision with the tiles, and it works really well.

1 Like

That’s great hear. Do you mind giving me a brief overview of your method? I guess I might find worth out of re-exploring cesium this weekend.

Hi @nbaja,

Although there’s not a convenient way to place the navmeshes yet directly on terrain, navmeshes in general should most likely work within georeferenced sublevels. While the navmesh itself may not be globe-aware, if it is wrapped inside a sublevel then it will work locally (i.e., when inside the sublevel). This is true in general for static objects that cannot be made globe-aware with the CesiumGeoreferenceComponent. Wrapping something inside a sublevel may not work for all cases, but typically it’s the most useful way of placing static objects that will never have to move relative to the earth.