Grass: setup and surfaces¶
A grass patch is a GrassInstancer component. Each patch scatters blades over its own
list of surfaces, with its own Look Profile (a GrassSettings asset). Every patch under
the rig shares the rig's one Quality Asset (a GrassQualitySettings asset), which sets
draw distance, fade, interaction, shadows and the terrain map.
The Grass module switch creates the first patch, the Grass child object. To add more:
- Spline patches: click + at the end of the patch row, or Add spline grass at the bottom of the tab. See Spline grass.
- Mesh patches: add a child GameObject under the rig and add a Grass Instancer component to it. Select the rig, click the new patch's pill on the Grass tab, and use the notices' Use default buttons for its missing material and profile. Then add its surfaces under Surfaces.
Several patches can list the same surfaces. That is how you layer looks: a meadow, with a daisy patch and a mushroom patch on the same ground.
Keep patches under the rig. A patch outside any rig uses default quality values and default editor options.
The patch row¶
The top of the Grass tab shows one pill per patch, each with the patch's highlight colour. Click a pill to edit that patch: SETUP and LOOK always edit the patch named after EDITING. Select selects it in the Hierarchy.
The bar beneath shows the patch's blade budget: the fill is what is drawn, the line is MAX INSTANCES, and the hatched part past it is what was wanted but not drawn.
Notices¶
The tab shows one notice per problem, only while it applies:
| Notice | What to do |
|---|---|
| No grass material assigned. | Click Use default, or assign a material in Setup. |
| Nothing to grow on. | Add a mesh to Surfaces. |
| No look profile. | Click Use default, or pick one in Setup. |
| No Grass Quality asset. | Click Use default. Until you do, defaults are used and nothing under PERFORMANCE is saved. |
| Patch is capped by Max Instances. | Click Raise cap, or lower the density. See Density. |
| Patch's mesh has N submeshes; only the first is drawn. | Merge the blade mesh into one submesh. See Custom meshes. |
SETUP > Patch¶
| Setting | What it does |
|---|---|
| Look Profile | The GrassSettings asset that sets this patch's look. Marked SHARED PROFILE when other patches use it too. |
| Material | The grass material. The package's default uses the Fable/GrassIndirect shader. |
| Surfaces | The meshes to scatter over. Each entry takes a MeshFilter. When the mesh has more than one submesh, a Material Slot dropdown lists them by material name; pick one to grow on that slot only (grass on the lawn, not the path), or All slots. Each entry can also take a Density Map (see below). |
| Terrain Map Renderers, Terrain Map Terrains (MORE · TERRAIN MAP SOURCES) | Frame the terrain-map capture around these renderers or Unity Terrains instead of around the patch's surfaces. They set the framing only; what is captured is set by the quality asset's Layer Mask. |
Surfaces must be meshes with a MeshFilter, and readable (Read/Write on in the model's
import settings). A Unity Terrain cannot be a surface; it can only frame the terrain map.
A surface's Density Map is a texture read at each triangle's centre through the mesh's UV0. It scales how much of the patch's grass the triangle gets, so grass can follow a painted mask. Once a map is set, two more fields appear:
- Density Channel: the map's channel to read.
- Density Range: the map value that gives no grass (X) and the value that gives a triangle its full share (Y), eased between. A new map starts at 0 and 1, grass where the map is white. Put X above Y for grass where the map is dark.
The map must be readable (Read/Write on in its import settings). Set from a script without a range, a map reads as 0 to 1.
Blades are placed in world space when the patch builds. If you move or reshape a surface mesh, click Rebuild this patch. (Spline surfaces rebuild themselves when moved.)
Density¶
Density is authored in blades per square metre, so a look stays the same on any size of ground.
| Setting | What it does | Default |
|---|---|---|
| Blades / m² | Blades per square metre of surface. Roughly: 20 is sparse scrub, 100 a field, 250 and up a thick lawn. | 100 |
| Max Instances | Hard ceiling on blades for one patch. It is the patch's memory budget: past it Fable stops placing blades instead of growing its buffers, so a big surface at a high density comes out sparser than asked. | 200,000 |
| Seed (MORE) | Placement seed. | 1337 |
Below them, a status line reports the result: area, blade count, achieved density and roughly how far apart blades stand. When the cap holds a patch back, the section shows CAPPED and the build logs a warning naming the patch and the numbers.
Action buttons¶
| Button | What it does |
|---|---|
| Rebuild this patch | Rebuilds the patch being edited. |
| Rebuild all N | Rebuilds every active patch. Shown with more than one patch. |
| Randomize seeds | Gives each look profile used by the rig's patches a new seed, then rebuilds. Writes into the profiles. |
| Refresh terrain map | Captures the ground colour again for every patch with terrain blending on. Use it after you recolour or move the ground. |
| Add spline grass | Adds a spline grass patch under the rig. |
| Clear all | Frees every patch's blades after a confirmation. Nothing is lost: a rebuild brings them back. |
The GrassInstancer component's context menu (the ⋮ menu in its Inspector) also has
Build Grass Now, Clear Grass Buffers and Randomize Seed + Rebuild.