Version:

Rain Gem

Rain Gem


This topic references tools and features that are legacy . If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line . To learn more about legacy features, see the Lumberyard Legacy Reference .

The Rain Gem creates realistic rain effects in your levels, including rain drops, puddles, mist, wet surfaces, and splashes. To enable the Rain Gem in your project, see Add modular features and assets with Gems.

This gem is a game object extension. On initialization, it preloads all textures listed in the raintextures.xml file.

[Image NOT FOUND]

Note
Place only a single Rain entity in your scene.

Placing Rain

You can place rain and customize it for your level by modifying properties for amount of puddles, strength and frequence of puddle ripples, quantity of rain, size and speed of the rain drops, and more.

To add rain to your level

  1. In the Rollup Bar, click Entity.

  2. Under Browser, expand Environment.

  3. Drag the Rain entity into your scene.

Configuring Rain

You can configure the rain’s properties under https://docs.aws.amazon.com/lumberyard/latest/legacyreference/entities-params-entity-params.html and Entity Properties.

Rain Entity Properties

PropertiesDescription
AmountSets overall amount of the rain entity’s various effects
DiffuseDarkeningSets the degree to which the rain darkens the surface diffuse
DisableOcclusionTurns off checking whether an object is under cover and should be occluded from rain
EnabledToggles the rain effect
IgnoreVisareasContinue to render rain when player is inside a vis area
PuddlesAmountSets the size and number of puddles that the rain creates
PuddlesMaskAmountSets the strength of the puddle mask to balance different puddle results
PuddlesRippleAmountSets the height and frequency of ripples in rain puddles
RadiusSets the area on which rain falls
RainDropsAmountSets the number of rain drops
RainDropsLightingSets the brightness of the rain drops
RainDropsSpeedSets the rate at which rain falls
SplashesAmountSets the degree of splashing on a surface

Using Console Variables for Rain

You can use the following console variables for the rain entity.

Rain Entity Console Variables

VariableDescription
r_RainEnables rain rendering
r_RainAmountSets rain amount
r_RainDistMultiplierMultiplier for the rain layer’s distance from the camera
r_RainDropsEffectEnables rain drops effect
r_RainIgnoreNearestDisables the layer showing the reflection of objects in rainy or wet areas nearest objects
r_RainMaxViewDistSets the maximum distance at which rain is visible
r_RainMaxViewDist_DeferredSets maximum distance (in meters) at which the deferred rain reflection layer is visible
r_RainOccluderSizeThresholdBlocks rain for objects bigger than this value

Using the Rain Sample

The Rain Sample uses the Rain, Clouds, and LightningArc gems to demonstrate how to use rain as an environment special effects (FX) in a level. The Lightning entity (from the LightningArc gem) shows how the lightning FX can enhance a rain storm with flashes of light and random strikes of lightning on the ground. The clouds are enabled to show how they can fill a scene.

[Image NOT FOUND]