HeroEngine Forums

HeroEngine Support => Design & World Building => Topic started by: ToY-Krun on Sep 13, 18, 01:00:34 AM

Title: PathSystem or Navmesh malfunctioning
Post by: ToY-Krun on Sep 13, 18, 01:00:34 AM
I've tested this for over the last year or so, each time trying something a little different just to make sure there was a problem and not just a misunderstanding on my part :)

The backend PathSystem (physx server) does not recognize path nodes marked as anything but terrain.
This is a major problem for needing npcs to path inside of buildings/caves etc.  or even beneath trees, as the navmesh beneath a large tree gets marked as being underwater (yellow) which gets ignored apparently by requests to the pathing system for pathpoints for npcs.

To run a quick test, go to the edit instance of an area and place some object above the terrain... just let it hover there, but leave room beneath it for an npc/char to walk (even an inverted heightmap will do).  wait for it to rebuild the navmesh, log out, and back into that area.  turn on "visualize navigation mesh".  you'll note that the nodes beneath the object you placed are yellow (according to the wiki this indicates "under water".  this happens under trees and inside buildings etc.  place an npc in the middle of this yellow patch, and he/she will simply stand there.  the result from the request for points to path, is nothing.  no point is found.  Be sure to make the object fairly large so the system doesnt pick a point outside of the patch of yellow nodes.

Have attempted using an override of the walkable parameters set and several other things, but no matter what nodes the npc should be pathing on, the pathing system doesnt return a valid point.

I have alot of caves, and in AoH there will be more area underground, than above (many levels downward).

I attempted to solve this by having Reg slice our caves and separate the top from the floor.  I then set the top portions to "PathingMode = Ignore"... well... then i enabled Live Region Updates and watched it rebuild the navmesh for the cave... bingo!  I thought, it rebuilt with "WHITE" nodes, which indicates "NonTerrain"... the npc did path then.... however, when I went to the EDIT instance and made these changes, The resulting navmesh was neater than before BUT  the nodes were once again YELLOW (underwater)...  This is where it seems wierd to me, i assume the same code backend produces the "temp" or "test" patch to the navmesh when using the Live Region UPdate.... so why does it and the actual navmesh rebuild, produce two very different outcomes?

Really could use things like this fixed :)  I realize there are other things going on, as well as work on the engine Upgrade, but would it be possible to get a list of "high priority" fixes, and push them out?

At any rate, we are working around everything we can, and will continue to do so, as well as offer our full support to the team for the work going on.   Just wanted to post this issue up so that it was known about and/or act as a reminder of it.

Title: Re: PathSystem or Navmesh malfunctioning
Post by: ToY-Krun on Sep 13, 18, 06:20:49 AM
There are options for this if anyone else has problems with pathing.
Reg sliced the cave into where the floor met the walls/top, so i deleted the tops/walls in the EDIT instance, and allowed the server to build the navmesh without it,  Then placed the tops where they should be via HSL when the area spins up (all but the EDIT instance).

However, if your cave or building has interior paths that pass over/under one another, those intersections will cause spots where the npcs won't stand/path.  if its not too big of a spot the server will direct them across it without using those path points.

Just thought I'd add that.
Title: Re: PathSystem or Navmesh malfunctioning
Post by: HE-SARRENE on Sep 13, 18, 09:51:05 AM
Thanks Krun! I will take a look at this later on and see what we can figure out or plan out. I do know that the nav mesh system will be getting an overhaul later on, so this is great information.

Having caves that tend to circle around and go above or below is an excellent reproduction of this. Let us know what you find out about this when you do more testing and all results!

Thanks! :D
Title: Re: PathSystem or Navmesh malfunctioning
Post by: ToY-Krun on Sep 13, 18, 06:18:27 PM
Will do, and yep, that would be a good repro :)

can confirm that allowing the EDIT instance to rebuild the navmesh, minus the tops of the caves, did work.  it resulted in "white" nodes, which are supposed to indicate a "Non" terrain mesh.    And, once i loaded up a play instance, the npcs were perfectly happy to path on this.   So, my guess is that underwater nodes (yellow) are getting ignored at least, not sure about water (blue) as they dont ever seem to get produced :)

I've tried every combo of walkable parameter set one can do.

Anyway, this will do for now, in the subterranean levels, nonTerrain works fine.

Everything else aside, if the pathing process in the back end would recognize the underwater nodes that are drawn by the navmesh, it would work fine on our end as we'd just use the yellow nodes the navmesh gives us.  my guess is that the pathing/physx server is missing those from its version of the navmesh.

Title: Re: PathSystem or Navmesh malfunctioning
Post by: ToY-Krun on Sep 19, 18, 05:37:25 AM
**Removed**  The last test resulted in even more questions than answers.
Will post if I find a concrete workaround or cure.