navmesh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
navmesh [2023/11/29 23:09] – titles wormadmin | navmesh [2023/11/29 23:49] (current) – [Exporting Data] wormadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Navigation Meshes ==== | + | ====== 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. | 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 | + | WORM is capable of automatically |
- | === Generating a Mesh === | + | ==== Generating a Mesh ==== |
There are multiple ways of generating a navigation mesh. | There are multiple ways of generating a navigation mesh. | ||
- | == Method 1: Manual Seeding == | + | === Method 1: Manual Seeding |
- Enter the game level you wish to generate a navigation mesh for. | - Enter the game level you wish to generate a navigation mesh for. | ||
Line 16: | Line 17: | ||
- Wait for the mesh to 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. | - 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>/ | + | - The navigation mesh file will save to <root game directory>/ |
- | == Method 2: Automatic Seeding == | + | === Method 2: Automatic Seeding |
- | - In order to perform automatic seeding, ensure that **Autoseed** is set to **true** in your worm.ini | + | - In order to perform automatic seeding, ensure that **Autoseed** is set to **true** in the [[configuration|configuration]]. |
- Simply execute **worm generate** after entering a level. | - Simply execute **worm generate** after entering a level. | ||
- Wait for the mesh to 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. | - If WORM Editor is set to interactive mode, execute **worm continue** until the process finishes. Otherwise, it will finish automatically. | ||
- | === Exporting Data === | + | ==== Editing the Mesh ==== |
+ | |||
+ | Once the automatic generation process is completed, use **worm load_spl #** to load the mesh into the level, where # is the file ID . To unload the mesh, use **worm unload_mesh**. | ||
+ | |||
+ | In order to manually create a polygon, use **worm addpoint** to set the polygon' | ||
+ | |||
+ | You can also force connections in this way. Use **worm addpoint** to create the boundary determined by exactly two points. Then use **worm select_node** to select the target node. Go within the interior of the source polygon and execute **worm forceconnect**. If you are not satisfied with the result, you can use **worm remove_connection** to remove the connection to the target node. | ||
+ | |||
+ | After you are satisfied with your changes, you can use **worm save_spl #** to save the mesh as the desired ID. | ||
+ | |||
+ | ==== 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**. | + | There are different ways of exporting data depending on the user's needs. See [[exporting_meshes|Exporting Meshes]] for more information. 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.1701299379.txt.gz · Last modified: 2023/11/29 23:09 by wormadmin