Learning plants scattering rules

Let's start with our biome that contain one single species. Here, it's a simple bush. Let's setup a terrain with a first level soil. To focus on plant scattering rules and only on these rules, the density of bushes for that terrain is set to all white. We then see something like the image below - using the default biome parameters for that species:

For that sample model this is around 1 million instances of the bush that are scattered throughout the landscape with a viewing distance set to 500m (start fading) - 800m (end fading). If we select the bush in the biome view, we'll have access to its spreading parameters:

Plant weight

The weight of a plant in a biome is its relative influence in its category. At the time a plant needs to be spreaded out, NDunes will evaluate for each plant category (grass, bushes, stones and trees) the list of candidate plants. A plant is a candidate if:

Then NDunes will choose a candidate based on the relative weights of plants that can be selected at the evaluated seeding position.

The weight has another behavior in the sense that it can be used to reduce the density of plants in an area. In the example below, we will use two grass patches. The left side image uses a 100% weight for each plant, resulting in even chances for each plant to be selected. The right side image uses 15% weight for each plant, still resulting in even selection chances, but with a total weight of candidates reaching 30%. Consequently, NDunes reduces the density as it cannot find enough valid candidates to reach the specified terrain density level:

Plant spawn angle limits

The "Spawn angle min / max (°)" parameter rules the slope of the terrain over which the plant is allowed to grow. By default a plant can be seeded on flat grounds (zero degrees) up to 45 degrees slopy areas. This can be changed to spawn plants on different surfaces of the landscape. Below is an example with the plant angular limits set to 0 - 10 degrees:

Plant spawn bending angle

When seeded, a plant can grow up or laterally, following the slope of the landscape it is grown over. This is the "Spawn bending (%)" parameter that defines in which direction the plant will grow. At 0%, it will grow vertically and at 100% it will follow the landscape normal. Let's consider an example with a plant seeded on steep slopes (40-60 degrees), with a Spawn bending set to 0% and 100% (the density has been lowered for a better understanding):

Plant spawn bending randomness

It's then possible to add a random perturbation to the spawn direction, this is called the "Spawn bending randomness (%)", which is a percentage that can be used to modify the directions finally chosen for the plant to grow. Practically, use wisely for plants, abuse of it for stones like objects. Below an illustration using a tall tree model instead of our bush:

While this should be carefully used for vegetals, this parameter is often really useful to add variations on stones and rock meshes over the ground. Below is a desert terrain sample with lots of rocks scattered over the ground. The randomness is very high. The number of big rock models used is very low (only 3):

Plant spawn depth in ground

Finally a plant can be buried into the ground of a variable offset using the "Spawn depth in ground min / max (m)" parameter. This is a bounded offset in meters that is either added or subtracted to the spawn position to reposition the plant, as illustrated below:

Plant spawn scaling factors

A plant's size can be tweaked from the initial size that has been used to define it, by specifying scaling ratios. Expanding these ratios allow wider variations of a single "plant" as illustrated below:

Smaller plants at domain limits

It may be useful to automatically reduce the size of plants when we reach the border of the density domain for that plant. This illustrates for instance the fact that we can see smaller trees on the edge of a forest or smaller grass patches when the soil gets too dry. This is an option that can be toggled by checking the "Smaller at border" checkbox. Below is an example with no size reduction on the left side of the image and the same scene with the "Smaller at border" option being checked on:

The size reduction starts when the density falls below 50% and when the slope is above 50% of the slope interval in which the plant is allowed to grow.

Plants that only grow under trees

Among the possible rules, it's also possible to restrict a plant to only appear under trees. This is achieved by checking the "Grow under trees" box in the plant scattering rules. Whenever checked, each plant is check for all other rules as usual, so there must be some density, angle, temperature & rainfall that are suited for the plant to appear first. Then, this rule can reduce the plant's area to be limited to regions under trees, as illustrated by the image below:

Clustering plants

The idea is that some plants grow in tight groups rather than evenly scattered over a surface, by creating clusters of a given size in meters with a sharpness factor. This will automatically group plants based on a thresholded noise set at the frequency of the cluster size. An illustration is shown below:

Using temperature and rainfall

Temperature and rainfall controls are very important parameters, mostly for biomes that have to cover large Landmasses areas on planetary Atlases. The atlas of a planet defines the "temperature lapse rate" which is the decrease in temperature every 100 meters of altitude (this is the Earth default, but this value can be freely modified). Therefore the temperature over a terrain is not a constant value. It decreases as we go higher. Then, species can be set to only dwell in between a minimal and maximal temperature. The same goes with rainfall.

Let's see this with a clear example using snow (see details here: Adding snow):

In the image above, the single picea tree we've used in the biome has a minimal allowed temperature set to 1 degree. Consequently, it will not be spread out in high altitudes where the temperature drops below 1 degree, plus a fade-out margin.

Practically, there are some temperature and rainfall domains margins:

So in the example above, this means that the tree will grow up to 0.5 degree instead of the 1 degree specified. Then, this allows us to use other plants for the snowy part of the terrain, adding snow covered trees for instance.