navmesh
This is an old revision of the document!
Table of Contents
Navigation Meshes
A navigation mesh is a joined set of polygons with geometric auxiliary data that informs an agent how to travel on the mesh.
WORM is capable of automatically generating navigation meshes in the Goldsource engine. A user is able to export navigation meshes on the fly post-generation.
Generating a Mesh
There are multiple ways of generating a navigation mesh.
Method 1: Manual Seeding
- Enter the game level you wish to generate a navigation mesh for.
- In each region, find an open space to place a coordinate seed via the command worm addnode
- Once a coordinate seed has been placed in every region, execute the command worm generate
- Wait for the mesh to generate.
- If WORM Editor is set to interactive mode, execute worm continue until the process finishes. Otherwise, it will finish automatically.
- The navigation mesh file will save to <root game directory>/addons/worm/data/nav/<map name>_#.sgd where # is a number from 0-9 depending on what already exists.
Method 2: Automatic Seeding
- In order to perform automatic seeding, ensure that Autoseed is set to true in the configuration.
- Simply execute worm generate after entering a level.
- Wait for the mesh to generate.
- If WORM Editor is set to interactive mode, execute worm continue until the process finishes. Otherwise, it will finish automatically.
Exporting Data
There are different ways of exporting data depending on the user's needs. If you require the navigation mesh, then use the command worm export_mesh in order to save it in JSON format. Otherwise, you can use worm export_polys_raw to export only the mesh itself. In order to export shortest paths, execute worm export_paths.
navmesh.1701300463.txt.gz · Last modified: 2023/11/29 23:27 by wormadmin