Forest Editor

The forest editor is work in progress and prone to changes in the future


Basics

The Forest Editor is a tool that allows you to quickly create massive amounts of vegetation for your level, including patches of trees, forests, and plants' fields, but can virtually be applied to type of mesh that needs to be duplicated several time onto the level. Entire forests can be laid down using simple techniques similar to painting on a canvas, where your brushes place down 3D models on the terrain.

The Inspector window is required to adjust various properties of the forest items.


When entering this edit mode, some options will appear below the main toolbar:

  • Select Item: If enabled, forest items can be selected individually. You can manipulate them like a standard object.
  • Paint: Place forest items by painting them on the terrain
  • Erase: Paint over forest items to erase them
  • Erase Selected: Erase only selected items. Useful to isolate only certain items
  • Snap to Terrain: Paint over already placed forest items to snap them down to the terrain. Useful if placed forest items are floating
  • Size: Diameter of the brush
  • Density: How many items are placed when painting

These values will be the initial values for any new decal road that will be created.

Toolbar options Toolbar options

Additionally you will see a Forest Editor window. From here you can manage everything about Brushes and Meshes.

Forest Editor window Forest Editor window

Meshes

These are the main element of the Forest system. A forest mesh defines the single element (e.g. a single tree, bush, etc). To create a new forest mesh, simply click the Add New Mesh button in the Forest Editor window.

Add new mesh button Add new mesh button

All the properties of a forest mesh are shown in the Inspector window when one is selected.

Inspector window when a forest mesh is selected Inspector window when a forest mesh is selected

The relevant options are:

Property
Description
Property
shapeFile
Description
Path to the .dae mesh file
Property
collidable
Description
Toggle collisions
Property
radius
Description
Radius used during placement to ensure items are not crowded
Property
mass
Description
Mass used to calculate spring forces on the trunk when under wind effect
Property
rigidity
Description
How much the mesh resists to wind forces
Property
tightnessCoefficient
Description
How much the plant resists to bending
Property
dampingCoefficient
Description
How fast oscillations and forces decay over time
Property
windScale
Description
Overall scale of the wind effect
Property
trunkBendScale
Description
Overall scale of bending effect
Property
branchAmp
Description
Wind amplitude on large branches
Property
branchAmp
Description
Wind amplitude on small branches and leaves
Property
detailFreq
Description
Wind frequency on small branches and leaves

Brushes

A Brush is what you use to paint your forest items onto the terrain. It can contain one or more meshes. A brush made of a single mesh is called a Brush Entity. A brush composed by multiple meshes is called Brush Group.

In the sample below, Tress_palm is a Brush Group that contains 8 bBrush entities. Example of a brush group Example of a brush group

When painting, it is both possible to select the brush group (e.g. select Trees_palm), or just a brush element (e.g. select one of the meshes that the brush group is made of).

To create a new brush group, click the relative button in the Forest Editor window.

Brushes buttons Brushes buttons

The new group will appear at the bottom of the list by default. The group will be empty, until a brush entity is added to it (by clicking the relative button). The Inspector will display all the properties of the selected brush entity.

Inspector when a brush entity is selected Inspector when a brush entity is selected

The main properties are:

Property
Description
Property
ForestItemData
Description
The mesh to use for this brush entity
Property
probability
Description
Probability of this element to be painted during a brush stroke
Property
rotationRange
Description
Maximum rotation the item can be placed at
Property
scaleMin/scaleMax
Description
Minimum and maximum random size for each item
Property
scaleExponent
Description
Balance between the minimum and maximum random sizes
Property
sinkMin/sinkMax
Description
Minimum and maximum variation in the sink radius
Property
sinkRadius
Description
How much to sink the mesh into the ground when placed on a slope
Property
slopeMin/slopeMax
Description
Minimum and maximum surface slope in degrees this item can be placed on
Property
elevationMax
Description
Maximum world space elevation this item can be placed at

Both Meshes and Brushes are tied to the level they are being edited on.

  • Meshes are usually defined in the <currentLevel>/art/forest/managedItemData.cs file.
  • Brushes are stored in main.forestbrushes.json files.

Manual editing of these files is not recommended.


Last modified: 7 December 2021, at 14:30
On this page:

Any further questions?

Join our discord