Grass Setting

VFX Property

Grass VFX

Property
Type
Description

grassVfx

VisualEffect

The Visual Effect component that renders the grass. All other settings are pushed to this VFX via ApplyGrassSetting().


Initial Settings

circle-info

Initial Settings only run once when the grass instantiate. The other setting could be modify at realtime

Property
Type
Description

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

Property
Type
Description

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

circle-info

Grass color are blended with top and bottom color

Top Color

Property
Type
Description

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

Property
Type
Description

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

Property
Type
Description

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

Property
Type
Description

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, SizeNoiseFrequency

  • Mesh: IndividualScale, AddRandomScale, GrassTexture

  • Top color: TopColorOption, TopGradientTexture, TopNoiseFrequency, TopNoiseColor1, TopNoiseColor2

  • Bottom color: BottomColorOption, BottomGradientTexture, BottomNoiseFrequency, BottomNoiseColor1, BottomNoiseColor2

  • Wind: WindDirection, WindDensity, WindSpeed, WindStrength, WindSmoothless, WindHighlightOption, WindHighlightColor, WindHighlightStrength

  • Motion: MotionStrength

Last updated