Godot Version
4.4
Question
Hi, I am using a Terrain 3D node with Navigation Region 3D, the terrain is so big that I want to split the navigation into smaller regions, but I don’t know how to do it.
4.4
Hi, I am using a Terrain 3D node with Navigation Region 3D, the terrain is so big that I want to split the navigation into smaller regions, but I don’t know how to do it.
Any ideas?
Godot doesn’t have Terrain built in, what plugin are you using? Does it need to support navigation better?
I use the Terrain3D addon GitHub - TokisanGames/Terrain3D: A high performance, editable terrain system for Godot 4.. My game requires dividing the navigation region into several smaller regions to avoid baking the nav mesh for the entire map when the player places a building. I have no idea how to do this.
Have you read the plugin’s docs on navigation? I’m seeing a little bit more of your use case it sounds like you need run-time navigation fixes, which they do mention a little bit in a section on runtime navigation. Could you explain (big picture) your situation and why it requires such a navigation fix?
I’m making a bird’s eye view RTS game, the map size is for example 2km by 2km or 5km by 5km. Baking a nav mesh for such a large map when building or removing buildings etc. takes a lot of time, for obvious reasons a more optimal way of creating navmesh baking during the game should be introduced. I was thinking about replacing one navigation region covering the whole map with several smaller ones e.g. a grid of 100x100 or even 25x25 meters regions each, to bake the mesh only in a selected part of the map. I was also thinking about using the paintable navigation layer of the Terrain3D addon itself, converting it to a black and white image and performing the A* algorithm on this image, when a building was placed somewhere on the map, it would simply paint over the given pixels on the image marking them as inactive for A*, I haven’t tested this approach yet.
The NavigationRegion3D NavigationMesh has properties to define a baking bound AABB and a border size margin that can be used for navmesh chunk baking.
Docs can be found here: Using navigation meshes — Godot Engine (latest) documentation in English
Terrain3D has currently no real workable integration for navmesh baking with the core engine. The Terrain3D navmesh baking is its own silo feature. There is NavigationServer API to integrate Terrain3D navmesh baking better with the core system and and issue for it open in the Terrain3D repo but no implementation so far. Implement new navigation mesh callback API · Issue #570 · TokisanGames/Terrain3D · GitHub