Version:

Snow

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.

Contents

Turning Snow On or Off

You can toggle snow on or off in Lumberyard Editor by enabling or disabling AI/Physics, or by running or stopping the game.

To toggle snow effects on or off in Lumberyard Editor

  • Do one of the following:
    • On the bottom right of the viewport, click AI/Physics.
    • Choose Game, Enable Physics/AI.
    • Press Ctrl+P.
    • Press Ctrl+G to enter gameplay mode. Press Esc to stop the game.

Editing Snow Effects

You can edit snow effects only when the AI/Physics toggle is disabled.

To edit snow effects

  1. Disable AI/Physics.

  2. Make changes to the Snow component properties.

  3. Enable AI/Physics. After you reenable AI/Physics, your changes appear in the viewport.

Snow Component Properties

[Snow component properties to customize the snow effects in your level.]

The Snow component has the following properties:


PropertyDescription
EnabledSpecifies whether snow effects are enabled. Default value: True
RadiusRadius of snow on the surface. Default: 50 Valid values: 0 to 1600
Snow AmountAmount of snow on the surface. Default: 10 Valid values: 0 to 100
Frost AmountAmount of frost on the surface. Default: 1 Valid values: 0 to 100
Surface FreezingIntensity of the surface freezing effect. Default: 1 Valid values: 0 to 100
Snowflake CountNumber of generated snowflakes. Default: 100 Valid values: 0 to 10000
Snowflake SizeSize of the snowflakes. Default: 2.5 Valid values: 0 to 100
BrightnessBrightness of the snowflakes. Default: 3 Valid values: 0 to 100
Gravity ScaleScale applied to the gravity that affects the snowflakes. Default: 0.1 Valid values: 0 to 100
Wind ScaleScale applied to the wind that affects the snowflakes. Default: 0.1 Valid values: 0 to 100
TurbulenceTurbulence that is applied to the snowflakes. Default: 0.1 Valid values: 0 to 100
Turbulence FrequencyTurbulence 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, see Working with the Event Bus (EBus) system.


Request NameDescriptionParametersReturnScriptable
EnableEnables snow effects.NoneNoneYes
DisableDisables snow effects.NoneNoneYes
ToggleToggles whether snow effects are enabled.NoneNoneYes
IsEnabledReturns true if the snow effects are enabled.NoneType: BooleanYes
SetRadiusSets the radius of the snow surface.Type: FloatNoneYes
GetRadiusReturns the radius of the snow surface.NoneType: FloatYes
SetSnowAmountSets the amount of snow on the surface.Type: FloatNoneYes
GetSnowAmountReturns the amount of snow on the surface.NoneType: FloatYes
SetFrostAmountSets the amount of frost on the surface.Type: FloatNoneYes
GetFrostAmountReturns the amount of frost on the surface.NoneType: FloatYes
SetSurfaceFreezingSets the intensity of the freezing effect on the surface.Type: FloatNoneYes
GetSurfaceFreezingReturns the intensity of the freezing effect on the surface.NoneType: FloatYes
SetSnowFlakeCountSets the number of snowflakes that are created.Type: AZ::u32NoneYes
GetSnowFlakeCountReturns the number of snowflakes that are created.NoneType: AZ::u32Yes
SetSnowFlakeSizeSets the size of snowflakes that are created.Type: FloatNoneYes
GetSnowFlakeSizeReturns the size of snowflakes that are created.NoneType: FloatYes
SetSnowFlakeBrightnessSets the brightness of the snowflakes.Type: FloatNoneYes
GetSnowFlakeBrightnessReturns the brightness of the snowflakes.NoneType: FloatYes
SetSnowFlakeGravityScaleSets the scale applied to the gravity that affects the snowflakes.Type: FloatNoneYes
GetSnowFlakeGravityScaleReturns the scale applied to the gravity that affects the snowflakes.NoneType: FloatYes
SetSnowFallWindScaleSets the scale applied to the wind that affects the snowflakes.Type: FloatNoneYes
GetSnowFallWindScaleReturns the scale applied to the wind that affects the snowflakes.NoneType: FloatYes
SetSnowFallTurbulenceSets the turbulence that is applied to the snowflakes.Type: FloatNoneYes
GetSnowFallTurbulenceReturns the turbulence that is applied to the snowflakes.NoneType: FloatYes
SetSnowFallTurbulenceFreqSets the turbulence frequency that is applied to the snowflakes.Type: FloatNoneYes
GetSnowFallTurbulenceFreqReturns the turbulence frequency that is applied to the snowflakes.NoneType: FloatYes
SetSnowOptionsSets all options for the Snow component.SnowOptionsNoneYes
GetSnowOptionsReturns a data structure that contains all options for the Snow component.NoneSnowOptionsYes
UpdateSnowUpdates 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.NoneNoneYes

Example Snow Component Request Bus

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