Calculating the ambient occlusion of a plant

The ambient occlusion layer of a plant is calculated using the button in the toolbar of the plant document list. Several plants AO can be launched in one click by multiple-selecting plants in the list:

The information produced by the AO calculations are ruled by the parameters found in the plant's document itself:

We have three parameters:

Each parameter plays a role in the definition of the ambient occlusion field of a plant. Let's first initiate an AO calculation using the toolbar button and see the resulting AO layer by changing the display mode to see the AO layer. The ground far away from the plant is white. We see the plant influence over the ground that surrounds it and we see how the plant itself gets shaded, depending on its geometry. The three parameters are explained below:

The upper sky lighting amount is the amount of upper light that is considered for the AO calculation (in orange). The same goes for the lower sky lighting amount (in blue). Finally the AO produced on the ground can be biased to appear darker or lighter depending on the average surroundings of that plant (more details below). These parameters are fairly important since NDunes's lighting model uses AO a lot to simulate interactions between a given mesh and its surrounding environment in real-time. Therefore, AO should be representative of the average neighborhood conditions into which this plant is meant to be used. More details on this just below:

Combining ambient occlusion of plants over a landscape

We'll see that plants, when used in Biomes are combined together to form a vegetation coverage layer and that this vegetation layer combines itself with the landscape its placed over. Let's start with a naked simple landscape depicted below:

Now, add a simple biome to the scene, that contains three plants: one grass, one bush and one tree. We'll mostly see the tree from that viewing altitude:

We can see that the AO of the landscape influences the AO of the trees that are planted onto it: trees in deep valleys are darker than trees on top of hills. This is due to the influence of the landscape AO over the vegetation layer that covers it. Note that we have the same mechanism with terrains: The atlas layer influences the The first level soil which itself influences Secondary soils. The resulting AO layer influences plants in biomes that are covering it. This mechanism's purpose is to maintain a global coherency in the lighting of the scene.

Getting down further, we'll see that trees ground field ambient occlusions will influence other plants of other categories that are below them:

Atlases > landmasses > terrains > trees > bushes > stones > grass. An atlas influences everyone while a grass plant is influenced by everyone. So in the image above, a tree influences bushes close to it, because they fall into its ground field AO range: their own AO gets darkened. In turn bushes do the same to stones and to grasses.

Now, we'll leave the plant mesh and smoothly replace it by its prism: Transitioning from plants meshes to prisms.