unreal.FoliageType

class unreal.FoliageType(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

Foliage Type

C++ Source:

  • Module: Foliage

  • File: FoliageType.h

Editor Properties: (see get_editor_property/set_editor_property)

  • affect_distance_field_lighting (bool): [Read-Write] Affect Distance Field Lighting: Controls whether the primitive should affect dynamic distance field lighting methods. This flag is only used if CastShadow is true.

  • affect_dynamic_indirect_lighting (bool): [Read-Write] Affect Dynamic Indirect Lighting: Controls whether the foliage should inject light into the Light Propagation Volume. This flag is only used if CastShadow is true.

  • align_max_angle (float): [Read-Write] Align Max Angle: The maximum angle in degrees that foliage instances will be adjusted away from the vertical

  • align_to_normal (bool): [Read-Write] Align to Normal: 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

  • average_normal (bool): [Read-Write] Average Normal: Will average normal based on Foliage Type base radius (this as a cost as it will do extra line traces)

  • average_normal_sample_count (int32): [Read-Write] Average Normal Sample Count: Line trace count to use around hit location when averaging normal

  • average_normal_single_component (bool): [Read-Write] Average Normal Single Component: Whether to discard normals originating from other hit components or not when averaging normals

  • average_spread_distance (float): [Read-Write] Average Spread Distance: The average distance between the spreading instance and its seeds. For example, a tree with an AverageSpreadDistance 10 will ensure the average distance between the tree and its seeds is 10cm

  • body_instance (BodyInstance): [Read-Write] Body Instance: Custom collision for foliage

  • can_grow_in_shade (bool): [Read-Write] Can Grow in Shade: If true, seeds of this type will ignore shade radius during overlap tests with other types.

  • cast_contact_shadow (bool): [Read-Write] Cast Contact Shadow: Whether the object should cast contact shadows. This flag is only used if CastShadow is true.

  • cast_dynamic_shadow (bool): [Read-Write] Cast Dynamic Shadow: Controls whether the foliage should cast shadows in the case of non precomputed shadowing. This flag is only used if CastShadow is true.

  • cast_shadow (bool): [Read-Write] Cast Shadow: Controls whether the foliage should cast a shadow or not.

  • cast_shadow_as_two_sided (bool): [Read-Write] Cast Shadow as Two Sided: Whether this foliage should cast dynamic shadows as if it were a two sided material.

  • cast_static_shadow (bool): [Read-Write] Cast Static Shadow: Whether the foliage should cast a static shadow from shadow casting lights. This flag is only used if CastShadow is true.

  • collision_radius (float): [Read-Write] Collision Radius: The CollisionRadius determines when two instances overlap. When two instances overlap a winner will be picked based on rules and priority.

  • collision_scale (Vector): [Read-Write] Collision Scale: The foliage instance’s collision bounding box will be scaled by the specified amount before performing the overlap check

  • collision_with_world (bool): [Read-Write] Collision with World: If checked, an overlap test with existing world geometry is performed before each instance is placed

  • cull_distance (Int32Interval): [Read-Write] Cull Distance: The distance where instances will begin to fade out if using a PerInstanceFadeAmount material node. 0 disables. When the entire cluster is beyond this distance, the cluster is completely culled and not rendered at all.

  • custom_depth_stencil_value (int32): [Read-Write] Custom Depth Stencil Value: Optionally write this 0-255 value to the stencil buffer in CustomDepth pass (Requires project setting or r.CustomDepth == 3)

  • custom_depth_stencil_write_mask (RendererStencilMask): [Read-Write] Custom Depth Stencil Write Mask: Mask used for stencil buffer writes.

  • custom_navigable_geometry (HasCustomNavigableGeometry): [Read-Write] Custom Navigable Geometry: Force navmesh

  • density (float): [Read-Write] Density: Foliage instances will be placed at this density, specified in instances per 1000x1000 unit area

  • density_adjustment_factor (float): [Read-Write] Density Adjustment Factor: The factor by which to adjust the density of instances. Values >1 will increase density while values <1 will decrease it.

  • density_falloff (FoliageDensityFalloff): [Read-Write] Density Falloff

  • distribution_seed (int32): [Read-Write] Distribution Seed: The seed that determines placement of initial seeds.

  • enable_density_scaling (bool): [Read-Write] Enable Density Scaling: Whether this foliage type should be affected by the Engine Scalability system’s Foliage scalability setting. Enable for detail meshes that don’t really affect the game. Disable for anything important. Typically, this will be enabled for small meshes without collision (e.g. grass) and disabled for large meshes with collision (e.g. trees)

  • enable_discard_on_load (bool): [Read-Write] Enable Discard on Load: Whether this foliage type should be discarded when CVarFoliageDiscardDataOnLoad is enabled.

  • evaluate_world_position_offset (bool): [Read-Write] Evaluate World Position Offset

  • exclusion_landscape_layers (Array[Name]): [Read-Write] Exclusion Landscape Layers: If layer names are specified, painting on landscape will exclude the foliage to areas of landscape without the specified layers painted

  • ground_slope_angle (FloatInterval): [Read-Write] Ground Slope Angle: Foliage instances will only be placed on surfaces sloping in the specified angle range from the horizontal

  • height (FloatInterval): [Read-Write] Height: The valid altitude range where foliage instances will be placed, specified using minimum and maximum world coordinate Z values

  • include_in_hlod (bool): [Read-Write] Include in HLOD

  • initial_seed_density (float): [Read-Write] Initial Seed Density: Specifies the number of seeds to populate along 10 meters. The number is implicitly squared to cover a 10m x 10m area

  • landscape_layers (Array[Name]): [Read-Write] Landscape Layers: If layer names are specified, painting on landscape will limit the foliage to areas of landscape with the specified layers painted

  • lighting_channels (LightingChannels): [Read-Write] Lighting Channels: Lighting channels that placed foliage will be assigned. Lights with matching channels will affect the foliage. These channels only apply to opaque materials, direct lighting, and dynamic lighting and shadowing.

  • lightmap_type (LightmapType): [Read-Write] Lightmap Type: Controls the type of lightmap used for this component.

  • max_age (float): [Read-Write] Max Age: Specifies the oldest a seed can be. After reaching this age the instance will still spread seeds, but will not get any older

  • max_initial_age (float): [Read-Write] Max Initial Age: Allows a new seed to be older than 0 when created. New seeds will be randomly assigned an age in the range [0,MaxInitialAge]

  • max_initial_seed_offset (float): [Read-Write] Max Initial Seed Offset: The seed that determines placement of initial seeds.

  • minimum_exclusion_layer_weight (float): [Read-Write] Minimum Exclusion Layer Weight: 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

  • minimum_layer_weight (float): [Read-Write] Minimum Layer Weight: 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

  • mobility (ComponentMobility): [Read-Write] Mobility: Mobility property to apply to foliage components

  • num_steps (int32): [Read-Write] Num Steps: The number of times we age the species and spread its seeds.

  • overlap_priority (float): [Read-Write] Overlap Priority: When two instances overlap we must determine which instance to remove. The instance with a lower OverlapPriority will be removed. In the case where OverlapPriority is the same regular simulation rules apply.

  • overridden_light_map_res (int32): [Read-Write] Overridden Light Map Res: Overrides the lightmap resolution defined in the static mesh

  • override_light_map_res (bool): [Read-Write] Override Light Map Res: Whether to override the lightmap resolution defined in the static mesh.

  • procedural_scale (FloatInterval): [Read-Write] Procedural Scale: The scale range of this type when being procedurally generated. Configured with the Scale Curve.

  • radius (float): [Read-Write] Radius: The minimum distance between foliage instances

  • random_pitch_angle (float): [Read-Write] Random Pitch Angle: A random pitch adjustment can be applied to each instance, up to the specified angle in degrees, from the original vertical

  • random_yaw (bool): [Read-Write] Random Yaw: If selected, foliage instances will have a random yaw rotation around their vertical axis applied

  • reapply_align_to_normal (bool): [Read-Write] Reapply Align to Normal: If checked, foliage instances will have their normal alignment adjusted by the Reapply tool

  • reapply_collision_with_world (bool): [Read-Write] Reapply Collision with World: If checked, foliage instances will have an overlap test with the world reapplied, and overlapping instances will be removed by the Reapply tool

  • reapply_density (bool): [Read-Write] Reapply Density: If checked, the density of foliage instances already placed will be adjusted by the density adjustment factor.

  • reapply_ground_slope (bool): [Read-Write] Reapply Ground Slope: If checked, foliage instances not meeting the ground slope condition will be removed by the Reapply too

  • reapply_height (bool): [Read-Write] Reapply Height: If checked, foliage instances not meeting the valid Z height condition will be removed by the Reapply tool

  • reapply_landscape_layers (bool): [Read-Write] Reapply Landscape Layers: If checked, foliage instances painted on areas that do not have the appropriate landscape layer painted will be removed by the Reapply tool

  • reapply_radius (bool): [Read-Write] Reapply Radius: If checked, foliage instances not meeting the new Radius constraint will be removed

  • reapply_random_pitch_angle (bool): [Read-Write] Reapply Random Pitch Angle: If checked, foliage instances will have their pitch adjusted by the Reapply tool

  • reapply_random_yaw (bool): [Read-Write] Reapply Random Yaw: If checked, foliage instances will have their yaw adjusted by the Reapply tool

  • reapply_scale_x (bool): [Read-Write] Reapply Scale X: If checked, foliage instances will have their X scale adjusted by the Reapply tool

  • reapply_scale_y (bool): [Read-Write] Reapply Scale Y: If checked, foliage instances will have their Y scale adjusted by the Reapply tool

  • reapply_scale_z (bool): [Read-Write] Reapply Scale Z: If checked, foliage instances will have their Z scale adjusted by the Reapply tool

  • reapply_scaling (bool): [Read-Write] Reapply Scaling: If checked, foliage instances will have their scale adjusted to fit the specified scaling behavior by the Reapply tool

  • reapply_vertex_color_mask (bool): [Read-Write] Reapply Vertex Color Mask: If checked, foliage instances no longer matching the vertex color constraint will be removed by the Reapply too

  • reapply_z_offset (bool): [Read-Write] Reapply ZOffset: If checked, foliage instances will have their Z offset adjusted by the Reapply tool

  • receives_decals (bool): [Read-Write] Receives Decals: Whether the foliage receives decals.

  • render_custom_depth (bool): [Read-Write] Render Custom Depth: If true, the foliage will be rendered in the CustomDepth pass (usually used for outlines)

  • runtime_virtual_textures (Array[RuntimeVirtualTexture]): [Read-Write] Runtime Virtual Textures: Array of runtime virtual textures into which we draw the instances. The mesh material also needs to be set up to output to a virtual texture.

  • scale_curve (RuntimeFloatCurve): [Read-Write] Scale Curve: Instance scale factor as a function of normalized age (i.e. Current Age / Max Age). X = 0 corresponds to Age = 0, X = 1 corresponds to Age = Max Age. Y = 0 corresponds to Min Scale, Y = 1 corresponds to Max Scale.

  • scale_x (FloatInterval): [Read-Write] Scale X: Specifies the range of scale, from minimum to maximum, to apply to a foliage instance’s X Scale property

  • scale_y (FloatInterval): [Read-Write] Scale Y: Specifies the range of scale, from minimum to maximum, to apply to a foliage instance’s Y Scale property

  • scale_z (FloatInterval): [Read-Write] Scale Z: Specifies the range of scale, from minimum to maximum, to apply to a foliage instance’s Z Scale property

  • scaling (FoliageScaling): [Read-Write] Scaling: Specifies foliage instance scaling behavior when painting.

  • seeds_per_step (int32): [Read-Write] Seeds Per Step: The number of seeds an instance will spread in a single step of the simulation.

  • shade_radius (float): [Read-Write] Shade Radius: The ShadeRadius determines when two instances overlap. If an instance can grow in the shade this radius is ignored.

  • single_instance_mode_override_radius (bool): [Read-Write] Single Instance Mode Override Radius: Option to override radius used to detect collision with other instances when painting in single instance mode

  • single_instance_mode_radius (float): [Read-Write] Single Instance Mode Radius: The radius used in single instance mode to detect collision with other instances

  • spawns_in_shade (bool): [Read-Write] Spawns in Shade: Whether new seeds are spawned exclusively in shade. Occurs in a second pass after all types that do not spawn in shade have been simulated. Only valid when CanGrowInShade is true.

  • spread_variance (float): [Read-Write] Spread Variance: Specifies how much seed distance varies from the average. For example, a tree with an AverageSpreadDistance 10 and a SpreadVariance 1 will produce seeds with an average distance of 10cm plus or minus 1cm

  • translucency_sort_priority (int32): [Read-Write] Translucency Sort Priority: Translucent objects with a lower sort priority draw behind objects with a higher priority. Translucent objects with the same priority are rendered from back-to-front based on their bounds origin. This setting is also used to sort objects being drawn into a runtime virtual texture.

    Ignored if the object is not translucent. The default priority is zero. Warning: This should never be set to a non-default value unless you know what you are doing, as it will prevent the renderer from sorting correctly. It is especially problematic on dynamic gameplay effects.

  • use_as_occluder (bool): [Read-Write] Use as Occluder: If enabled, foliage will render a pre-pass which allows it to occlude other primitives, and also allows it to correctly receive DBuffer decals. Enabling this setting may have a negative performance impact.

  • vertex_color_mask_by_channel (FoliageVertexColorChannelMask): [Read-Write] Vertex Color Mask by Channel

  • virtual_texture_cull_mips (int32): [Read-Write] Virtual Texture Cull Mips: Number of lower mips in the runtime virtual texture to skip for rendering this primitive. Larger values reduce the effective draw distance in the runtime virtual texture. This culling method doesn’t take into account primitive size or virtual texture size.

  • virtual_texture_render_pass_type (RuntimeVirtualTextureMainPassType): [Read-Write] Virtual Texture Render Pass Type: Controls if this component draws in the main pass as well as in the virtual texture.

  • visible_in_ray_tracing (bool): [Read-Write] Visible in Ray Tracing

  • world_position_offset_disable_distance (int32): [Read-Write] World Position Offset Disable Distance

  • z_offset (FloatInterval): [Read-Write] ZOffset: Specifies a range from minimum to maximum of the offset to apply to a foliage instance’s Z location

property affect_distance_field_lighting: bool

[Read-Only] Affect Distance Field Lighting: Controls whether the primitive should affect dynamic distance field lighting methods. This flag is only used if CastShadow is true.

Type:

(bool)

property affect_dynamic_indirect_lighting: bool

[Read-Only] Affect Dynamic Indirect Lighting: Controls whether the foliage should inject light into the Light Propagation Volume. This flag is only used if CastShadow is true.

Type:

(bool)

property align_max_angle: float

[Read-Write] Align Max Angle: The maximum angle in degrees that foliage instances will be adjusted away from the vertical

Type:

(float)

property align_to_normal: bool

[Read-Write] Align to Normal: 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

Type:

(bool)

property average_normal: bool

[Read-Write] Average Normal: Will average normal based on Foliage Type base radius (this as a cost as it will do extra line traces)

Type:

(bool)

property average_normal_sample_count: int

[Read-Write] Average Normal Sample Count: Line trace count to use around hit location when averaging normal

Type:

(int32)

property average_normal_single_component: bool

[Read-Write] Average Normal Single Component: Whether to discard normals originating from other hit components or not when averaging normals

Type:

(bool)

property cast_contact_shadow: bool

[Read-Only] Cast Contact Shadow: Whether the object should cast contact shadows. This flag is only used if CastShadow is true.

Type:

(bool)

property cast_dynamic_shadow: bool

[Read-Only] Cast Dynamic Shadow: Controls whether the foliage should cast shadows in the case of non precomputed shadowing. This flag is only used if CastShadow is true.

Type:

(bool)

property cast_shadow: bool

[Read-Only] Cast Shadow: Controls whether the foliage should cast a shadow or not.

Type:

(bool)

property cast_shadow_as_two_sided: bool

[Read-Only] Cast Shadow as Two Sided: Whether this foliage should cast dynamic shadows as if it were a two sided material.

Type:

(bool)

property cast_static_shadow: bool

[Read-Only] Cast Static Shadow: Whether the foliage should cast a static shadow from shadow casting lights. This flag is only used if CastShadow is true.

Type:

(bool)

property collision_scale: Vector

[Read-Write] Collision Scale: The foliage instance’s collision bounding box will be scaled by the specified amount before performing the overlap check

Type:

(Vector)

property collision_with_world: bool

[Read-Write] Collision with World: If checked, an overlap test with existing world geometry is performed before each instance is placed

Type:

(bool)

property custom_depth_stencil_value: int

[Read-Only] Custom Depth Stencil Value: Optionally write this 0-255 value to the stencil buffer in CustomDepth pass (Requires project setting or r.CustomDepth == 3)

Type:

(int32)

property custom_depth_stencil_write_mask: RendererStencilMask

[Read-Only] Custom Depth Stencil Write Mask: Mask used for stencil buffer writes.

Type:

(RendererStencilMask)

property evaluate_world_position_offset: bool

[Read-Only] Evaluate World Position Offset

Type:

(bool)

property exclusion_landscape_layers: Array[Name]

[Read-Write] Exclusion Landscape Layers: If layer names are specified, painting on landscape will exclude the foliage to areas of landscape without the specified layers painted

Type:

(Array[Name])

get_source() Object

Returns the source asset for a UFoliageType. It can be a UStaticMesh in case we’re dealing with a UFoliageType_InstancedStaticMesh, but it can be other types of objects.

Return type:

Object

property ground_slope_angle: FloatInterval

[Read-Write] Ground Slope Angle: Foliage instances will only be placed on surfaces sloping in the specified angle range from the horizontal

Type:

(FloatInterval)

property height: FloatInterval

[Read-Write] Height: The valid altitude range where foliage instances will be placed, specified using minimum and maximum world coordinate Z values

Type:

(FloatInterval)

property include_in_hlod: bool

[Read-Write] Include in HLOD

Type:

(bool)

property landscape_layers: Array[Name]

[Read-Write] Landscape Layers: If layer names are specified, painting on landscape will limit the foliage to areas of landscape with the specified layers painted

Type:

(Array[Name])

property lighting_channels: LightingChannels

[Read-Only] Lighting Channels: Lighting channels that placed foliage will be assigned. Lights with matching channels will affect the foliage. These channels only apply to opaque materials, direct lighting, and dynamic lighting and shadowing.

Type:

(LightingChannels)

property lightmap_type: LightmapType

[Read-Only] Lightmap Type: Controls the type of lightmap used for this component.

Type:

(LightmapType)

property minimum_exclusion_layer_weight: float

[Read-Write] Minimum Exclusion Layer Weight: 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

Type:

(float)

property minimum_layer_weight: float

[Read-Write] Minimum Layer Weight: 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

Type:

(float)

property mobility: ComponentMobility

[Read-Only] Mobility: Mobility property to apply to foliage components

Type:

(ComponentMobility)

property overridden_light_map_res: int

[Read-Only] Overridden Light Map Res: Overrides the lightmap resolution defined in the static mesh

Type:

(int32)

property override_light_map_res: bool

[Read-Only] Override Light Map Res: Whether to override the lightmap resolution defined in the static mesh.

Type:

(bool)

property random_pitch_angle: float

[Read-Write] Random Pitch Angle: A random pitch adjustment can be applied to each instance, up to the specified angle in degrees, from the original vertical

Type:

(float)

property random_yaw: bool

[Read-Write] Random Yaw: If selected, foliage instances will have a random yaw rotation around their vertical axis applied

Type:

(bool)

property receives_decals: bool

[Read-Only] Receives Decals: Whether the foliage receives decals.

Type:

(bool)

property render_custom_depth: bool

[Read-Only] Render Custom Depth: If true, the foliage will be rendered in the CustomDepth pass (usually used for outlines)

Type:

(bool)

property runtime_virtual_textures: Array[RuntimeVirtualTexture]

[Read-Write] Runtime Virtual Textures: Array of runtime virtual textures into which we draw the instances. The mesh material also needs to be set up to output to a virtual texture.

Type:

(Array[RuntimeVirtualTexture])

property translucency_sort_priority: int

[Read-Only] Translucency Sort Priority: Translucent objects with a lower sort priority draw behind objects with a higher priority. Translucent objects with the same priority are rendered from back-to-front based on their bounds origin. This setting is also used to sort objects being drawn into a runtime virtual texture.

Ignored if the object is not translucent. The default priority is zero. Warning: This should never be set to a non-default value unless you know what you are doing, as it will prevent the renderer from sorting correctly. It is especially problematic on dynamic gameplay effects.

Type:

(int32)

property use_as_occluder: bool

[Read-Only] Use as Occluder: If enabled, foliage will render a pre-pass which allows it to occlude other primitives, and also allows it to correctly receive DBuffer decals. Enabling this setting may have a negative performance impact.

Type:

(bool)

property virtual_texture_cull_mips: int

[Read-Only] Virtual Texture Cull Mips: Number of lower mips in the runtime virtual texture to skip for rendering this primitive. Larger values reduce the effective draw distance in the runtime virtual texture. This culling method doesn’t take into account primitive size or virtual texture size.

Type:

(int32)

property virtual_texture_render_pass_type: RuntimeVirtualTextureMainPassType

[Read-Only] Virtual Texture Render Pass Type: Controls if this component draws in the main pass as well as in the virtual texture.

Type:

(RuntimeVirtualTextureMainPassType)

property visible_in_ray_tracing: bool

[Read-Only] Visible in Ray Tracing

Type:

(bool)

property world_position_offset_disable_distance: int

[Read-Only] World Position Offset Disable Distance

Type:

(int32)

property z_offset: FloatInterval

[Read-Write] ZOffset: Specifies a range from minimum to maximum of the offset to apply to a foliage instance’s Z location

Type:

(FloatInterval)