Backstory: The dynamic weather system that I built on Grass on the Other Side is a comprehensive layered solution to lighting, vfx, gameplay, visuals that have a huge list of dependencies across the whole project. I hope to touch on the overview of how this entire system was built through this breakdown of the process.
Final Result:
Shot of Time of Day and dynamic weather in action
Overview of the dynamic weather system on Grass on the Other Side (GOTOS)
Volumetric Cloud System:
vlm cloud system is one of the biggest component of the weather system. Since GOTOS is a project set in exterior space, the sky can take up over 50% of the frame composition.
I use Unreal's Volumetric Cloud System to achieve the cloud component
Parameters like wind speed, direction and cloudiness value are derived from global parameters (Material parameter collections)
I use a second set of textures to generate Aurora Borealis and the system lerps between clouds and aurora based on conditions
The system also introduces randomness to sky composition by manipulating the individual layers of clouds to fade in and out. This creates combinations of different cloud types being painted in the sky
Overview of Volumetric Cloud Material
Wind System:
The wind system is mainly a collection of material functions that affect the properties of different aspects of the game.
Wind system driven by material functions so the code can be reused across different materials and assets but still customized per group
Driven by global material parameter collections for consistency
The same wind system affects clouds, foliage, particle effects, water flow direction, rain, snow, cloth simulation etc
Main wind material function and example of it being used in a material
Rain, Lightning, Snow:
Another big component is the rain and snow that ties in to the above system. As show in the overview diagram in the beginning, most of the system are interdependent. Rain and lightning was one of the biggest component that took a while to tie together.
System looks at user defined 'data table' to decide when to spawn rain, snow and lightning particles.
System spawns Niagara particles attached to player camera for rain and snow effects
Several material functions used to create water ripples and puddles across surfaces on every asset
Terrain is also treated with procedural puddles that fade in and out after the effects of rain
Wildlife like birds, fireflies spawn rate increase/decrease based on the weather conditions
Example of weather conditions driven by user created data table
Tie It All Together:
These individual systems only mean so much if there isn't a main foundation that is tying all these together and executing the conditions to see it come to life. And I do that using a blueprint called BP_UberTODControllerController. Uber controller is about 80% pure BP and 20% C++. I currently use C++ for accessing debug functions that help me iterate faster.
The Uber controller sits on the top of the hagiarchy where it communicates with all the different system involved above
All the variables on weather conditions, changes, timing, intensity are user defined and are set via Uber controller
Snippet of the BP_UberTODControllerController
Resources and packs used:
- Rain, snow and lightning particles: https://www.unrealengine.com/marketplace/en-US/product/ultra-dynamic-sky