Skip to main content

Introduction

What is the Foliage Plugin?​

The Foliage Plugin lets players interact with the foliage you paint in your levels: trees, rocks, bushes or any other static mesh. When a foliage instance takes damage, the plugin replaces it with an Actor that you control. That Actor can be harvested, give rewards, simulate physics, break apart, and later respawn as foliage again.

Foliage Instance → (takes damage) → Foliage Actor → (harvested / depleted) → despawns → instance respawns

You keep using Unreal Engine's normal foliage workflow. You only change the foliage type's component class, or let the plugin convert it for you, and describe each resource in a Data Table.

Features​

  • Convert foliage instances into Actors when they take point or radial damage.
  • Harvest without damage, for example to pick berries, and pickups that give rewards without spawning an Actor. See Interaction and Pickups.
  • Resources defined in a Data Table: meshes, rewards, number of uses, lifetimes, respawning and physics per resource. See Data Table Settings.
  • Rewards on harvest sent to the player through the Foliage Plugin Interface.
  • Damage types, for example requiring an axe for trees and a pickaxe for rocks. See Damage Types.
  • Respawning and removing instances, with a respawn delay per resource and blocking checks so foliage never pops up in front of a player. See Lifecycle of a Foliage Instance.
  • Stumps and regrowth: show a stump while a tree is gone, and let it grow back when it respawns. See Stumps and Regrowth.
  • Saving and loading of every modified instance between sessions, with one save file per level. See Saving and Loading.
  • Full replication on listen and dedicated servers, including players who join later. See Multiplayer.
  • Destructible meshes with Chaos Geometry Collections. See Destructible Meshes.
  • Physics on depletion, for example trees that fall over. See Simulating Physics.
  • PCG and Instanced Static Meshes, with optional automatic conversion of existing foliage. See PCG and Instanced Static Meshes.
  • Actor pooling for games where players harvest a lot. See Foliage Actor.
  • Blueprint overridable damage, reward and depletion logic, and a Blueprint function library. See Foliage Actor.
  • Works with level streaming, World Partition, World Composition and tiled landscapes.

Common use cases​

Harvestable trees, mineable rocks, berry bushes, resource nodes and other interactive environment objects in survival, crafting and open-world games.

Requirements​

Unreal Engine5.1 – 5.8 on Fab
Target platformsWindows, Linux, Mac, Android, iOS
NetworkingListen servers and dedicated servers. Damage must be applied on the server.

Where to go next​

  1. Install the plugin
  2. Set up your foliage and Data Table
  3. Set up your character to harvest foliage
  4. Read Lifecycle of a Foliage Instance to understand when Actors despawn and instances respawn.