How to Add Spaces for Animals to Your Farming Simulator Map

By Jason van Gumster, Christian Ammann

You can designate areas of your Farming Simulator map for raising various types of livestock. The default map offers the capabilities for cows, sheep, and chickens. Of course, other mods out there allow players to raise other types of animals as well.

You raise livestock on your map with navigation meshes. A navigation mesh is special geometry on a map that defines where a specific type of animal is allowed to roam.

Navigation meshes are hidden from view when you first launch GIANTS Editor. In order to make them visible in your map, choose View→Show→Navigation Meshes from the menu.

You may notice at this point that you can’t select a navigation mesh in the 3D Viewport. So centering the view on that navigation mesh can be a bit difficult. The easy workaround, however, is to select a building or object near the navigation mesh and focus the view on that by pressing F.

image0.jpg

Painting information

Not only are you unable to select navigation meshes in the 3D Viewport, you also can’t directly manipulate and edit navigation meshes. Instead, you must generate navigation meshes by painting on the terrain.

Rather than painting textures or foliage, you’re painting information. In the Terrain Editing panel, your main focus should be on the Info Layer Painting section. To begin painting your navigation mesh, enable Terrain Info Layer Paint Mode from the toolbar, which is the button that looks like a blue pencil drawing on some hills.

As with the foliage painting and sculpting modes, activating Terrain Info Layer Painting Mode gets you a downward-facing brush under your mouse cursor in the 3D Viewport. Painting on the info layer is very similar to foliage painting in that you’re painting based on a bitmask of a set of channels.

These channels are all controlled from the Info Layer Painting section of the Terrain Editing panel. The info layer channels aren’t complex. In fact, for the default map, you use only the first three info channels (0 through 2). Table 3-5 shows the channel mapping for the default navigation mesh types.

Channel Type of Livestock
0 Cows
1 Sheep
2 Chickens

These channels are exclusive. If channel 1 is enabled, then channels 0 and 2 should be disabled.

Assuming that you’re editing an existing navigation mesh, after you choose the correct info channel that you want to paint, you should notice the area around that navigation mesh becomes gray. This area is the info paint that was used to generate the original navigation mesh. Using the familiar painting mouse buttons, you can paint a new shape for your navigation mesh.

The info layer paint is always done in blocky squares, so you can’t get too organic with the shape of your navigation mesh. When GIANTS Editor generates the mesh, it smooths some of those jagged edges for you.

Defining navigation mesh boundaries for objects

As you paint the info layer for your navigation mesh, you may find it tedious to paint around buildings and small props. In fact, GIANTS Editor can help you automatically avoid those objects. You can tell the object to build a navigation mesh mask for you. Then, when you re-create the navigation mesh, the editor takes account of the mask for each object.

To define the navigation mesh mask for an object, hop out of Terrain Info Layer Paint Mode. Now select the object you want the navigation mesh to avoid and look at the Shape tab in the Attributes panel.

image1.jpg

To set the navigation mesh mask for your object, click the button with the ellipsis ( … ) to the right of the Build Nav Mesh Mask field.

image2.jpg

From the dialog window, select the info channel that corresponds to the animal your navigation mesh is controlling. When you’re done, click OK.

Generating your navigation mesh

To re-create or rebuild your navigation mesh, you need to select it. Although you can’t select the navigation mesh in the 3D Viewport, you can still select the navigation mesh from the Scenegraph. Of course, on a large map with many objects, doing so can certainly be a challenge. On a well-organized map, however, doing so is a bit easier.

For example, on maps that come with Farming Simulator, there’s a transform group named animals and within that transform group are transform groups for raising each type of livestock on the map. Those groups are typically named something like cowsHusbandry. Within those transform groups, you can find any navigation meshes for that animal type. The icon for a navigation mesh looks like four squares in a grid, connected with lines.

image3.jpg

After selecting your navigation mesh, you need to rebuild it. To do so, choose Create→Navigation Mesh from the menu.

For the most part, you can keep the values in this dialog at their defaults. The three that you’re most interested in are the following:

  • Radius field (under Agent): The Radius value defines a perimeter around your navigation mesh based on the size of the animal. Using the correct value prevents animals from walking through objects in your map.

    image4.jpg

  • Shape Build Mask (also under Agent): If you have objects in your navigation mesh that build shape masks, set the Shape Build Mask value to use the same channel you use on those objects.

  • Culling Info Layer Channels field (under Terrain Tesselation): The Culling Info Layer Channels value should be set to the same info channel you used when painting info layers.

You can type a number in the Shape Build Mask or Culling Info Layer Channels fields, but clicking the ellipsis button next to each and enabling the correct channel checkbox in the dialog that appears is much easier.

Livestock Type Radius Value
Cows 1.2
Sheep 0.7
Chickens 0.15

After you set all of the relevant values, click the Recreate button and GIANTS Editor will generate a new navigation mesh for the animals on your map.