Foliage Painter

Foliage painter is used to spawn trees, rocks and other objects on to the terrain surface, by hand or procedurally. Different from Unity built-in terrain, Polaris spawn trees as child game object, so you can easily edit them after spawning. The spawning system is also rules based, which mean you can use geometry information like altitude, slope angle and distance between trees to determine where to spawn. To enable Foliage painter, click on the Foliage tab in the Inspector or press F6.

Foliage painter comes with some built-in brushes, these brushes are made for demo and prototype purpose, you should create your own custom brush to fit your scene. Expand the Gallery foldout, click to select one of the brush, you would see its properties as listed under the Selected Brush foldout:

• Id: Id of the brush, click on the label to ping the brush asset in Project window.

• Model: 3D model of the tree to spawn.

• Material: Material for the object.

• LODs editor: This is where you set up tree LODs, add a new LOD by clicking on the “+” button. For each LOD, there are several options:

o Override Model: A 3d model only used for this LOD.

o Override Material: A material only used for this LOD.

o Relative Height: LOD transition based on its height, relative to the screen.

o Cast Shadow/ Receive Shadow: Check to have the tree casts/receives shadow. o Is Billboard: Should it use billboard to render this LOD?

• Radius: Brush radius in world space.

• Density: How dense the trees being spawned?

• Erase Ratio: Tweak this value to snip off trees instead of destroy them all.

• Scale: o Min/Max: Value range for object scale.

o Strength: How fast to scale the tree up when painting over.

• Rotation:

o Min/Max: Value range for object rotation.

• Altitude:

o Min/Max: Value range to determine at which height the tree can be spawned.

• Slope:

o Min/Max: Value range for geometry angle in degree to determine where the tree can be spawned.

• Minimum Distance: Minimum distance between trees, use this value to avoid too dense tree group.

• Snap To Normals: Should the tree snap it local up vector to surface normal? Useful when spawning rocks.

• Collider: Collider settings for the tree.

Tree colliders can be fit automatically to object bounds by simply clicking the Fit Collider To Bounds.

There are some additional operations to perform by using the button at the bottom of Selected Brush foldout:

• Re-Apply All: Re-apply brush settings for all tree instances, the tree can be destroyed if it doesn’t satisfy spawning rules.

• Clear All: Destroy all instances of the brush.

• Show All: Show all instances of the brush.

• Hide All: Hide all instances of the brush.