Skip to content

Foliage ​

The foliage library is everything the terrain scatters over the ground: grass, weeds and pebbles (ground scatter), and trees, bushes and big rocks (foliage). Assets > Foliage shows the files of the library as a tree with a picture of each, and the settings of the one you select. There is an entry for every file: you never choose a mesh or a scene by hand, you put the file in the folder.

An entry is a row in the Ground clutter list of a terrain texture and a thing the foliage tools of the terrain editor paint.

The scenes and meshes of the library are listed, with a 3D preview, in World Assets as well; they are changed here.

Two folders ​

FolderWhat goes in itKind
res://src/data/worlds/foliage/ground_scatter/Meshes: .glb, .gltf, .fbx, .obj, .blend, and .res / .tres files that hold a meshGround scatter
res://src/data/worlds/foliage/foliage/Scenes: .tscn, .scn, .glb, .gltf, .fbx, .blendFoliage

Make folders inside them for your own order (grass/, weeds/): the tree of the tab follows them. In the foliage folder a subfolder is a group (see Groups). Materials and textures go elsewhere in your project (the toolkit's test set keeps them in res://assets/foliage/); only meshes and scenes are read from the two folders. Folders that start with a dot are ignored.

The tab makes the entries when it opens and when you press Refresh:

  • A file with no entry gets one, named after the file (grass_tuft_dry.res becomes Grass tuft dry) with the usual numbers of its kind. Change them in the tab.
  • A file that moved keeps its entry: the entry remembers the file by its unique id.
  • An entry whose file is gone is kept (a texture may use it) and shows in red under Missing files. Put the file back, or Delete entry.

The tab ​

The left side is the tree: the two folders and the files in them, each with its picture. Search by name, filter to Ground scatter, Foliage or With problems, Refresh, and Pictures to make the missing pictures or all of them again.

The pictures are made by the editor and kept in res://src/data/worlds/foliage/.thumbnails/ (add that folder to .gitignore if you do not want them in version control). A mesh is drawn by the editor's own preview. A scene is drawn by the toolkit from a corner above, lit by a sun.

The right side shows the selected scene or mesh in a 3D view you can turn around (a mesh with the materials of the entry, so a variant with another material shows it; a group shows its first scene), the file, the name of the entry and its buttons:

ButtonWhat it does
Open in EditorOpens the scene (foliage) or the mesh in the editor, to change it
Show in FileSystemSelects the file in Godot's FileSystem dock
Add variantMakes another entry for the same file (see below)
Reset to defaultsPuts the numbers and the materials back as a new entry has them. For a variant: Delete variant. For an entry whose file is gone: Delete entry

Problems of the entry are listed under the buttons (a mesh that cannot be read, more materials than surfaces, a scene with no mesh, nodes of a scene that are not used, sizes or slopes the wrong way round). Entries with a problem are orange in the tree.

Two kinds ​

Ground scatterFoliage
IsA mesh and the materials it is drawn withA scene you build: a mesh, a StaticBody3D, the collision
CollisionNeverWhatever the scene has (it is optional)
Seen fromNear the camera (40 m by default: Terrain Settings)Far (250 m by default, the same setting)
ShadowsOff by defaultOn by default
Takes ground from the navigationNoYes: a footprint

A foliage scene is taken apart when it is loaded: its MeshInstance3D nodes are drawn in bulk (a forest of one tree is a few draw calls), and the shapes of its StaticBody3D nodes become real collision bodies only near the player and the party (a pool: the trees of the whole world are not physics objects). Lights, particles, scripts and other nodes are not used: the tab lists them as a problem of the entry.

Groups: a folder of scenes is one brush ​

In the foliage folder, every subfolder is a group, and the group is one brush. Put four birch scenes in foliage/birch_trees/ and the terrain tool has one brush, Birch Trees, that places all four at random. A scene that is in the foliage folder itself, with no folder, is a brush of its own. (Ground scatter does not have groups: its folders are only for your order, and each mesh has its own density.)

  • The tab makes the group when it finds the folder, named after it (birch_trees becomes Birch Trees). In the tree the folder is the group: select it.
  • A new scene put in the folder joins the group with weight 1; a scene taken away leaves it. The weights you chose stay.
  • The scenes of a group are not brushes of their own and are not in the brush list. If you want a tree as a brush by itself, keep it out of a folder.

Select the group to set:

SettingWhat it does
Members of the groupOne row for each scene: its picture, its name, its weight and the share of the group that gives. A scene with weight 2 is placed twice as often as one with weight 1, weight 0 is never
Placing and ViewWhere and how much the group grows: the density, the slope, the heights, the patches, how far it is drawn and the shadows. These are the group's, not the scenes'

Select a scene of the group to set how it looks: its size, the height factor, the rotation offset, the lean, the brightness and the sink. Where it grows is the group's, and the page says so. Reset the group puts every weight back to 1 and takes the numbers of where it grows from its scenes again.

The brush paints the group, so the Add, Remove and Reset tools work on all its scenes at once. A scene you painted by itself before the folder became a group is still drawn as it was.

Materials and variants ​

For ground scatter the tab shows one row for each surface of the mesh. Choose a material for a surface, or leave it empty to keep the one the mesh came with.

A variant is another entry for the same file, usually with other materials: select the entry, press Add variant, name it (dry, blue) and change the materials. Grass tuft and Grass tuft - dry are two entries with their own numbers, and two rows in the lists: each gets its own weight on every texture, which is how you shape the variety. A variant sits under its file in the tree.

Placing ​

FieldWhat it does
DensityThe most plants one square metre can have: it is the ceiling for everything (see How much grows, and where). Short grass 40 to 60, long grass 8 to 15, pebbles 0.2 to 1, a tree 0.005 to 0.05
Spacing (m)No two of these closer than this. For trees and bushes, which overlap otherwise (3 = at least 3 m apart). 0 = off. It never makes it thicker: the density is still the most there can be. For a density of 4 or less, up to 24 m
Smallest size, Biggest sizeThe size of an instance is a random number between the two (1 = as the mesh is)
Height factorThe height also varies on its own: the size is multiplied by a number between these two (1 and 1: the height follows the size)
Rotation offset X, Y, Z (degrees)Turns the mesh (ground scatter) or the whole scene (foliage) before anything else, about its own origin. For a file that was made 90 degrees off or lying on its side. The random facing and the lean are added to it
Random rotationEach instance faces a random way round
Lean with the ground0 stands straight up, 1 is at right angles to the ground
Brightness variationHow much darker some instances are than others
Sunk into the groundMetres the instance is put into the ground
Lowest and highest slopeThe slope it grows on, in degrees. A cliff plant: lowest 50. Grass: highest 35
Lowest and highest heightMetres above sea. Both 0: everywhere
PatchinessThe share of the ground left bare, in patches: 0 none, 0.5 half, 1 all. It shapes what textures grow and what you paint by hand alike
Patch size (m)How wide a patch is, and the bare gaps between patches. Patchiness says how much is bare; patch size says how big the patches are

The same cell of ground always gives the same instances, and a lower amount only takes some away: nothing moves when the player changes the clutter setting.

The members of a group share the places, the patches and the spacing of their group, and take turns on the places: the group has the numbers of where and how much (density, spacing, slope, height, patchiness, patch size, view distance), each scene has the numbers of how it looks.

View and Navigation ​

FieldWhat it does
View distanceHow far from the camera it is drawn, before the player's view distance scale. 0 = the usual for the kind
Casts shadowsOff for ground scatter: many small shadows cost a lot and are hardly seen
Footprint radiusFoliage: the radius of ground it takes from the navigation. 0: from the collision shapes of the scene (no shapes, no footprint)

Wind and bending away from the player

Entries have no wind or brush-through numbers: movement in the wind and under the player's feet is done by the shader of the material you give the mesh (a vertex shader that moves the top of a blade). The toolkit only draws the instances.

See also ​