Lumberyard
User Guide (Version 1.16)

Snow

This feature is in preview release and is subject to change.

You can use the Snow component to create snowfall effects and create patches of snow and ice on the terrain. You can add multiple Snow components to your entities in a level, but the level uses only one Snow component. The last Snow component to activate takes priority and Lumberyard renders that component.

To enable the Snow component, you must enable the Snow gem. For more information, see Snow Gem.


            Add the Snow component to your entity to enable snow
                effects in your level.

Note

If your level has a Snow and Rain component, the component that activates last takes priority; you cannot enable both Snow and Rain components at the same time.

Snow Component Properties

The Snow component has the following properties:

Enabled

Lets you specify whether snow effects are enabled.

Default value: True

Snow Surface

The Snow component has the following snow surface options:

Radius

Radius of snow on the surface.

Default: 50

Valid values: 0 to 1600

Snow Amount

Amount of snow on the surface.

Default: 10

Valid values: 0 to 100

Frost Amount

Amount of frost on the surface.

Default: 1

Valid values: 0 to 100

Surface Freezing

Intensity of the surface freezing effect.

Default: 1

Valid values: 0 to 100

Snowfall Options

The Snow component has following snowfall options:

Snowflake Count

Number of generated snowflakes.

Default: 100

Valid values: 0 to 10000

Snowflake Size

Size of the snowflakes.

Default: 2.5

Valid values: 0 to 100

Brightness

Brightness of the snowflakes.

Default: 3

Valid values: 0 to 100

Gravity Scale

Scale applied to the gravity that affects the snowflakes.

Default: 0.1

Valid values: 0 to 100

Wind Scale

Scale applied to the wind that affects the snowflakes.

Default: 0.1

Valid values: 0 to 100

Turbulence

Turbulence that is applied to the snowflakes.

Default: 0.1

Valid values: 0 to 100

Turbulence Frequency

Turbulence frequency that is applied to the snowflakes.

Default: 0.1

Valid values: 0 to 100

EBus Request Bus Interface

Use the following request functions with the EBus interface to communicate with other components of your game. You can use this EBus to communicate to an entity with a Snow component attached. The EB us is available at game time and editing, and can be accessed from C++, Lua, and the Script Canvas editor.

When set, the individual setters on this bus update the snow simulation immediately; this can cause some performance implications if you want to change multiple parameters. To avoid this, you can set multiple parameters at once with GetSnowOptions and SetSnowOptions.

For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) System.

Enable

Enables snow effects.

Parameters

None

Return

None

Scriptable

Yes

Disable

Disables snow effects.

Parameters

None

Return

None

Scriptable

Yes

Toggle

Toggles whether snow effects are enabled.

Parameters

None

Return

None

Scriptable

Yes

IsEnabled

Returns true if the snow effects are enabled.

Parameters

None

Return

Type: Boolean

Scriptable

Yes

SetRadius

Sets the radius of the snow surface.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetRadius

Returns the radius of the snow surface.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowAmount

Sets the amount of snow on the surface.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowAmount

Returns the amount of snow on the surface.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetFrostAmount

Sets the amount of frost on the surface.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetFrostAmount

Returns the amount of frost on the surface.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSurfaceFreezing

Sets the intensity of the freezing effect on the surface.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSurfaceFreezing

Returns the intensity of the freezing effect on the surface.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFlakeCount

Sets the number of snowflakes that are created.

Parameters

Type: AZ::u32

Return

None

Scriptable

Yes

GetSnowFlakeCount

Returns the number of snowflakes that are created.

Parameters

None

Return

Type: AZ::u32

Scriptable

Yes

SetSnowFlakeSize

Sets the size of snowflakes that are created.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFlakeSize

Returns the size of snowflakes that are created.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFlakeBrightness

Sets the brightness of the snowflakes.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFlakeBrightness

Returns the brightness of the snowflakes.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFlakeGravityScale

Sets the scale applied to the gravity that affects the snowflakes.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFlakeGravityScale

Returns the scale applied to the gravity that affects the snowflakes.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFallWindScale

Sets the scale applied to the wind that affects the snowflakes.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFallWindScale

Returns the scale applied to the wind that affects the snowflakes.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFallTurbulence

Sets the turbulence that is applied to the snowflakes.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFallTurbulence

Returns the turbulence that is applied to the snowflakes.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowFallTurbulenceFreq

Sets the turbulence frequency that is applied to the snowflakes.

Parameters

Type: Float

Return

None

Scriptable

Yes

GetSnowFallTurbulenceFreq

Returns the turbulence frequency that is applied to the snowflakes.

Parameters

None

Return

Type: Float

Scriptable

Yes

SetSnowOptions

Sets all options for the Snow component.

Parameters

SnowOptions

Return

None

Scriptable

Yes

GetSnowOptions

Returns a data structure that contains all options for the Snow component.

Parameters

None

Return

SnowOptions

Scriptable

Yes

UpdateSnow

Updates Lumberyard to use the Snow component as the base for snow effects.

The last Snow component that is called last takes priority; Lumberyard uses that component.

Parameters

None

Return

None

Scriptable

Yes

Example Snow Component Request Bus

function example:OnActivate() SnowComponentRequestBus.Event.SetFrostAmount(self.entityId, 10) SnowComponentRequestBus.Event.Toggle(self.entityId) end