Trees and bushes are integral parts of the environments and have extended functionality, like detail bending affected by wind or touch bending affected by the player.
Additionally, trees can also have breakable trunks. For this purpose, bushes are considered trees without trunks. The following instructions apply to trees, but can be used for bushes as well; just exclude any trunk setup.
Normally, an average tree consists of 4 elements:
Optional:
Sample tree:
Sample tree hierarchy, with the dummy as the root for export:
The proxies must be attached to the main render mesh. It's not possible to link them as for brushes.
When a player should be able to move and interact with the leaves/ foliage by pushing it with his body, the leaves need to be set up for Touch Bending.
The other type of bending, DetailBending, is used for wind-based bending effects.
An average tree has a Multi/Sub-Object material, with at least 4 different Material IDs:
The lower the number of rendered materials, the better the performance. The naming is irrelevant.
To have the physics settings work correctly, the Crytek shader must be applied on all the materials.
Example for physics selection:
Export only the root of the object. Everything linked to the root will be automatically exported into one .cgf file. Pay attention to the settings in the Geometry Export Options in the picture below.
Example for export settings:
Example for link structure, with the trunk as the root:
Depending on what type of tree you are creating; your process my vary but for this example we will start out with a tree stump.
This will now become the frame from which you will add the branches to.
You have to place your breakable foliage as a vegetation object placed onto the terrain in order to work in Sandbox. Also, your sys_spec level settings must allow the tree to LOD down to LOD0 to allow breaking.
An average tree has a Multi/Sub-Object material, with at least 4 different Material IDs:
Be sure that your leaves material is a vegetation shader. This will allow for detail bending and other features to make your tree look and act more realistically.
For information on creating breakable vegetation assets, please see Boolean Destructibles.
See the Vegetation Creation article for more information.
These are the console commands that you can use to debug the asset in the Editor:
If you type in 0 instead of 1, you can turn them off.