Dynamic NavMesh

Hello,
I’ve got a question: How can I make a NavMesh which is able to reform itself if for example a house is placed. I will porbably have a giant world, so regen the entire NavMesh won’t work. I found some documentation on the inet, but it doesn’t really say something.
Thank you for help,
Turakar

You neither.

Regenerating navmeshes is really slow. Games often have a 2nd level of navigation on top of the original nav mesh that is used for dodging buildings and other units.

A nav mesh could be split up into chunks, but the current implementation of the nav mesh generator does not support this.

Ok, thank you for quichk reply.

Hello,

<cite>@Sploreg said:</cite> Regenerating navmeshes is really slow. Games often have a 2nd level of navigation on top of the original nav mesh that is used for dodging buildings and other units.

A nav mesh could be split up into chunks, but the current implementation of the nav mesh generator does not support this.

sorry to dig this up

i used the navmesh tools from monkeyzone and it works awesome
but i agree with Turakar23,

the navmesh algo will return only one path
and as it is not aware of new obstacles (like when creating a new building in a strategy game for insance)
the returned path have to be discarded, so how do you manage this ?

i mean with an extra 2D layer to do pathfinding, it would be doing the job twice and navmesh is then useless

can you explain ?

here is an example of it working, based on the same library, it does not looks slow

thx

I can only speak for my case where I essentially have a 2d plane used for navigation, and not 3d with several stories of buildings, tunnels, etc.
I went through two iterations of navigation. The first was a nav mesh and then on top (the 2nd layer) I had an R-tree of stored bounding boxes (not axis aligned) that the units would avoid. I then removed that I as I wanted to store more information on the ground, such as what type of material the ground was made up of at a particular spot. So I just switched to a big grid and used A* pathfinding with blocked cells for navigation. This option worked better as I am building an RTS. However for a dynamic world FPS, I don’t think it is the right solution.

As for the nav mesh generation performance, your world is relatively small. Once you start getting up to 500k polygons it gets slow. However, you can background the calculation and swap it out when it is complete. You might just have to temporarily block off the area that was recently changed until the calculations are complete.

<cite>@Sploreg said:</cite> I can only speak for my case where I essentially have a 2d plane used for navigation, and not 3d with several stories of buildings, tunnels, etc. I went through two iterations of navigation. The first was a nav mesh and then on top (the 2nd layer) I had an R-tree of stored bounding boxes (not axis aligned) that the units would avoid. I then removed that I as I wanted to store more information on the ground, such as what type of material the ground was made up of at a particular spot. So I just switched to a big grid and used A* pathfinding with blocked cells for navigation. This option worked better as I am building an RTS. However for a dynamic world FPS, I don't think it is the right solution.

As for the nav mesh generation performance, your world is relatively small. Once you start getting up to 500k polygons it gets slow. However, you can background the calculation and swap it out when it is complete. You might just have to temporarily block off the area that was recently changed until the calculations are complete.

so far it is working
as i add a new building, i also add a dummy geometry box in the landscape hierarchy, then rebuild the navmesh(i will put this in a ne w thread not to block the game fps)
and tada, it works

i just wanted a non grid strategy game :slight_smile:

jme3 just rocks !

That’s really cool!
You will have to do a writeup of your game in detail some day, I’m sure you’ve solved a lot of problems that others will run into.
Keep up the good work!

Thank you for reviving this thread. I think i’ll do regen the entire NavMesh in a seperate thread if in 30 secs no more obstacles are placed. Once it’s finished, I swap them out.

<cite>@Sploreg said:</cite> That's really cool! You will have to do a writeup of your game in detail some day, I'm sure you've solved a lot of problems that others will run into. Keep up the good work!

i posted the basic code to do that on this thread

http://hub.jmonkeyengine.org/forum/topic/navmesh-issues/#post-213886

but i got other issues

maybe you can help