#GridMap baking nav mesh bad performance

1 messages · Page 1 of 1 (latest)

stoic osprey
#

Hi, I am procedurally generating a huge voxel world, and I would like to use navigation. But when I bake the mesh, it takes minutes. I searched online, I found no way to fix this, ideally I would split up the map into chunks and then only bake the needed ones, but that seems to be completely impossible. If I don't find a way to do this, I guess Ill have to use an Astar3d, but thats also not optimal

Thanks a lot in advance

green kelp
#

If you not already do switch the NavigationMesh parsing to only parse collision shapes and have collision shapes on the GridMap for the parsing. Parsing visual meshes is a big no-no for runtime bake performance because all the mesh data needs to be received from the GPU which is super slow.

#

If you already do that and performance is still an issue ... well ... at some point there is just too much pushed into a single node to be parsed reasonably at runtime. TileMap and others all share that problem.

#

At that point your options are to split things up into more manageable chunks or you can parse and bake procedual in script and bake with the NavigationServer doing everything over multiple frames or with background threads. You cant parse a single giant node on the main thread at runtime, it just does not work.

stoic osprey
#

Will be easier in the end I guess

#

Just set one point in the middle of every block

green kelp
#

it is a different kind of pathfinding as you only have points available instead of entire surfaces but whatever works for your project.

stoic osprey
#

Yeah, I don't really need more than that

#

I want to add characters that can be controlled with visual scripting, maybe full blocks will be easier for that anyway