Vegetation Layers

In S2Engine it is possible to paint on terrain a layer of objects grouped following some rules stored in a resource called vegetation layer (vgl).
The rules objects are placed in a vegeation layer are desgined to follow some features existing in nature with a bit of randomness, in order to give the same feeling of real life vegetation.
 
Vegetation layers are stored inside vegetation assets (.vgl file).
 

CREATING VEGETATION LAYER ASSET
To create a new Vegetation asset:
  • Go to the project folder in which you want to save the new vegetation asset in the Project browser.
  • Then click right mouse button on the free space or on any browser thumbnail and choose new->Vegetation from the appearing dropdown menu, as showed into the following image:
 
Vegetation is created by iterating 4 features that correspond to the 4 types of objects a vegetation mask supports and to the 4 groups of the Vegetation editor panel:
  • Grass

     that is usually composed by Grass class objects or TerrainMesh class objects. It is placed every n pixels of the mask.
  • Trees

     that are placed every min...max pixels of the mask.
  • Plants

     that are placed randomly around the trees.
  • Stones

     that are placed randomly around the plants.
     
To know how to edit these features of the vegetation asset see Vegeteation editor topic.