PSUnreal Navigation Meshes: Difference between revisions

From PSwiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
1 Persistent level (P-level) containing the lights and the skybox
1 Persistent level (P-level) containing the lights and the skybox


a number of sublevels , with geometry and landscape
* 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


Project Settings -> Navmesh generation Static
for each sublevels
 
* 1 or more NavMeshBoundsVolumes covering the ground
 
 
Sequence to recreate navmesh
# Load the P-level, and loaded ALL the submaps
#Be sure to have the current level selected as the Persistent Level
#Click on Build Navigation Paths
# The navmesh is stored in each sublevel, the persistent level gets no additional size from the navmesh
# If I open a submap, the navmesh is displayed (NO?)
#If I run the game from the P-Level, the NPC moves properly within the same map
#The NPC CAN cross the map borders
 
 
Total time to rebuild navmesh in the game (all level) 11 minutes.


=== General findings ===
=== General findings ===
Line 14: Line 35:
=== Tests Performed ===
=== Tests Performed ===


# [ CHOSEN!! ] One NavMeshBoundsVolume for each of the submap, stored in the submap itself
## Load the P-level, and loaded ALL the submaps and rebuild paths
##Be sure to have the current level selected as the Persistent Level
## The navmesh is stored in each sublevel
## If I open a submap, the navmesh is displayed
##If I run the game from the P-Level, the NPC moves properly within the same map
##The NPC CAN cross the map borders
# One NavMeshBoundsVolume for each of the submap, stored in the submap itself
# One NavMeshBoundsVolume for each of the submap, stored in the submap itself
## Load the P-level, and rebuild paths
##Load the P-level, and loaded ONE submap at time and rebuild paths
## The navmesh is stored in each sublevel
## The navmesh is stored in each sublevel
## If I open a submap, the navmesh is displayed
## If I open a submap, the navmesh is displayed
##If I run the game from the P-Level, the NPC moves properly within the same map
##If I run the game from the P-Level, the NPC moves properly within the same map
##The NPC CAN cross the map borders
##The NPC CANNOT cross the map borders, there is a visibile gap between the two maps in terms of navmesh
# All NavMeshBoundsVolume in the P-level
#One NavMeshBoundsVolume for each of the submap, BUT all NavMeshBoundsVolume in the P-level
## Load the P-level, and rebuild paths
## Load the P-level, and rebuild paths
## All navmeshes are stored in the P-level umap file
## All navmeshes are stored in the P-level umap file

Latest revision as of 22:28, 31 May 2022

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