Jump to content

Navmesh re-baking


rotem adler
Go to solution Solved by Peter,

Recommended Posts


Hey guys !

 

It seems like I'm having troubles with my Navmesh after modifying my Gaia Terrain. How can I re-bake the Navmesh so it actually fits the new heights of the terrain ?

In the video you can see how the navmesh is way above the actual terrain groud, which makes the characters in the scene "run on the air" 😂

 

Many thanks in advance !

 

 

Link to comment
Share on other sites

11 minutes ago, Josh said:

Do you have like a mesh imposter terrains? seems like it might be trying to bake another mesh ontop of the terrain

Don't think so, opening up all of the different game objects under "Gaia Terrains":

Please tell me if I missed anything or if you need any more information 🧡

Edited by rotem adler
Link to comment
Share on other sites

  • Solution

My theory is that there is one navmesh from the "Navmesh Surface" component in the scene, and another from the general "Navigation" tab seen top right in your video. If I remember correctly those build two different sets of navmeshes, and probably one of those is outdated.

  • Thanks 1
Link to comment
Share on other sites

In some version of Unity i did experience bugs with the unity nav mesh and the nav mesh components where when you baked the nav mesh components it did no cleanup the nav mesh correctly.

You could try going to Window/AI/Navigation then going to the Bake tab and clearing the baked data image.png.bcda93ba3e610a95af669e8b39b8209e.png

 

You may have to restart the editor after the bake to insure that the data is cleared from the cache completely. But after clearing you can try baking again. From what i remember from the nav mesh components on a nav mesh surface there is a bake button built into it. I'd recommend baking from the nav mesh components itself than from unity Navigation window just to be sure it's taking the bake information from the nav mesh components.

  • Like 1
Link to comment
Share on other sites

Hey Josh ! Can you please specify the specific components you're referring to? I'm just not sure what to look at. What do you mean by "baking from the nav mesh components itself" ?

I hit the "Clear" button on the Navigation bar, selecting the Gaia Terrain game object:

f_Abo1gyNhaKtEHWfG9lxZXrOYMPF3Ri8p.png


Still, only the lower Navmesh got cleared. I tried restarting Unity as well, no change still. "Clear" doesn't change anything this time:
 

 

The result is the same: some of the characters would run "properly" on the ground, but some would run "on the air":
 


Thank you so much again !!!

🍻

Link to comment
Share on other sites

9 hours ago, Peter said:

My theory is that there is one navmesh from the "Navmesh Surface" component in the scene, and another from the general "Navigation" tab seen top right in your video. If I remember correctly those build two different sets of navmeshes, and probably one of those is outdated.

You were right ! I forgot there was an actual "NavMeshSurface" component on the Terrain game object. I hit "Clear" on it and it indeed solved the older NavMesh issue ! Just wonder if it's still at all neccesary to have this component there at this point?

Thank you Peter !!!

f_Rz9f7DPc3vgZAKmFjUNbXtTeSkOn8IqQ.png

Link to comment
Share on other sites

The navmesh surface component is part of the unity navmesh component workflow, this is an alternative way to create navmeshes vs. what is included in the navigation tab. It has a few extra options on how to create navmeshes, such as using physics colliders instead of render meshes for the navmesh creation. 
If you are happy with the navmesh that was created from the navigation tab, you would not need that component anymore.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...