Unable to Bake a NavMesh

Hi all,

I’m trying to bake navigation info onto a simple mesh following the instructions outlined here. The mesh is marked as navigation static. I then go to the Navigation Window and click on the Bake button, but nothing happens. If I go to the scene, I find a file called NavMesh.asset with some data related to the navigation, but the mesh is not colored blue (as it usually is when navigation is successfully baked). If I create an Agent with this NavMesh, when I press play I get an error indicating the NavMesh is not valid.

I’ve tried several combinations and approaches but I always get the same result. What am I doing wrong? Can someone please help me? I’ve been stuck with this for a couple of days and it’s driving me crazy :x

Thanks in advance,

Jos

P.S. It’s worth noting that nothing is displayed on the Editor and no log entry is generated when I click the bake button. It only creates the NavMesh.asset with (apparently) invalid data.

1 Like

is your unity the pro version?

Yes, we have Unity Pro.

The main problem is that the NavMesh baking tool is fairly inconsistent. Sometimes it works, then you change the most minimal thing (like moving a vertex) and the baking doesn’t work anymore.

The thing that bothers me the most is that I don’t get any feedback whatsoever about what am I doing wrong.

Any ideas?

having trouble?

create a separate layer
assign mesh’s to this layer

in the inspector check to make sure the mesh [objects] are assigned and the layer is also the correct one.

Bake!

after this is done baking you should see a nice blue mesh, but if you don’t assign the layer to the main camera you wont visually see it otherwise.

Note: normally i believe Navmesh bakes to the default layer so you should have seen the blue navmesh

Hi @tjjos,

“but the mesh is not colored blue” - What colour is it?

In relation to an invalid Nav Mesh error, can you post some screenshots so we can see after the bake and also see the nav mesh layer /s? if the agent doesn’t match that layer it cannot attach to it.

Thanks,
Chris

First of all, thanks for answering guys.

After some more experimentation, I found out what the problem was (and it’s not related to the layers, but thanks for the suggestion either way):

I turns out that my model (imported from FBX file) was too small, because by default unity scales them by 0.01. So when I wanted to bake a NavMesh using this model, the process was working correctly (supposedly), but (and it’s a big but - no pun intended), doesn’t show the blue mesh because it was basically infinitesimal (to small to see). To explain a little bit further, the default (an even the minimum) values permitted by the baking were many times greater than the actual model dimensions, so when the baking process tried to calculate where the NavMesh would go, there was not “enough room” for it to fit the most minimal unit of a NavMesh. Make sense?

So, to fix this issue, I just scaled my model until the baking process was able to calculate enough data for it to show the “long sought” blue mesh of success :stuck_out_tongue:

Either way, it would be nice if Unity would issue a warning like “Unable to bake mesh because it is too small!!!”, or something like that so that you would not have to spend days trying to figure out what was wrong using your 6th sense, or spider sense or experienced-programmer sense, or whatever sense you might have developed for this kinds of situations.

Anyways, thanks again for your help.

Jos

3 Likes

Although re-sizing the model via the import settings works. Simply adjust the radius in the bake settings. That should fix the problem :slight_smile:

1 Like

I wrestled all morning with this only to have the same problem. No warnings, no indication of what the problem was.
Thank you so much for this post.

Damn , i had been stuck with this problem for past few hours untill i came across this post. Thanks it worked, but what i’m trying to achieve is animate the light through navemesh , say like i have an octupus , and the light has to illuminate all its legs being navemesh agent, and the octupus is small in size. what would be the good approach to do this?

Sorry for reviving a dead thread, but I came across this as I was having issues with the navmesh baking.

For me, all of my object’s scale was: 1, 1, 1. and in the NavMesh baking options, the height was set to 2, thus leading to it not baking as it couldn’t. Hope this helps someone.

Ran into a similar issue, I had forgotten to mark the meshes as static… Hope that helps.

6 Likes

This was my issue! Thanks!

Just throwing out here that I had about the same issue, and mine was solved by setting the Min Region Area in the advanced baking settings to a lower value, since the areas I was trying to bake were very small.

I get the issue and didn’t work any of above answers, and figure out the solution is unbelievably stupid. If you baked while turned off the Gizoms, you will not see the blue area, so just turn on the Gizmos. God I’m feel so stupid now lol :).
5108264--504050--Screenshot (234)_LI.jpg

28 Likes

Thanks a ton, if I would have read this before doing this by myself , i might xD

this was my issue as well . thanks

You save my day HAHAHA!

Lol… a long time later and this just saved my life. thanks friend

OMG fiddling around for hours then I see this lol
thanks…this worked :slight_smile:

Oh man ty ty lol

I’m trying this I’m trying that Gizmo lol thank’s A LOT :}