Can I use Navigation System for a 3D City Builder? (Slow Mesh Baking Problem)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Andrew2022

Hello there,

I have been trying to figure out how to make a city builder in which peasants walk around structures and trees, but sadly I have come to some things I haven’t been able to resolve.

1.- Slow baking problem, when I build a new house, the baking process takes a minimum of 5 seconds for a mesh that has 29 surfaces, all the surfaces are simple polygons.

Plane without a house

Plane with the house after 3 seconds of baking the new navigation mesh

Do anyone know if it is possible to do this, or would I be forced to use a gridmap for instantaneous change on the path navigation system?

2.- The second problem is that I can’t get to make my agents pass through eachother, they collide with one another as if they were rigidbodies, which they are not.

Any answer will be greatly appreciated, Thank you all!

:bust_in_silhouette: Reply From: smix8

Lower the baked area or the detail level e.g. by increasing cell size and height. The entire source geometry for the baking needs to be filled with voxels and if you have a very small cell size you need to process millions of them.

Changing the NavigationMesh sampling mode to Monotone or Layers. The default sampling is Watershed which yields the best quality but has the highest performance cost.

Don’t expect quick baking outside of decent desktop hardware, it is a costly operation that requires good background threading support e.g. many mobile hardware or nearly all html5 usually fail at this.