unreal.GrassVariety¶
- class unreal.GrassVariety(grass_mesh: StaticMesh = Ellipsis, override_materials: None = [], grass_density: PerPlatformFloat = Ellipsis, grass_density_quality: PerQualityLevelFloat = Ellipsis, use_grid: bool = False, placement_jitter: float = 0.0, start_cull_distance: PerPlatformInt = Ellipsis, start_cull_distance_quality: PerQualityLevelInt = Ellipsis, end_cull_distance: PerPlatformInt = Ellipsis, end_cull_distance_quality: PerQualityLevelInt = Ellipsis, min_lod: int = 0, allowed_density_range: FloatInterval = Ellipsis, scaling: GrassScaling = Ellipsis, scale_x: FloatInterval = Ellipsis, scale_y: FloatInterval = Ellipsis, scale_z: FloatInterval = Ellipsis, weight_attenuates_max_scale: bool = False, max_scale_weight_attenuation: float = 0.0, random_rotation: bool = False, align_to_surface: bool = False, align_to_triangle_normals: bool = False, use_landscape_lightmap: bool = False, lighting_channels: LightingChannels = Ellipsis, receives_decals: bool = False, affect_distance_field_lighting: bool = False, cast_dynamic_shadow: bool = False, cast_contact_shadow: bool = False, keep_instance_buffer_cpu_copy: bool = False, shadow_cache_invalidation_behavior: ShadowCacheInvalidationBehavior = Ellipsis)¶
Bases:
StructBaseGrass 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)align_to_triangle_normals(bool): [Read-Write] When aligning to the surface when using grid mode, whether we should align to triangle normal (true) or a smooth grid-based normal (false). Halton always uses triangle normal.allowed_density_range(FloatInterval): [Read-Write] Specifies the density range where the grass variety is allowed to be spawned ([0,1] represents the entire range).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 reasonskeep_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.max_scale_weight_attenuation(float): [Read-Write] Modulate the scale of the instances based on weight (normalized density). The weight range (ScaleWeightAttenuation, 1.0) maps to (scaleMin, scaleMax), weight values less than ScaleWeightAttenuation are set to minScalemin_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 propertyscale_y(FloatInterval): [Read-Write] Specifies the range of scale, from minimum to maximum, to apply to a grass instance’s Y Scale propertyscale_z(FloatInterval): [Read-Write] Specifies the range of scale, from minimum to maximum, to apply to a grass instance’s Z Scale propertyscaling(GrassScaling): [Read-Write] Specifies grass instance scaling typeshadow_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.weight_attenuates_max_scale(bool): [Read-Write] If enabled the the scale of instances is reduced as the weight (density) decreases
- property affect_distance_field_lighting: bool¶
[Read-Only] Controls whether the primitive should affect dynamic distance field lighting methods.
- Type:
(bool)
- property align_to_surface: bool¶
[Read-Only] Whether the grass instances should be tilted to the normal of the landscape (true), or always vertical (false)
- Type:
(bool)
- property align_to_triangle_normals: bool¶
[Read-Only] When aligning to the surface when using grid mode, whether we should align to triangle normal (true) or a smooth grid-based normal (false). Halton always uses triangle normal.
- Type:
(bool)
- property allowed_density_range: FloatInterval¶
[Read-Only] Specifies the density range where the grass variety is allowed to be spawned ([0,1] represents the entire range).
- Type:
- property cast_contact_shadow: bool¶
[Read-Only] Whether the grass should cast contact shadows. *
- Type:
(bool)
- property cast_dynamic_shadow: bool¶
[Read-Only] Whether the grass should cast shadows when using non-precomputed shadowing. *
- Type:
(bool)
- property end_cull_distance: PerPlatformInt¶
[Read-Only] 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.
- Type:
- property end_cull_distance_quality: PerQualityLevelInt¶
[Read-Only]
- Type:
- property grass_density: PerPlatformFloat¶
[Read-Only] Instances per 10 square meters.
- Type:
- property grass_density_quality: PerQualityLevelFloat¶
[Read-Only]
- Type:
- property grass_mesh: StaticMesh¶
[Read-Only]
- Type:
- property keep_instance_buffer_cpu_copy: bool¶
[Read-Only] 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.*
- Type:
(bool)
- property lighting_channels: LightingChannels¶
[Read-Only] 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.
- Type:
- property max_scale_weight_attenuation: float¶
[Read-Only] Modulate the scale of the instances based on weight (normalized density). The weight range (ScaleWeightAttenuation, 1.0) maps to (scaleMin, scaleMax), weight values less than ScaleWeightAttenuation are set to minScale
- Type:
(float)
- property min_lod: int¶
[Read-Only] 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.
- Type:
(int32)
- property random_rotation: bool¶
[Read-Only] Whether the grass instances should be placed at random rotation (true) or all at the same rotation (false)
- Type:
(bool)
- property receives_decals: bool¶
[Read-Only] Whether the grass instances should receive decals.
- Type:
(bool)
- property scale_x: FloatInterval¶
[Read-Only] Specifies the range of scale, from minimum to maximum, to apply to a grass instance’s X Scale property
- Type:
- property scale_y: FloatInterval¶
[Read-Only] Specifies the range of scale, from minimum to maximum, to apply to a grass instance’s Y Scale property
- Type:
- property scale_z: FloatInterval¶
[Read-Only] Specifies the range of scale, from minimum to maximum, to apply to a grass instance’s Z Scale property
- Type:
- property scaling: GrassScaling¶
[Read-Only] Specifies grass instance scaling type
- Type:
- property shadow_cache_invalidation_behavior: ShadowCacheInvalidationBehavior¶
[Read-Only] Control shadow invalidation behavior, in particular with respect to Virtual Shadow Maps and material effects like World Position Offset.
- Type:
- property start_cull_distance: PerPlatformInt¶
[Read-Only] The distance where instances will begin to fade out if using a PerInstanceFadeAmount material node. 0 disables.
- Type:
- property start_cull_distance_quality: PerQualityLevelInt¶
[Read-Only]
- Type:
- property use_grid: bool¶
[Read-Only] If true, use a jittered grid sequence for placement, otherwise use a halton sequence.
- Type:
(bool)