-
Notifications
You must be signed in to change notification settings - Fork 3
Adding a map
SquarerFive edited this page Feb 21, 2021
·
1 revision
There are three types of mesh generation methods,
- Score-based; terrain will have the lowest cost while structures/rocks will have the highest. (Fast)
- Elevation-based; the cost is calculated by using the elevation of the surface. (Fast)
- Distance Field-based; a distance field mesh is built by collecting the distances from each voxel to an object. (Slow)
- Determine the boundaries of the level by walking to the corners of the playable area and typing in
pos
in the console (press the tilde ~ key to open the console). Note down your coordinates like the example below (from Noshahr Canals TDM), then use those values to find the minimum and maximum XZ corners. The Y value can be set to something high such as 2048. The range between minX and maxX must be the same as the range between minY and maxY (forming a box with an aspect ratio of 1:1).
corners:
-325 69 338
-410 74 263
-342 74 178
-258 65 270
Minimum Corner: -512 2048 128
Maximum Corner: -128 2048 512
- Open the dashboard, click 'open' on your active project, click 'add level' and enter your min corner and max corner into the grid bounds field.
- Set your Step Size to 64. If you are using DF-based scoring, then set it to 128 or higher.
- Leave the Voxel Size at 1.0. For more smaller/dense maps, you may set this value to something like 0.5. Lower values result in a higher resolution nav-mesh.
- Tick elevation-based scoring, this will be used on open-terrain maps. Urban maps will use DF-based scoring.
- Click 'Add Level and Generate Navmesh', this will take a few minutes.
- Once it's completed, click 'tasks' and then 'start all'.
- Open the map editor and tweak it how you like, recalculate costs to apply your changes.