RecastGraph issue with large map and navigation

Hi,

I am creating my Recast graph for a very large terrain created with WorldComposer (about 10 x 10 miles). I am able to generate it, depending on the cell height which is 300 right now using tiles of size 64. The units drive through the terrain… as opposed to traversing over it (I am not sure where the problem lies for this). I do manage to get a

After changing some settings I get this so far:

and the respective settings:

Maybe I am doing something obvious and wrong…

I also tried using the Grid graph too, but for the distance it was not working for creating paths… it did work if the target location was close enough (but not for long distances), however it still have the same problem of having the unit drive through the terrain?

Hi

What the cell height does is maybe not that obvious, and that field has been removed and is now automatically calculated in the beta version. Essentially you should just set it to a very low value like 0.01 or 0.001.

The navmesh may not accurately reflect the height of the terrain. You should use physics (like Physics.Raycast) to sample an accurate y coordinate for your vehicles. Smaller tile sizes can help to break up the often huge triangles which you get when rasterizing a terrain which is for the most part traversable everywhere.

Oh. And a cell size of 100 will give you data which is mostly unusable.
Each voxel be 100 world units, which is likely not enough resolution for your units.

So this is what I have for the grid mesh

with the respective settings

the units move over the terrain fine, but if the target location is too far then it fails… should I then manually set different waypoints and have the unit use those to traverse from the starting location to the end location through the points?

Hi

Weren’t you using a recast graph?

Also. Your graph is HUGE.
You will start to run into floating point precision errors at those sizes.
I would recommend that you keep your world inside ±10000 world units on all axes.

So If lets say I create a graph for every 10000 world units, and I end up with 5 - 6 graphs. Is there a way to create a navigation path that will take me to the next graph, create a new path then so on until I reach my target on the last navigation graph. I have not see anything on stitching graphs together on the examples (I am not sure if this helps, but I am using NodeCanvas for the AI).

My point was that you should keep your whole scene within ±10000 units (scale your mesh or something).
If you are using a recast graph you should have a single graph for the whole world, not multiple graphs.

If I went ahead and built an A* graph for each section of the world which is 7967 x 7967 would the recast or the grid be a better option? If the recast would be better, what do I use for the cell size as 0.5 looks too small? 10 or 5 maybe? and If i were to use the grid would I use then a node size of 10?

I know I am mixing the two questions for different graphs together… but I am trying to wrap around my head on a working mesh for this type of terrain!

You are being very helpful at my noob questions,
Thank you Aaron

Hi

You should use a single graph as mentioned earlier. Not multiple graphs. The edge cases near the borders of the graph are not worth it.
Recast graph would be better as a grid graph would use a very large amount of memory due to having to keep all those nodes in memory. I don’t really know what cell size you will need, it depends on the smallest terrain/obstacle features that you need to be able to represent. Try with different values and see what gives you an acceptable quality.

– Aron