No announcement yet.

Navmesh generation past 90 degrees or wall navmesh

  • Filter
  • Time
  • Show
Clear All
new posts

    Navmesh generation past 90 degrees or wall navmesh

    Hello, First time posting here. Recently I've modified the CharacterMovementComponent to allow for point gravity. Now that it is done I would like to modify the current Navmesh system to produce/ generate nav mesh on walls or past the current 90 degree limit. I have a few questions that I think would get me started.

    1: Can someone give me a brief breakdown of the navmesh system? I'm just jumping into this and I've already noticed that there are many implementation files associated with the nav mesh system. From the time a Navigation volume is place in the level around geometry, to the time it actually completes generating navmesh - what is going on?
    2: I see lots of names throughout these files like Detour, Recast, GraphNode, etc... Which of these Nav related implementation files focus on the digestion of the ref world mesh and the creation of the navmesh.
    3: Where is this navmesh stored at and can it be baked out?

    Most important:
    4: Where is the trace or Raycast that determines if the slope angle of the world geometry is within the limit and therefor nav mesh should generate there? Which implementation file? Any help will get me started on this quicker - thanks in advance.
    Last edited by Thumper; 09-08-2014, 02:32 PM.

    In the settings for the Navmesh in the editor there is a maximum walkable slope number that will limit what degree of floor slope that the navmesh generates up to. When I changed the CharacterMovementComponent over to work with walking on walls and ceilings I ran into similar limitations. My first plan of attack would be to try and migrate over the current navmesh generation to evaluate those floor angles relative to work within my system. I've not had any luck in identifying where this mesh generation actually takes place (which implementation file). Perhaps I'm just a little overwhelmed with the number of files associated with the navmesh but I figured somewhere in there there would be a an evaluation that would take the maximum walkable slope number and determine if the floor collision normals are beyond that. However, I've not found the actual trace or raycast that gets those figures.


      I've found myself inside of the RecastNavMeshGenerator. This appears to be where much of the tile generation happens but still I don't see any Hit results from a raytrace. Does anyone know how the navmesh generates tiles across the world geoemtry? I would imagine a trace has to occur somewhere against the world geo right?

      Edit: nevermind it appears to be in RecastNavMesh.
      Last edited by Thumper; 09-09-2014, 11:28 AM.


        Okay now I'm more confused. I've found NavMeshRayCast definition, but I cannot find where it is called at.


          it does not do trace checks with the level geometry, it uses the Recast library, wich voxelizes the scene. Here you can see a longer explanation of what Recast/detour library does
          UDK and UE4 programmer and Unreal engine 4 betatester. Currently working on commercial VR games for PSVR.
          Deep knowlegde of C++ and blueprints. Open to freelance work.
          Games released, Deathwave(Steam), VRMultigames(Steam), DWVR(Steam,Oculus,PSVR):


            This is fantastic! thank you. I've been looking for some sort of information about the two. I had found my way into the Recast and found the "rcMarkWalkableTriangles" and "rcClearUnwalkableTriangles". In there I see the evaluation I'm looking for. I believe I can fix the

            if (norm[1] > walkableSlopeCos)
            areas[i] = RC_WALKABLE_AREA;

            to take the float norm array and orient it to world space not relative space (relative to it's orientation against the worlds center inside the world). How to do that I'm having a little trouble with. norm[1] is the "y" channel of this vector. I need to reorient this vector so that it is analyzed as if it were on flat ground. Consider a 45 degree triangle normal. If it were placed on the floor of the inside of a sphere -1000 units down, then the sphere were rotated 90 degrees with this 45 degree triangle appended the triangles normal would be past the maximum 89 degree walkable slope limit as it would be protruding outward and up from the wall. But if I unrotated this vector so that is was back on the floor for it's evaluation it would clear it. This would treat the geometry normals of the world as if they were in a flat world because all of them would be evaluated relative to their spherical orientation.

            So how do I rotate a vector based on it's location inside a sphere? if I have a vector 5000, 0, 0 (the location of this geometry on the X axis wall of the sphere) how do I derive a rotation? I'm trying to keep the code calls to a minimum because it will be called a lot. Any ideas?
            Click image for larger version

Name:	rotatevector.jpg
Views:	1
Size:	36.7 KB
ID:	1056543
            Last edited by Thumper; 09-10-2014, 03:15 PM. Reason: added image