Jump to content

NavigationMesh creation rules


photo

Recommended Posts

We're currently trying to use the NavigationMesh and pathfinding and having a few difficulties.

 

In script I do

 

NavigationMesh m = new NavigationMesh("mymesh.mesh");

m.renderVisualizer();

 

When I load my world I see the navigation mesh, however I also see logged

 

NavigationMesh::create_polygons(): 8 wrong edges

 

Which isn't particularly useful. As a result none of my PathRoute code generates any paths (well that's what I'm observing anyway)

Is there any guidance/rules on building meshes that can be used as a NavigationMesh and what is expected. Currently I'm getting our lead artist to hack away at a mesh in 3DSMax to see if we can fix these problems but without any further diagnostics it's pretty hard to figure out what's actually wrong here.

Link to comment

Technically this means that 8 triangle edges are assigned to more than 2 triangle polygons (maybe some degenerated 0-length edges or so). You should post your mesh for detailed problem debugging.

Link to comment

Would it be hard to change the renderVisualizer such that these edges are highlighted in a different colour or you could log the coordinates of the verts where these edges are? Figuring out the shared edge cases in our meshes sounds like a time consuming process.

Link to comment

Id personally like to see the NavMesh conversion provide appropriate indication to which verts are the problem. Then, either remove the verts and create a _usable_ NavMesh or appropriately fail. Creating broken data with limited feedback to the user is not useful to anyone.

 

Cheers,

Dave

Link to comment

Requirements for a mesh are added into docs.

Sounds perfectly reasonable, but it's not likely our devs will have time to implement this in the nearest future, sorry.

Link to comment
×
×
  • Create New...