The Foliage API is a great way to populate your level with trees using code. If you do it this way, then you can get some good results without having to manually produce a natural looking randomness by hand.
We will correlate the placement of foliage with the Perlin noise value so that the chance to place a tree at a given location is higher when the Perlin noise values are higher.
Before using the code interface to the Foliage API, you should try the in-editor feature to familiarize yourself with the feature. After that, we will discuss using the code interface to place the foliage in the level.
Tip
Important! Keep in mind that the material for a FoliageType
object must have the Used with Instanced Static Meshes checkbox checked in its panel. If you do not do so, then the material cannot be used to shade a foliage material.
Be sure to check the Used with Instanced Static Meshes checkbox for your materials that you use on your...