Bugreport: navmeshcut issues


#1

Hello!

I’d like to report a bug:
Navmeshcuts appear to modify the graph outside their bounds if there is an XZ overlap.
As you can see on the screenshots, the navmeshcut of the barricade cuts and disconnects the top of the stairs above it, which is not the expected behavior.
You can see a small rectangle removed from the lower part of the navmesh leading up the stairs, but not the upper one, effectively disconnecting the top area. The cut should not affect the walkability of the stairs at all.
My guess is that the AABB bounds of the triangle going up the stairs intersects with the bounds of the cuts box, but the points of the cuts are not validated against the actual volume of the cuts box.

cut disabled:


cut enabled:

Pls fix!


#2

Hi

Yeah, this is an annoying issue. I do know about this, but it is veery hard to fix without significantly impacting performance and increasing complexity (just adding a y coordinate check will unfortunately not do it as that will in turn introduce a number of other issues which will be more common than this one). I’m not sure how best to solve it :frowning:.
As a workaround I think you should be able to reduce the ‘max edge length’ field on the recast graph to split that stair up into a few smaller triangles. That should reduce the probability of it happening significantly.


#3

Won’t that also make performance several times worse by increasing the mesh size 10 fold?
It did give me an idea though, I’ve added a dual navmeshcut in the middle of the stairs to split it into 3 “even” segments. After re-scanning and re-saving the map with the new split in it, the issue is solved.


#4

Slightly worse, yes, but it will definitely not increase the mesh size 10 fold.
Ah, that is a good idea, but the dual navmesh cutting happens at the same time as the normal navmesh cutting, so the bounding box checks are still done on original triangle.


#5

Not sure if you’ve seen my edits I’ve made soon after posting.

My current edge length is 20, to split the stairs like this I’d have to change it to 1-2, that’s at least 10 times more triangles in my understanding.

You are right, the cuts happen at the same time. I though that after re-saving the map the split will become the original but it doesn’t, and depending on the order in which the cuts are executed, it sometimes works and sometimes doesn’t.


#6

I’m curious, what kind of issues? Perhaps those are less problematic for me?


#7

Mostly issues that cuts that only partially touch the ground will make the navmesh become completely disconnected in many cases. Usually that’s pretty bad.

Cuts don’t happen in any particular order, they happen all at the same time.