Lets talk about the build options for a moment to help gain an understanding of what they do for us.

Properties

Beginning at the top, we have Properties with a single field Tags. This list of tags allows you to select multiple tags to use to build the NavMesh from.

In example 1, we set the tag of the nav_test object to Navigation Mesh. We could have just as easily made 3 copies of our nav_test mesh and set them to different tags. This field can then be used to select one or more tags to build the geometry from. Lets say we wanted to build an RTS, we have 3 different units, a foot soldier, a tank, and a ship. Foot soldiers and Tanks can work on gravel, grass, roads, etc. But lets say tanks can’t go through forest or mud regions. Ships on the other hand can only use water geometry. Using the tags, we can set parts of our geometry to be the terrain type and build the NavMesh for each class of unit.

After we build the navmesh 2 values appear under the tags for the number of vertices and triangles we used to build the NavMesh from.

Rasterization

After properties, we have rasterization. When we have selected all geometry to be used we take the triangles that compose the geometry and we rasterize it. That is, we break it down into small squares of space. The cell size defines the length and width of each cell and the cell height is how high it should be. This, along with the geometry, determines how large the array of data will be when building our navigation data. The smaller the chunks, the more detail will be in the final mesh, but also the more memory it will require to build the NavMesh.

Agent

Because we are building the navigation data based on the geometry, we need to know the size of the agent that will use the navigation data. Along with the actor’s size, we can control the slope the actor can travel up and how high up they can step.

Lets take our example of the foot soldier and tank with this new data. The Tank is 8m along its longest side and is 3m high. It wouldn’t fit in small alleyways. The foot soldier on the other hand is 0.5m by 2m.

Next, the tank could be limited by its engine and only able to go up slopes with an angle of 30 degrees while a person could go up the side of a mountain with a 45 degree angle.

Lastly a person might be able to step up small ledges up to 0.5m high by jumping, but the tank is able to drag itself up 0.75 meters because of the treads digging into the wall.

Region

The region section covers how large or small the regions should be allowed to be. A Region is subsection of the mesh geometry. After the geometry has been rasterized, the algorithm looks for groups of blocks that are considered to be part of the same region because they are connected together.

If we use the nav_test object, when our Min Region Size is 8, you’ll see some ability to walk on areas on top of the blocks. If we increase it to 9, the area of those regions isn’t 9 units and they are removed from consideration for our NavMesh.

The Merged Region Size is how big the regions can be before it makes a new region. Larger regions can make for fewer polygons depending on the next section.

Polygonization

This is used in conjunction with the Region setting to determine how big the polygon will be.

The Max Edge Length defines how long the algorithm should attempt to make the edges of the polygon. The longer the number, the more area a polygon could potentially take up.

The Max Edge Error helps to define how closely the polygon will attempt to follow the edges of the region.

Verts Per Poly is used to define how big the polygon should be. However, in order to work with Detour, the number of points must be between 3-6.

Detail Mesh

The Sample Distance is how often the algorithm should attempt to make a smaller detail polygon. The larger the number, the larger the polygons and therefore the smaller the detail.

The Max Sample Error is how far from the original mesh the point must be before it is considered when making a new sample point. Using 0 will result in small details while using values larger than one can create larger polygons and will not match the original mesh as closely.

Misc

The Build Time just shows how long it took the algorithm to gather the geometry and build the data and NavMesh.

The Build button will run the algorithm and then Create a RecastNavMesh if one does not already exist. If it does, it will overwrite the existing mesh with the new one.

The Reset button will take all of the settings and reset them back to their original values with the exception of the Tags field.