I was tasked with creating the shaders used for the dynamic sky and weather system, as well as building the Blueprint used to drive time of day and weather transitions (which was later ported to C++).
The sky, lighting, and fog colors are all artist driven. A series of time of day “stops” may be specified, each with an arbitrary time of day value and a series of settings for sky gradient, light colors, fog colors, ambient colors, etc.
Additionally, a table of weather settings can be specified. Each weather setting can control cloud cover, desaturate lighting, fog density, control the intensity of various VFX layers, etc.
A few layers of hand-painted horizon clouds are present, in addition to several overlapping layers of procedural noise-lookup-driven clouds to provide dynamic cloud cover. A light function is used to provide cloud shadows, driven using the global cloud cover value.
A particle effect was also used to implement a lens flare for the sun, using an occlusion query to mask the effect when the sun goes behind objects such as the clouds or scenery, with a special shader to transform each particle card according to the sun’s position in screen space.
Spirit Crossing also required a “storms” feature, separate from the regular weather system. Storms were meant to feel imposing and dangerous – to that end, I added a color overlay value to the storm weather preset which could be used to control the overall lighting mood, as well as adding a large “swirling storm clouds” layer. The storm preset also enables the lightning VFX layer as well as falling storm debris such as twigs and leaves.