UFoliageType

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Foliage

Header

/Engine/Source/Runtime/Foliage/Public/FoliageType.h

Include

#include "FoliageType.h"

Syntax

class UFoliageType : public UObject

Variables

Name Description

Public variable

float

 

AlignMaxAngle

The maximum angle in degrees that foliage instances will be adjusted away from the vertical

Public variable

uint32: 1

 

AlignToNormal

Whether foliage instances should have their angle adjusted away from vertical to match the normal of the surface they're painted on If AlignToNormal is enabled and RandomYaw is disabled, the instance will be rotated so that the +X axis points down-slope

Public variable

float

 

AverageSpreadDistance

The average distance between the spreading instance and its seeds.

Public variable

uint32: 1

 

bAffectDistanceFieldLighting

Controls whether the primitive should affect dynamic distance field lighting methods.

Public variable

uint32: 1

 

bAffectDynamicIndirectLighting

Controls whether the foliage should inject light into the Light Propagation Volume.

Public variable

bool

 

bCanGrowInShade

If true, seeds of this type will ignore shade radius during overlap tests with other types.

Public variable

uint32: 1

 

bCastDynamicShadow

Controls whether the foliage should cast shadows in the case of non precomputed shadowing.

Public variable

uint32: 1

 

bCastShadowAsTwoSided

Whether this foliage should cast dynamic shadows as if it were a two sided material.

Public variable

uint32: 1

 

bCastStaticShadow

Whether the foliage should cast a static shadow from shadow casting lights.

Public variable

uint32: 1

 

bEnableDensityScaling

Whether this foliage type should be affected by the Engine Scalability system's Foliage scalability setting.

Public variable

uint32: 1

 

bEnableDiscardOnLoad

Whether this foliage type should be discarded when CVarFoliageDiscardDataOnLoad is enabled.

Public variable

uint8: 1

 

bEvaluateWorldPositionOffset

Public variable

FBodyInstance

 

BodyInstance

Custom collision for foliage

Public variable

uint32: 1

 

bOverrideLightMapRes

Whether to override the lightmap resolution defined in the static mesh.

Public variable

uint32: 1

 

bReceivesDecals

Whether the foliage receives decals.

Public variable

uint32: 1

 

bRenderCustomDepth

If true, the foliage will be rendered in the CustomDepth pass (usually used for outlines)

Public variable

bool

 

bSingleInstanceModeOverrideRadius

Option to override radius used to detect collision with other instances when painting in single instance mode

Public variable

bool

 

bSpawnsInShade

Whether new seeds are spawned exclusively in shade.

Public variable

uint32: 1

 

bUseAsOccluder

If enabled, foliage will render a pre-pass which allows it to occlude other primitives, and also allows it to correctly receive DBuffer decals.

Public variable

uint8: 1

 

bVisibleInRayTracing

Public variable

uint32: 1

 

CastShadow

Controls whether the foliage should cast a shadow or not.

Public variable

int32

 

ChangeCount

Public variable

float

 

CollisionRadius

The CollisionRadius determines when two instances overlap.

Public variable

FVector

 

CollisionScale

The foliage instance's collision bounding box will be scaled by the specified amount before performing the overlap check

Public variable

uint32: 1

 

CollisionWithWorld

If checked, an overlap test with existing world geometry is performed before each instance is placed

Public variable

FInt32Interval

 

CullDistance

The distance where instances will begin to fade out if using a PerInstanceFadeAmount material node.

Public variable

int32

 

CustomDepthStencilValue

Optionally write this 0-255 value to the stencil buffer in CustomDepth pass (Requires project setting or r.CustomDepth == 3)

Public variable

ERendererStenci...

 

CustomDepthStencilWriteMask

Mask used for stencil buffer writes.

Public variable

TEnumAsByte< EH...

 

CustomNavigableGeometry

Force navmesh

Public variable

float

 

Density

Foliage instances will be placed at this density, specified in instances per 1000x1000 unit area

Public variable

float

 

DensityAdjustmentFactor

The factor by which to adjust the density of instances.

Public variable

int32

 

DistributionSeed

The seed that determines placement of initial seeds.

Public variable

TArray< FName >

 

ExclusionLandscapeLayers

If layer names are specified, painting on landscape will exclude the foliage to areas of landscape without the specified layers painted

Public variable

FFloatInterval

 

GroundSlopeAngle

Foliage instances will only be placed on surfaces sloping in the specified angle range from the horizontal

Public variable

FFloatInterval

 

Height

The valid altitude range where foliage instances will be placed, specified using minimum and maximum world coordinate Z values

Public variable

uint64

 

HiddenEditorViews

Bitflag to represent in which editor views this foliage mesh is hidden.

Public variable

float

 

InitialSeedDensity

Specifies the number of seeds to populate along 10 meters.

Public variable

uint32: 1

 

IsSelected

Public variable

TArray< FName >

 

LandscapeLayers

If layer names are specified, painting on landscape will limit the foliage to areas of landscape with the specified layers painted

Public variable

FLightingChanne...

 

LightingChannels

Lighting channels that placed foliage will be assigned.

Public variable

ELightmapType

 

LightmapType

Controls the type of lightmap used for this component.

Public variable

FVector

 

LowBoundOriginRadius

X, Y is origin position and Z is radius...

Public variable

float

 

MaxAge

Specifies the oldest a seed can be.

Public variable

float

 

MaxInitialAge

Allows a new seed to be older than 0 when created.

Public variable

float

 

MaxInitialSeedOffset

The seed that determines placement of initial seeds.

Public variable

FBoxSphereBound...

 

MeshBounds

Public variable

float

 

MinimumExclusionLayerWeight

Specifies the minimum value above which the landscape exclusion layer weight value must be, in order for foliage instances to be excluded in a specific area

Public variable

float

 

MinimumLayerWeight

Specifies the minimum value above which the landscape layer weight value must be, in order for foliage instances to be placed in a specific area

Public variable

TEnumAsByte< EC...

 

Mobility

Mobility property to apply to foliage components

Public variable

int32

 

NumSteps

The number of times we age the species and spread its seeds.

Public variable

float

 

OverlapPriority

When two instances overlap we must determine which instance to remove.

Public variable

int32

 

OverriddenLightMapRes

Overrides the lightmap resolution defined in the static mesh

Public variable

FFloatInterval

 

ProceduralScale

The scale range of this type when being procedurally generated. Configured with the Scale Curve.

Public variable

float

 

Radius

The minimum distance between foliage instances

Public variable

float

 

RandomPitchAngle

A random pitch adjustment can be applied to each instance, up to the specified angle in degrees, from the original vertical

Public variable

uint32: 1

 

RandomYaw

If selected, foliage instances will have a random yaw rotation around their vertical axis applied

Public variable

uint32: 1

 

ReapplyAlignToNormal

If checked, foliage instances will have their normal alignment adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyCollisionWithWorld

If checked, foliage instances will have an overlap test with the world reapplied, and overlapping instances will be removed by the Reapply tool

Public variable

uint32: 1

 

ReapplyDensity

If checked, the density of foliage instances already placed will be adjusted by the density adjustment factor.

Public variable

uint32: 1

 

ReapplyGroundSlope

If checked, foliage instances not meeting the ground slope condition will be removed by the Reapply too

Public variable

uint32: 1

 

ReapplyHeight

If checked, foliage instances not meeting the valid Z height condition will be removed by the Reapply tool

Public variable

uint32: 1

 

ReapplyLandscapeLayers

If checked, foliage instances painted on areas that do not have the appropriate landscape layer painted will be removed by the Reapply tool

Public variable

uint32: 1

 

ReapplyRadius

If checked, foliage instances not meeting the new Radius constraint will be removed

Public variable

uint32: 1

 

ReapplyRandomPitchAngle

If checked, foliage instances will have their pitch adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyRandomYaw

If checked, foliage instances will have their yaw adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyScaleX

If checked, foliage instances will have their X scale adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyScaleY

If checked, foliage instances will have their Y scale adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyScaleZ

If checked, foliage instances will have their Z scale adjusted by the Reapply tool

Public variable

uint32: 1

 

ReapplyScaling

If checked, foliage instances will have their scale adjusted to fit the specified scaling behavior by the Reapply tool

Public variable

uint32: 1

 

ReapplyVertexColorMask

If checked, foliage instances no longer matching the vertex color constraint will be removed by the Reapply too

Public variable

uint32: 1

 

ReapplyZOffset

If checked, foliage instances will have their Z offset adjusted by the Reapply tool

Public variable

TArray< URuntim...

 

RuntimeVirtualTextures

Array of runtime virtual textures into which we draw the instances.

Public variable

FRuntimeFloatCu...

 

ScaleCurve

Instance scale factor as a function of normalized age (i.e. Current Age / Max Age).

Public variable

FFloatInterval

 

ScaleX

Specifies the range of scale, from minimum to maximum, to apply to a foliage instance's X Scale property

Public variable

FFloatInterval

 

ScaleY

Specifies the range of scale, from minimum to maximum, to apply to a foliage instance's Y Scale property

Public variable

FFloatInterval

 

ScaleZ

Specifies the range of scale, from minimum to maximum, to apply to a foliage instance's Z Scale property

Public variable

EFoliageScaling

 

Scaling

Specifies foliage instance scaling behavior when painting.

Public variable

int32

 

SeedsPerStep

The number of seeds an instance will spread in a single step of the simulation.

Public variable

float

 

ShadeRadius

The ShadeRadius determines when two instances overlap.

Public variable

float

 

SingleInstanceModeRadius

The radius used in single instance mode to detect collision with other instances

Public variable

float

 

SpreadVariance

Specifies how much seed distance varies from the average.

Public variable

int32

 

TranslucencySortPriority

Translucent objects with a lower sort priority draw behind objects with a higher priority.

Public variable

FGuid

 

UpdateGuid

A GUID that is updated every time the foliage type is modified, so foliage placed in the level can detect the FoliageType has changed.

Public variable

FFoliageVertexC...

 

VertexColorMaskByChannel

Public variable

int32

 

VirtualTextureCullMips

Number of lower mips in the runtime virtual texture to skip for rendering this primitive.

Public variable

ERuntimeVirtual...

 

VirtualTextureRenderPassType

Controls if this component draws in the main pass as well as in the virtual texture.

Public variable

FFloatInterval

 

ZOffset

Specifies a range from minimum to maximum of the offset to apply to a foliage instance's Z location

Constructors

Name Description

Public function

UFoliageType

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

FName

 

GetDisplayFName()

Nice and clean name for user interface

Public function Const

float

 

GetInitAge

(
    FRandomStream& RandomStream
)

Public function Const

float

 

GetMaxRadius()

Public function Const

float

 

GetNextAge

(
    const float CurrentAge,
    const int32 NumSteps
)

Public function Const

float

 

GetRadius

(
    bool bInSingleInstanceMode
)

Public function Const

FVector

 

GetRandomScale()

Public function Const

float

 

GetScaleForAge

(
    const float Age
)

Public function Const

float

 

GetSeedDensitySquared()

Public function Virtual Const

UObject *...

 

GetSource()

Gets/Sets the source data associated with this FoliageType

Public function Const

bool

 

GetSpawnsInShade()

Public function Virtual Const

bool

 

IsFoliageReallocationRequiredForPropertyChange

(
    const FProperty* Property
)

Lets subclasses decide if the InstancedFoliageActor should reallocate its instances if the specified property change event occurs

Public function Virtual Const

bool

 

IsNotAssetOrBlueprint()

Public function Virtual Const

bool

 

IsSourcePropertyChange

(
    const FProperty* Property
)

Public function

void

 

OnHiddenEditorViewMaskChanged

(
    UWorld* InWorld
)

Notifies all relevant foliage actors that HiddenEditorView mask has been changed

Public function Virtual

void

 

SetSource

(
    UObject* InSource
)

Public function Virtual

void

 

UpdateBounds()

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreEditChange

(
    FProperty* PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Deprecated Variables

Name Description

Public variable

uint32: 1

 

bEnableStaticLighting_DEPRECATED

  1. Now use the Mobility setting to control static/dynamic lighting

Public variable

FName

 

LandscapeLayer_DEPRECATED

Public variable

TEnumAsByte< en...

 

VertexColorMask_DEPRECATED

When painting on static meshes, foliage instance placement can be limited to areas where the static mesh has values in the selected vertex color channel(s).

Public variable

uint32: 1

 

VertexColorMaskInvert_DEPRECATED

When unchecked, foliage instances will be placed only when the vertex color in the specified channel(s) is above the threshold amount.

Public variable

float

 

VertexColorMaskThreshold_DEPRECATED

Specifies the threshold value above which the static mesh vertex color value must be, in order for foliage instances to be placed in a specific area

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss