Navigation
API > API/Runtime > API/Runtime/Foliage
Procedurally determines where to spawn foliage meshes within a discrete area. Generally, a procedural foliage simulation as a whole is composed of multiple tiles. Tiles are able to overlap one another as well to create a seamless appearance.
Note that the tile is not responsible for actually spawning any instances, it only determines where they should be placed. Following a simulation, call ExtractDesiredInstances for information about where each instance should spawn.
Note also that, barring any core changes to the ordering of TSet, foliage generation is deterministic (i.e. given the same inputs, the result of the simulation will always be the same).
| Name | UProceduralFoliageTile |
| Type | class |
| Header File | /Engine/Source/Runtime/Foliage/Public/ProceduralFoliageTile.h |
| Include Path | #include "ProceduralFoliageTile.h" |
Syntax
UCLASS (MinimalAPI)
class UProceduralFoliageTile : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UProceduralFoliageTile
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UProceduralFoliageTile
(
const FObjectInitializer& ObjectInitializer |
ProceduralFoliageTile.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Broadphase | FProceduralFoliageBroadphase | ProceduralFoliageTile.h | ||
| bSimulateOnlyInShade | bool | ProceduralFoliageTile.h | ||
| FoliageSpawner | TObjectPtr< const UProceduralFoliageSpawner > | ProceduralFoliageTile.h | ||
| InstancesArray | TArray< FProceduralFoliageInstance > | ProceduralFoliageTile.h | ||
| InstancesSet | TSet< FProceduralFoliageInstance * > | ProceduralFoliageTile.h | ||
| LastCancel | int32 | ProceduralFoliageTile.h | ||
| PendingRemovals | TSet< FProceduralFoliageInstance * > | ProceduralFoliageTile.h | ||
| RandomSeed | int32 | ProceduralFoliageTile.h | ||
| RandomStream | FRandomStream | ProceduralFoliageTile.h | ||
| SimulationStep | int32 | ProceduralFoliageTile.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
ProceduralFoliageTile.h | ||
void CopyInstancesToTile
(
UProceduralFoliageTile* ToTile, |
Copies instances within this tile to another | ProceduralFoliageTile.h | |
void Empty() |
Empty arrays and sets | ProceduralFoliageTile.h | |
void ExtractDesiredInstances
(
TArray< FDesiredFoliageInstance >& OutDesiredInstances, |
Extracts information on each instance that should be spawned based on the simulation. | ProceduralFoliageTile.h | |
virtual void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
ProceduralFoliageTile.h | ||
void InitSimulation
(
const UProceduralFoliageSpawner* InFoliageSpawner, |
Initializes the tile for simulation. | ProceduralFoliageTile.h | |
void RemoveInstance
(
FProceduralFoliageInstance* Inst |
Removes a single instance from the tile | ProceduralFoliageTile.h | |
void RemoveInstances() |
Removes all instances from the tile | ProceduralFoliageTile.h | |
void Simulate
(
const UProceduralFoliageSpawner* InFoliageSpawner, |
Procedurally determine the placement of foliage instances. | ProceduralFoliageTile.h |