Tech tip: Configuring VR-Forces path planning to support cover points

In VR-Forces, soldiers are capable of taking cover from enemies behind obstacles, such as buildings, trees, rocks or anything else sufficiently large enough in the terrain to shield themselves. When they do, it's important that they react and move immediately so they can quickly reach safety. To speed up the process of evaluating many possible cover locations at run-time, cover points are pre-generated as part of the Navigation Data generation process in VR-Forces. By default, all of the Navigation Data provided with MAK terrains already contains cover points for lifeforms, primarily humans, but not for vehicles. Cover point generation can be configured in the navigationProfiles.mtl configuration file found in appData\settings\vrfSim.

(generate-cover-points True)

This setting can be set independently for lifeforms and vehicles. If you do change this setting — for instance, to enable it for vehicles — you must then regenerate your Navigation Data for the change to take effect. Enabling cover point generation does cause the generation process to take longer so if you do not need cover points, turning it off can speed up the process.

Once cover points are generated in your Navigation Data, you can see where they were created by loading your Navigation Data in the Navigation Lab debug application that is part of the VR-Forces installation. You can either open these files from within Navigation Lab (see Figure 1), or drag a selection of files from a directory and drop them into Navigation Lab.

Generated Navigation Data can be found per terrain in the userData/navData directory. If you drill down into the lowest level lifeform directory, you will see many different .NavData files. The "coverPoints" files contain cover point data for different areas of the terrain. Loading .NavData files into Navigation Lab will show you a visualization of the Navigation Data — see Figure 2. The small green marks are the cover points. In Figure 3, you see this same location in VR-Forces — notice the cover points in Figure 2 are generated around the stairway and in the corners of the building you can identify in Figure 3.

In VR-Forces this data can then be used to run a few different tasks, including Find Cover, Find Firing Position, and Move Between Cover to Location. (You can also find cover points in your own Lua tasks using the vrf:findCoverPoint() function.) For example, running a simple Find Cover task, one soldier can find cover from another entity.

In Figure 4 below, the soldier at the left is taking cover from the one at the right. Notice that the soldier recognizes that his cover position requires him to duck down. This is because the cover positions are encoded with data on whether the position provides both low and high cover.

Figure 1

Figure 1
Figure 2

Figure 2
Figure 3

Figure 3
Figure 4

Figure 4

There are times, however, when the Navigation Generation process does not generate all of the points you would like it to. If you notice in Figure 2, the cover points are always generated near the corners of the triangles in the navigation mesh. If the triangles in your terrain are particularly large, or if you just aren't happy with the positions of the generated cover points, you can add your own into your scenario by placing the special Cover Point tactical graphic. When placed, VR-Forces will perform the same line-of-sight analysis it does during Navigation Generation at the specified location, and it then adds this new point into the Navigation Data where it is ready to use. For instance, if I wanted multiple soldiers to line up in cover along the wall on the right, hidden from some entities around the corner, there aren't enough cover points for such entities to use. To remedy this, we can go to the Tactical Graphics palette and find the Cover Point graphic in the list. This allows us to place a special waypoint on the terrain — see Figure 5, at the top of this blog post — and VR-Forces will calculate from which directions this point provides cover.

If you're interested in learning more about path planning and cover points in VR-Forces, or other ways to configure your world to be richer and more dynamic, let us know at This email address is being protected from spambots. You need JavaScript enabled to view it.!


ST Engineering

ST Engineering