This document describes Forest Brush data used by the World Editor Forest Editor.
Forest Brushes are editor-only groups of placement rules used to paint forest items into a level. A brush can contain one or more ForestBrushElement objects. Each element references a ForestItemData type and defines how that item should be randomly placed.
Forest Brushes do not directly store placed forest instances. They are tools for creating forest placement data.
A Forest Brush is a container of one or more brush elements.
Each ForestBrushElement controls:
This allows a single brush stroke to paint a natural-looking mixture of trees, rocks, bushes, grass clumps, and other forest items.
Example use cases:
| Object | Purpose |
|---|---|
ForestBrush |
Container for one or more ForestBrushElement objects. |
ForestBrushElement |
Defines placement settings for one forest item type. |
ForestItemData |
Forest item type referenced by the brush element. |
ForestBrush is a container class for ForestBrushElement objects.
It is used by the editor only and is stored under a special group:
ForestBrushGroup
If ForestBrushGroup does not exist, the engine creates it automatically.
A ForestBrush only accepts ForestBrushElement children. Other object types are ignored when added to the brush.
A ForestBrushElement represents one possible forest item type in a brush.
For example, a “mixed pine forest” brush may contain:
Each element has its own probability, scale, slope, and elevation settings.
| Field | Type | Default | Description |
|---|---|---|---|
forestItemData |
ForestItemData | null |
Forest item type this element places. |
probability |
number | 1 |
Relative chance of this element being selected during painting. |
rotationRange |
number | 360 |
Maximum random rotation range in degrees. |
scaleMin |
number | 1 |
Minimum random item scale. |
scaleMax |
number | 1 |
Maximum random item scale. |
scaleExponent |
number | 1 |
Bias exponent used when choosing random scale. |
sinkMin |
number | 0 |
Minimum sink amount variation. |
sinkMax |
number | 0 |
Maximum sink amount variation. |
sinkRadius |
number | 1 |
Radius used to calculate sinking into terrain, especially on slopes. |
slopeMin |
number | 0 |
Minimum surface slope, in degrees, where this item can be placed. |
slopeMax |
number | 90 |
Maximum surface slope, in degrees, where this item can be placed. |
elevationMin |
number | -10000 |
Minimum world-space elevation where this item can be placed. |
elevationMax |
number | 10000 |
Maximum world-space elevation where this item can be placed. |
probability controls how often an element is selected relative to other elements in the same brush.
It is not an absolute percentage by itself. Instead, the chance is based on the element’s probability divided by the sum of all probabilities in the brush.
Example:
| Element | Probability | Approximate chance |
|---|---|---|
| Pine small | 3 |
50% |
| Pine large | 2 |
33% |
| Rock | 1 |
17% |
Total probability:
3 + 2 + 1 = 6
So:
Pine small = 3 / 6 = 50%
Pine large = 2 / 6 = 33%
Rock = 1 / 6 = 17%
Use higher probability for common items and lower probability for rare accent items.
rotationRange controls random yaw rotation.
Example:
"rotationRange": 360
This allows full random rotation and is useful for trees, rocks, bushes, and most natural objects.
Smaller values restrict rotation variation:
"rotationRange": 30
This can be useful for objects that need a more consistent orientation.
scaleMin and scaleMax define random item scale.
Example:
"scaleMin": 0.8,
"scaleMax": 1.3
This creates variation so repeated assets do not look identical.
Typical usage:
| Asset type | Suggested scale range |
|---|---|
| Trees | 0.8 - 1.4 |
| Bushes | 0.7 - 1.5 |
| Rocks | 0.6 - 1.8 |
| Grass clumps | 0.8 - 1.2 |
scaleExponent biases the random scale distribution between scaleMin and scaleMax.
Default:
"scaleExponent": 1
A value of 1 gives a normal linear distribution.
Higher or lower values can bias the result toward smaller or larger instances, depending on the random distribution used by the editor.
Use this when you want most items to be near one end of the scale range instead of evenly distributed.
Sink settings help place items naturally into terrain.
| Field | Description |
|---|---|
sinkMin |
Minimum sink amount. |
sinkMax |
Maximum sink amount. |
sinkRadius |
Radius used to calculate sinking around the base. |
These are useful for:
Example:
"sinkMin": 0.05,
"sinkMax": 0.2,
"sinkRadius": 1.5
This allows the object to be placed slightly below the terrain surface to avoid visible gaps.
slopeMin and slopeMax restrict placement based on surface slope.
Example for normal trees:
"slopeMin": 0,
"slopeMax": 35
Example for cliff rocks:
"slopeMin": 25,
"slopeMax": 80
This helps control where items appear:
elevationMin and elevationMax restrict placement based on world-space height.
Example:
"elevationMin": 200,
"elevationMax": 800
This is useful for biome control:
A mixed forest brush could contain three elements:
{
"class": "ForestBrush",
"name": "mixed_pine_forest"
}
Example elements:
{
"class": "ForestBrushElement",
"forestItemData": "pine_small",
"probability": 4,
"rotationRange": 360,
"scaleMin": 0.8,
"scaleMax": 1.2,
"slopeMin": 0,
"slopeMax": 35,
"elevationMin": -10000,
"elevationMax": 10000
}
{
"class": "ForestBrushElement",
"forestItemData": "pine_large",
"probability": 2,
"rotationRange": 360,
"scaleMin": 0.9,
"scaleMax": 1.4,
"slopeMin": 0,
"slopeMax": 30
}
{
"class": "ForestBrushElement",
"forestItemData": "rock_medium",
"probability": 1,
"rotationRange": 360,
"scaleMin": 0.6,
"scaleMax": 1.8,
"sinkMin": 0.05,
"sinkMax": 0.2,
"sinkRadius": 1.2,
"slopeMin": 10,
"slopeMax": 75
}
In this brush:
forestItemData must reference a valid forest item definition.
Forest item data is usually defined in:
levels/<levelName>/art/forest/managedItemData.json
Example item data:
{
"pine_small": {
"class": "ForestItemData",
"internalName": "pine_small",
"shapeFile": "/levels/example/art/shapes/trees/pine_small.dae"
}
}
Brush element reference:
"forestItemData": "pine_small"
If the referenced item data does not exist, the brush element cannot place that object.
windScale in ForestItemData, not the brush, for wind behavior.Possible causes:
forestItemData is missing or invalidForestItemData does not existslopeMin / slopeMaxelevationMin / elevationMaxIncrease sink values slightly or check asset origin/pivot.
Reduce sinkMin, sinkMax, or sinkRadius.
Increase rotation variation, widen scale range, or add more brush elements.
Lower slopeMax.
Increase slopeMax or raise slopeMin depending on the desired placement range.
Forest Brushes are editor-only placement tools used by the Forest Editor.
A brush contains one or more ForestBrushElement objects. Each element references a ForestItemData type and defines how that item should be randomly placed using probability, rotation, scale, sinking, slope, and elevation rules.
They are used to efficiently paint natural-looking forests, rocks, bushes, and other repeated level vegetation.
Was this article helpful?