Navigation
API > API/Runtime > API/Runtime/Landscape
| Name | FGrassVariety |
| Type | struct |
| Header File | /Engine/Source/Runtime/Landscape/Classes/LandscapeGrassType.h |
| Include Path | #include "LandscapeGrassType.h" |
Syntax
USTRUCT (BlueprintType )
struct FGrassVariety
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGrassVariety() |
LandscapeGrassType.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AlignToSurface | bool | Whether the grass instances should be tilted to the normal of the landscape (true), or always vertical (false) | LandscapeGrassType.h |
|
| AllowedDensityRange | FFloatInterval | Specifies the density range where the grass variety is allowed to be spawned ([0,1] represents the entire range). | LandscapeGrassType.h |
|
| bAffectDistanceFieldLighting | bool | Controls whether the primitive should affect dynamic distance field lighting methods. | LandscapeGrassType.h |
|
| bAlignToTriangleNormals | bool | When aligning to the surface when using grid mode, whether we should align to triangle normal (true) or a smooth grid-based normal (false). | LandscapeGrassType.h |
|
| bCastContactShadow | bool | Whether the grass should cast contact shadows. | LandscapeGrassType.h |
|
| bCastDynamicShadow | bool | Whether the grass should cast shadows when using non-precomputed shadowing. | LandscapeGrassType.h |
|
| bKeepInstanceBufferCPUCopy | bool | Whether we should keep a cpu copy of the instance buffer. | LandscapeGrassType.h |
|
| bReceivesDecals | bool | Whether the grass instances should receive decals. | LandscapeGrassType.h |
|
| bUseGrid | bool | If true, use a jittered grid sequence for placement, otherwise use a halton sequence. | LandscapeGrassType.h |
|
| bUseLandscapeLightmap | bool | Whether to use the landscape's lightmap when rendering the grass. | LandscapeGrassType.h |
|
| bWeightAttenuatesMaxScale | bool | If enabled the the scale of instances is reduced as the weight (density) decreases | LandscapeGrassType.h |
|
| EndCullDistance | FPerPlatformInt | The distance where instances will have completely faded out when using a PerInstanceFadeAmount material node. | LandscapeGrassType.h |
|
| EndCullDistanceQuality | FPerQualityLevelInt | LandscapeGrassType.h |
|
|
| GrassDensity | FPerPlatformFloat | Instances per 10 square meters. | LandscapeGrassType.h |
|
| GrassDensityQuality | FPerQualityLevelFloat | LandscapeGrassType.h |
|
|
| GrassMesh | TObjectPtr< UStaticMesh > | LandscapeGrassType.h |
|
|
| InstanceWorldPositionOffsetDisableDistance | uint32 | Distance at which to grass instances should disable WPO for performance reasons | LandscapeGrassType.h |
|
| LightingChannels | FLightingChannels | Lighting channels that the grass will be assigned. | LandscapeGrassType.h |
|
| MaxScaleWeightAttenuation | float | Modulate the scale of the instances based on weight (normalized density). | LandscapeGrassType.h |
|
| MinLOD | int32 | Specifies the smallest LOD that will be used for this component. | LandscapeGrassType.h |
|
| OverrideMaterials | TArray< TObjectPtr< class UMaterialInterface > > | LandscapeGrassType.h |
|
|
| PlacementJitter | float | LandscapeGrassType.h |
|
|
| RandomRotation | bool | Whether the grass instances should be placed at random rotation (true) or all at the same rotation (false) | LandscapeGrassType.h |
|
| ScaleX | FFloatInterval | Specifies the range of scale, from minimum to maximum, to apply to a grass instance's X Scale property | LandscapeGrassType.h |
|
| ScaleY | FFloatInterval | Specifies the range of scale, from minimum to maximum, to apply to a grass instance's Y Scale property | LandscapeGrassType.h |
|
| ScaleZ | FFloatInterval | Specifies the range of scale, from minimum to maximum, to apply to a grass instance's Z Scale property | LandscapeGrassType.h |
|
| Scaling | EGrassScaling | Specifies grass instance scaling type | LandscapeGrassType.h |
|
| ShadowCacheInvalidationBehavior | EShadowCacheInvalidationBehavior | Control shadow invalidation behavior, in particular with respect to Virtual Shadow Maps and material effects like World Position Offset. | LandscapeGrassType.h |
|
| StartCullDistance | FPerPlatformInt | The distance where instances will begin to fade out if using a PerInstanceFadeAmount material node. | LandscapeGrassType.h |
|
| StartCullDistanceQuality | FPerQualityLevelInt | LandscapeGrassType.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetDensity() |
LandscapeGrassType.h | ||
int32 GetEndCullDistance() |
LandscapeGrassType.h | ||
int32 GetStartCullDistance() |
LandscapeGrassType.h | ||
bool IsGrassQualityLevelEnable() |
LandscapeGrassType.h |