shown in other instead.
Creating Weather Effects
Creating atmospheric effects is essentially an artistic task. You can simulate different weather conditions using only the UnigineEditor functionality, unless you need some kind of interaction or complex smooth transitions. This article describes common ways to create such effects in UNIGINE.
Raindrops and Snowfall#
Raindrops and snowfall effects are similar and usually simulated using Particle Systems.
Check out the particles_rain_effect world of the Art Samples demo (the art_samples > particles > particles_rain_effect world) showcasing a rain effect. You can open it in UnigineEditor and see how it is made. For optimization purposes, this sample controls attachment of the particle systems to the camera via scripting to spawn raindrops only in some local area around the player.
Lightning can be simulated in many ways; the most common approach is an emissive Billboard or a mesh depending on the required level of quality. To emulate randomly occuring lightning strikes, you can configure a random Period for billboard-based particles and use a Texture Atlas containing different lightning images.
A more complex solution, including shaders and programming, may be required to simulate how highly-detailed lightning affects the scene lighting.
To simulate fog, take a look at the Environment Haze settings. This feature is great for enriching the scene with mist and dense fog with support for height-dependent density.
Stormy sea can be implemented using the Global Water waves: you can use a set of predefined Beaufort waves with a smooth transition between the sea states, or customize waves according to your needs.
Waves can also be controlled via code. A set of the Water Global samples in the CPP Samples suite included in the SDK demonstrates how to use C++ API to control Global Water and fetch water level at a given point simulating a water splash at a point of contact with a boat or another object.
Wind is a rather compound effect; there are no global wind settings affecting all the content in the project world. The wind effect could be broken into the following components:
Vegetation animation. There are several approaches to animate plants affected by wind requiring certain adjustments when modeling geometry. Check out these tutorials:
- Physical Wind affecting physical objects and particles with mass.
- Dust and small flying props can also be made via Particle Systems.
- Storm at water and movement of clouds is done in the settings of these objects and their materials.
More complex effects like water droplets and streaks on the camera lens, splashes in puddles, screen frost, and windshield wiper effect require shader coding and are provided in the Weather Add-on available starting with the Engineering SDK (Windows only).