Support Forum

Tiles for manually created navmesh

Hi there,

I’m working on a large-ish 3D map (3 sqkm), and I’m just switching to this project from unity’s built-in pathfinding. I am now trying to build a navmesh for my map.

I am planning on using navmesh cutting for trees (which can be removed at runtime), so I think having tiles is pretty important. However, generating the recast graph generates a lot of disconnected regions despite the minimum region value (which largely seems to have no effect), and I need a “clean” navmesh because a range of other functionality depends on it.

I tried “cleaning up” the navmesh in blender after exporting the recast graph, but when trying to then put the mesh in as a navmesh graph, I get the error “Too many vertices in the tile” (NavmeshBase.cs:927). I had tried to keep the structure of the recast mesh exactly, so did not merge the duplicate verts, but it looks like NavMeshGenerator (at 250) removes duplicates anyway.

Is there a way for me to import tiles into a navmesh graph? Or for me to “manually” remove regions from a recast graph while retaining the tiles? Version is 4.2.17.

Thank you for your help!

After investigating this some more, I think my best shot is probably to figure out how to discard the areas that aren’t needed at recastgraph generation, which I assume is being done in VoxelRegion.FilterSmallRegions()?

However, I am not quite sure how those regions are actually filtered out. At the very end of the method it seems to set reg[i] = 0 for any regions that too small and not border regions, but reg[] itself is a parameter that seems to be passed by value.

I feel like I am missing something here - any help?