I am currently working on a project that utilizes very large open world terrains based on real world terrain data and satellite imagery (hundreds of square miles of terrain). This project is similar to a flight simulator, but we require ground units to be able to path find at any location on the map.
Currently we have a system that works that involves baking the entire recast graph offline but as we move forward we are likely going to run into some issues with our current solution. Firstly, we have road meshes overlayed on our terrain that follow real life roads (using EasyRoads3D). We need our AI to be able to pathfind anywhere, but to prefer roads when traveling near them. Right now we can cut our graph along the roads and apply lower penalties to these nodes which works alright. However this requires a huge amount of processing time and navmesh cuts along the road increase the node count by several orders of magnitude, and is much to slow to be able to do during run time. As we expand our project this solution is not going to work for us anymore. I am thinking about dynamically generating a point graph along the roads while maintaining a basic recast graph over the rest of the terrain, but wanted to get input here before I went down that rabbit hole. I have seen several other posts on this forum asking similar questions, but they are all very old and I was hoping for feedback specific to this project. Is using a point graph a viable way to go? Is there an easier way to apply lower penalties to roads? What are the challenges I can expect if I choose to use a point graph alongaside a recast graph? Can a point graph be updated on the fly as terrain is streamed in?
Secondly, we would like to be able to dynamically calculate the graph as we transition to streaming terrain (using the World Streamer asset). Ideally this will be something that functions like a moving grid graph, except its a recast graph (we have tried using a grid graph for this project but our areas are too big). I am picturing creating a very large tiled recast graph that spans the entire area of our map, then updating tiles as terrain is streamed in and out. Is this the best solution for this? Will recast graph updates work for meshes in different scenes (World Streamer divides the terrain into many different scenes then loads the scenes as the player moves around the map)? Will this work with a solution for road preferences?
Unfortunately we have been given a very short time frame to experiment with solutions, so mostly I’m looking for general guidance so that I don’t spend too much time on a solution that will not work. I appreciate any feedback or suggestions, or anecdotes from those who have attempted something similar