Grass Setting

VFX Property
Grass VFX
grassVfx
VisualEffect
The Visual Effect component that renders the grass. All other settings are pushed to this VFX via ApplyGrassSetting().
Initial Settings
Initial Settings only run once when the grass instantiate. The other setting could be modify at realtime
maxGrassCount
int
Maximum number of grass instances (0β1,000,000).
applyGroundNormal
bool
Whether to align grass to ground normals.
grassMeshLod0
Mesh
Mesh used for LOD 0.
grassMeshLod1
Mesh
Mesh used for LOD 1.
randomSizeByNoise
Vector2
Min/max scale multiplier driven by noise (X = min, Y = max).
sizeNoiseFrequency
float
Frequency of the noise used for size variation.
Mesh Settings
grassTexture
Texture2D
Texture applied to the grass mesh.
individualScale
Vector3
Base scale per blade (X, Y, Z).
addRandomScale
Vector3
Random scale offset added per blade (X, Y, Z).
Color Settings
Grass color are blended with top and bottom color
Top Color
topColorOption
Enums
GroundColor β from ground; Gradient β from top gradient; Noise β from top noise.
topGradient
Gradient
Gradient used when topColorOption == Gradient. Sampled vertically (256Γ256 texture).
topNoiseFrequency
float
Noise frequency for top color when option is Noise.
topNoiseColor1
Color
First color for top noise blend.
topNoiseColor2
Color
Second color for top noise blend.
Bottom Color
bottomColorOption
Enums
GroundColor β from ground; Gradient β from bottom gradient; Noise β from bottom noise.
bottomGradient
Gradient
Gradient used when bottomColorOption == Gradient. Sampled vertically (256Γ256).
bottomNoiseFrequency
float
Noise frequency for bottom color when option is Noise.
bottomNoiseColor1
Color
First color for bottom noise blend.
bottomNoiseColor2
Color
Second color for bottom noise blend.
Wind Settings
windDirection
Vector2
Wind direction (X, Z in world space).
windDensity
float
Density/turbulence of wind.
windSpeed
float
Wind animation speed.
windStrength
float
Wind bend strength (0β2).
windSmoothless
float
Wind smoothing (0β5).
windHighlightOption
Enums
Simple β default highlight; CustomColor β use windHighlightColor.
windHighlightColor
Color
Highlight color when windHighlightOption == CustomColor.
windHighlightStrength
float
Intensity of wind highlight (0β200).
Motion Settings
motionStrength
float
General motion/bend strength for the grass.
Enums
TopColorOption / BottomColorOption:
GroundColor(0),Gradient(1),Noise(2).WindHighlightOption:
Simple(0),CustomColor(1).
VFX Property Names (Reference)
These names are passed to grassVfx.Set*() and must match the VFX Graph exposed properties:
Initial:
MaxGrassCount,ApplyGroundNormal,MeshLod0,MeshLod1,RandomSizeByNoise,SizeNoiseFrequencyMesh:
IndividualScale,AddRandomScale,GrassTextureTop color:
TopColorOption,TopGradientTexture,TopNoiseFrequency,TopNoiseColor1,TopNoiseColor2Bottom color:
BottomColorOption,BottomGradientTexture,BottomNoiseFrequency,BottomNoiseColor1,BottomNoiseColor2Wind:
WindDirection,WindDensity,WindSpeed,WindStrength,WindSmoothless,WindHighlightOption,WindHighlightColor,WindHighlightStrengthMotion:
MotionStrength
Last updated