unreal.GrassVariety

class unreal.GrassVariety

Bases: StructBase

Grass Variety

C++ Source:

  • Module: Landscape

  • File: LandscapeGrassType.h

Editor Properties: (see get_editor_property/set_editor_property)

  • affect_distance_field_lighting (bool): [Read-Write] Controls whether the primitive should affect dynamic distance field lighting methods.

  • align_to_surface (bool): [Read-Write] Whether the grass instances should be tilted to the normal of the landscape (true), or always vertical (false)

  • cast_contact_shadow (bool): [Read-Write] Whether the grass should cast contact shadows. *

  • cast_dynamic_shadow (bool): [Read-Write] Whether the grass should cast shadows when using non-precomputed shadowing. *

  • end_cull_distance (PerPlatformInt): [Read-Write] The distance where instances will have completely faded out when 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.

  • end_cull_distance_quality (PerQualityLevelInt): [Read-Write]

  • grass_density (PerPlatformFloat): [Read-Write] Instances per 10 square meters.

  • grass_density_quality (PerQualityLevelFloat): [Read-Write]

  • grass_mesh (StaticMesh): [Read-Write]

  • instance_world_position_offset_disable_distance (uint32): [Read-Write] Distance at which to grass instances should disable WPO for performance reasons

  • keep_instance_buffer_cpu_copy (bool): [Read-Write] Whether we should keep a cpu copy of the instance buffer. This should be set to true if you plan on using GetOverlappingXXXXCount functions of the component otherwise it won’t return any data.*

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

  • min_lod (int32): [Read-Write] Specifies the smallest LOD that will be used for this component. If -1 (default), the MinLOD of the static mesh asset will be used instead.

  • override_materials (Array[MaterialInterface]): [Read-Write] Material Overrides.

  • placement_jitter (float): [Read-Write]

  • random_rotation (bool): [Read-Write] Whether the grass instances should be placed at random rotation (true) or all at the same rotation (false)

  • receives_decals (bool): [Read-Write] Whether the grass instances should receive decals.

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

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

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

  • scaling (GrassScaling): [Read-Write] Specifies grass instance scaling type

  • shadow_cache_invalidation_behavior (ShadowCacheInvalidationBehavior): [Read-Write] Control shadow invalidation behavior, in particular with respect to Virtual Shadow Maps and material effects like World Position Offset.

  • start_cull_distance (PerPlatformInt): [Read-Write] The distance where instances will begin to fade out if using a PerInstanceFadeAmount material node. 0 disables.

  • start_cull_distance_quality (PerQualityLevelInt): [Read-Write]

  • use_grid (bool): [Read-Write] If true, use a jittered grid sequence for placement, otherwise use a halton sequence.

  • use_landscape_lightmap (bool): [Read-Write] Whether to use the landscape’s lightmap when rendering the grass.