Table of Contents

Foliage Surface

Main MonoBehaviour component.
You can have many surfaces on scene, but in most cases you will have one, main surface for entire environment.

To create new surface, simply add new, empty game object at the middle of your 3D scene and add Foliage Surface component.
Its inspector is divided into tabs.


Storage

Every surface instance needs its own storage asset.
When you create new surface, you will be prompted here to create new storage asset.

Storage asset is used to store all textures used by surface - baked heightmaps, density and plant maps.

If, by any chance, you lost reference to this asset or you want to make kind of copy - you will have to manually reassign it through inspector debug mode.


Area

Here you define area that surface will cover.

Volume Edit Mode

When you enable Volume Edit Mode, you will be able to edit boundaries of area.
In scene view you will see visualisation of previous and new area.
After you adjust area, you have two options to apply changes:

Heightmap Baking

While in volume edit mode, you will also be able to bake heightmap which is a required step to display your foliage properly.
This process works by casting rays from top to bottom of your volume.
It means that you have to make sure you have properly configured:

To verify your baking process, go to next step - LOD Plane.

LOD Plane

Level of Detail is rendered on special plane that is aligned to baked height map.
In this section you can configure how LOD plane mesh is generated and rendered.
By enabling Preview LOD Plane you can visualize this plane on your scene. In this mode you can also verify baked heightmap.


Layers

Here you define actual layers that will be processed and rendered on surface.
You can have as many layers as you want, but each new layer generates additonal pass, so you will want to use as few as possible.
In most cases you will stick with one or two layers.

In simple words, layer works by placing foliage meshes procedurarlly on surface according to plant configuration in definition asset and layer paremeters.


Editor

Here you can enable scene edit tool.
Simply, select layer, plant, brush type, size and strength and follow instructions shown in inspector.
It's simillar to built-in terrain editor.
You can add custom brush textures in Dragon Foliage Config window.

Mass Tools

Here you have also access to a few common tools that may be sometimes helpful.


Sway

Here you can configure foliage animation which consists of two parts: global wind and interactions.

Global Wind

Interactions

Read more: Interactions