Rain can be an essential part of your level. There are some advanced rain techniques available to you within the CryENGINE that will allow you to enable object interaction with the rain and localized wet areas. This recipe will change a map to a rainy scene.
There are two distinct techniques to achieve rain in the CryENGINE. The following example will explore both the particle-only technique and the deferred rain entity.
We will begin by using the particle-only technique to create our first rain:
rain.rain.space_loop = (libName).(subfolderName).(effectName)
The next effect we will use is the PostEffect Rain that is new to CryENGINE 3. This is a rain effect entity that will apply a post effect within its radius. These entities are placed just like normal entities:
This type of entity is best suited for large, out-of-door types of settings.
The Post Effect entity renders on all objects and players in its radius. The underside of objects will remain dry, and objects can be adjusted in real time to show how the rain runs down slanted surfaces.
The advantage of the this entity over the simple space loop particle effect or using the wet layer on objects is that all objects within the radius of the entity are affected and can be changed or dynamically modified in real time. Objects can even be half in and half outside of the light's radius. Crytek developed a genius solution in CryENGINE 3 where areas underneath objects that would be obstructed by "real" rain are indeed occluded of the wet effect. The full screen rain effect will automatically disable if objects are seen in screen space to be above the player that would occlude the rain.
You may have noticed some other Atmospheric entities available to you. The following explains some of the ones that pertain directly to a stormy or rainy environment.
Add the Lightning entity to your level from the Entity/Environment section. This will enhance the rain and storm effect by adding a procedural particle and light effect, which can be adjusted to suit most situations.
Apply the sounds | environment:fantasy:distant_thunder_oneshot to hear a thunder sound after every lighting effect. Then edit the delay to simulate the distance to the effect.
The global wind speed can be adjusted by entering the numbers (values in meter/second) into the Environment settings wind vector field (positive y values determine fast wind to the north, negative y to the south, positive x to the east, and negative x to the west).
This can be important as all plants and entities that have wind bending properties will react to this and can be used to simulate strong storms.
The Fog entity is used to overwrite the fog effect in specific areas. In the indoor areas, a subtle fog effect can be added to simulate a dusty area. To use, create an Area Box and attach the Area Box to the Fog entity. When in game mode, you can walk into the area and see how the fog gets different inside. Outside the game mode, the fog is not visible.
18.189.171.125