Grass Patch Generator

Grass Patch Generator

Grass Patch Generator is a tool to produce mesh grass and plant patches with level of detail (LOD) from standard Texture2D images with alpha.

Size, resolution and a range of settings will be saved with the prefab. The resulting prefab can be used with Vegetation Studio as instanced rendered grass with Touch Bend support. Or used as normal GameObjects in Unity with a LOD Group.

To create a new generator select “Window/AwesomeTechnologies/Add Grass Patch Generator” from the menu in Unity. This will make a new GameObject with a generator component.  There is a default grass texture loaded. Add your texture. Set settings as described below in this page. When finished choose one of the 2 options(with and without LOD) to save the prefab. Prefab, mesh asset and Material will be saved in the folder you choose.

The settings in the box “Shader settings” can be changed runtime in the Vegetation System inspector when used later.

When the prefab is saved the GameObject with the generator is no longer needed and can be removed from the scene.

If you want to save the settings for later use, make a prefab of the GrassPatchGenerator object.

See Guide – Create a new grass patch for an example.

 

Patch Settings
Resolution
Bending
Mesh
Grass texture
Shader Settings
Ambient Occlussion
Wind Bending
Random
Mesh Info
Generate

Patch Settings

  • Plane count
    Number of planes used for the grass patch. Higher plane count gives more grass but also a higher polygon mesh.
  • Size
    The size of the mesh. This adjust the randomness of the plane center position.
  • Min/max scale
    Min/max scale of each individual plane. Add a bigger range for more randomness
  • Plane Height
    Base height of each plane. Make sure the height/width aspect fit the texture you are using.
  • Plane width
    Base width of each plane. Make sure the height/width aspect fit the texture you are using.

 

Resolution

  • width segments
    Number of width segments for each plane. If you want the planes to curve you need a higher count than 2
  • height segments
    Number of width segments for each plane. If you want the planes to bend you need a higher count than 2

Bending

  • Minimum bend height
    This setting will set the minimum height in meters where the planes are allowed to start bending.
  • Bend
    Bend amount above the minimum height setting
  • Curve
    Curve amount of each plane.

Mesh

Enable this setting to generate a backside for the planes in the grass patch. This is not needed for use with the VegetationStudio grass shader.

Grass texture

Here you assign the grass/plant texture you want to use with the grass patch.

Shader Settings

These shader settings are the initial settings for the grass patch. They can be adjusted in the VegetationSystem inspector when you add a grass patch to Vegetation Studio.

Ambient Occlussion

Wind Bending

Random

Sets the random seed used to generate all the positions, rotation and size of each plane.

Mesh Info

Size info on the current generated mesh

Generate

When you are happy with the patch you can save it to the scene and project. If you select to save with LOD it will automatic generate a LOD for the grass pacth. The LOD is additive and will keep adding more planes on the higher quality LODs up to the max plane count.