PSUnreal Navigation Meshes

From PSwiki
Revision as of 22:28, 31 May 2022 by Talad (talk | contribs) (Setup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setup

1 Persistent level (P-level) containing the lights and the skybox

  • Add an empty NavMeshBoundsVolume, not covering any ground
  • Click on Build Paths, so that you get in the Persistent Level an actor called RecastNavMesh-Default
  • The RecastNavMesh-Default determines where the nav mesh resides, and in case of world composition tells the engine to spread the navmeshes into submaps if its in the persistent level
  • Project Settings -> Engine -> Navigation Mesh -> Runtime Generation = Static
  • Project Settings -> Engine -> Navigation System -> Auto Create Navigation Data = false
  • Project Settings -> Engine -> Navigation System -> Spawn Nav Data In Nav Bounds Level = true
  • Project Settings -> Engine -> Navigation System -> Should Discard Sub Level Nav Data = false

for each sublevels

  • 1 or more NavMeshBoundsVolumes covering the ground


Sequence to recreate navmesh

  1. Load the P-level, and loaded ALL the submaps
  2. Be sure to have the current level selected as the Persistent Level
  3. Click on Build Navigation Paths
  4. The navmesh is stored in each sublevel, the persistent level gets no additional size from the navmesh
  5. If I open a submap, the navmesh is displayed (NO?)
  6. If I run the game from the P-Level, the NPC moves properly within the same map
  7. The NPC CAN cross the map borders


Total time to rebuild navmesh in the game (all level) 11 minutes.

General findings

The size of the navmesh is about 5Mb for a landscape level with 127x127 cell size, and cell number 10 = 127000

The navmesh is stored in the .umap file and not in the .BuiltData file.

Tests Performed

  1. [ CHOSEN!! ] One NavMeshBoundsVolume for each of the submap, stored in the submap itself
    1. Load the P-level, and loaded ALL the submaps and rebuild paths
    2. Be sure to have the current level selected as the Persistent Level
    3. The navmesh is stored in each sublevel
    4. If I open a submap, the navmesh is displayed
    5. If I run the game from the P-Level, the NPC moves properly within the same map
    6. The NPC CAN cross the map borders
  2. One NavMeshBoundsVolume for each of the submap, stored in the submap itself
    1. Load the P-level, and loaded ONE submap at time and rebuild paths
    2. The navmesh is stored in each sublevel
    3. If I open a submap, the navmesh is displayed
    4. If I run the game from the P-Level, the NPC moves properly within the same map
    5. The NPC CANNOT cross the map borders, there is a visibile gap between the two maps in terms of navmesh
  3. One NavMeshBoundsVolume for each of the submap, BUT all NavMeshBoundsVolume in the P-level
    1. Load the P-level, and rebuild paths
    2. All navmeshes are stored in the P-level umap file
    3. If I open a submap, the navmesh is not displayed
    4. If I run the game from the P-Level, the NPC moves properly within the same map (HAD TO DELETE THE BUILTDATA FILES!!)
    5. The NPC CAN cross the map borders
  4. One NavMeshBoundsVolume for each of the submap, stored in the submap itself
    1. Load each sub map and rebuild paths
    2. The navmesh is stored in each sublevel
    3. If I open a submap, the navmesh is displayed
    4. If I run the game from the P-Level, the NPC CANT move