A dynamic and robust real-time sky system developed for Unreal Engine 5, featuring seamless time-of-day transitions, volumetric clouds, and customizable lighting effects. Specifically designed to enhance immersion and realism in diverse 3Dgame environments.
Development Notes
The development goal is to design the Sky Blueprint to be modular and reusable, enabling seamless integration into any scene by simply dragging the actor into the level. I created a Sky Blueprint containing key components such as Directional Light, Sky Atmosphere, Skylight(enabled real time capture), Exponential Height Fog, and Post-Process Volume to establish foundational lighting. I also configured a global Post-Process Volume to disable auto exposure, ensuring consistent lighting for both day and night scenes.

Sky Blueprint full components

Weather system overall event graph
Day and Night Cycle
Integrated both the Construction Script and Event Graph into the Sky Blueprint to enable dynamic updates and adjustable properties during pre-runtime and runtime. Imported building assets and built an environment map with UE built-in water custom body to evaluate the sky system components. Added variables like Time of Day, Dawn Time, and Dusk Time, all exposed to the details panel for further adjusting. Used a remapping function (Map Range Unclamped) to control sun rotation based on Time of Day, defining key positions for sunrise, noon, and sunset.

Diagram illustrating the changes in Moon and Sun rotation angles (from Udemy UE weather system course slides)

Moon and Sun roatation BP function
Integrated Blueprint Macros into the Handle Visibility function and designed a Handle Night Settings function to control key properties such as directional light intensity, temperature, Rayleigh Scattering, Multi Scattering, and Ground Albedo. These adjustments ensured a balanced sky tint and brightness, creating a realistic nighttime atmosphere. Together, these features contributed to smooth and natural transitions between day and night cycles.(Click the inline link to view the full blueprint function)

Handle visibility function
My special modifications to make the day-night transition more realistic—for example, the moon becomes faintly visible at dusk, along with the setting sun:
For Handle Night Settings function, I added a moon texture, controlled through dynamic material parameters for size, rotation, brightness, and tint. Integrated logic to toggle moon visibility based on day-night cycles, like the star system. Improved sun and moon positioning by introducing a yaw rotation variable, allowing flexible adjustment of their positions in the sky. All key parameters, including moon scale, brightness, and tint, were exposed in the blueprint for real-time customization, enabling diverse lighting scenarios and enhancing the overall day-night cycle with user-friendly controls. Repeated this process to set up a sun texture.
Enhanced the dynamic sky system by integrating star visibility control tied to the time of day. Introduced a scalar parameter, "Is Star Visible," within the material graph using an if node for toggling star visibility. Developed a Dynamic Material Instance (DMI) in the blueprint to communicate with the material, enabling real-time adjustments. Key steps included:
1. Material Enhancements: Added the star texture and included parameters for tiling, panning speed, and brightness. Designed a noise-based mask to break up tiling patterns and achieve a more natural appearance.
2. Blueprint Integration: Created a new function called InitSkyShpereMaterial to initialize the material instance and link it to the sky sphere. Added logic in the Handle Night Settings function to toggle the stars based on a boolean variable ("Show Stars") exposed in the details panel.
3. Time of Day Synchronization: Automatically hide stars during daytime and ensured seamless transitions between day and night by dynamically adjusting the scalar parameter.
The implementations allowed for intuitive toggling of stars and improved overall visual fidelity by addressing both the behavior of stars and their appearance on the horizon.
Enhanced day-night cycle showcase
Cloud Systems: 2D and Volumetric Clouds
Implemented a robust 2D cloud system within the dynamic sky setup, using a Blueprint enumeration (E_CloudMode) to seamlessly switch between cloud modes. Created the 2D cloud material with configurable parameters for tiling, panning speed, brightness, and tint, enabling real-time customization through the material instance. These following improvements were achieved with simple shader math, adding robustness and visual clarity to the cloud system:
1. Achieved dynamic cloud movement using a Panner node with subtle animations for a realistic effect. Organized all parameters into 2D Clouds category for improved clarity.
2. Solved horizon and seam issues through shader adjustments ( Reused the existing star mask as a global control to eliminate clouds above the horizon, providing customizable control via the material instance. Utilized the UV mapping of the sky sphere to create a precise mask that removes clouds at the top of the sphere, ensuring a seamless appearance. )
3. Implemented dynamic tinting for 2D clouds using Sky Atmosphere View Luminance, allowed them to blend naturally with the sky's color. Introduced a Tint Strength parameter for the Sky Atmosphere, enabling customizable blending that automatically adjusts for day and night.
4. Polished the 2D cloud system by adding Blueprint logic to control visibility, panning speed, brightness, and tint strength based on the selected mode. Also used macros to manage parameters more efficiently and exposed key settings for real-time adjustments.

Cloud Mode Switch in Editor

2D Cloud Params Adjustment
Created a foundational volumetric cloud system by incorporating a volumetric cloud component to the dynamic sky actor. Created a custom volumetric cloud material with parameters for albedo, pattern scale, radius, softness, and texture channel selection. Implemented world-space projection for precise cloud placement and used a flexible 2D texture mask to define cloud shapes.
To make the clouds look more realistic, integrated a detailed 3D noise system using a 3D Noise Texture Object Parameter, which allows for flexible texture swapping and world-space projection. Designed 3D Noise Settings with adjustable scale, influence radius, and strength, enabling precise control over cloud erosion and shape customization. The 3D noise output was combined with the existing 2D texture mask through an additive approach. And key parameters were exposed in the material instance for real-time adjustments, allowing the creation of diverse cloud patterns.
Refined the volumetric cloud material by integrating advanced features. The following are the steps for these features:
1. Added a cloud sample attribute node to utilize altitude-based data, enabling precise control over cloud shapes and enhancing variation across cloud layers.
2. Created a dual 3D noise system by sampling noise textures twice—one for the upper cloud layer and one for the bottom, and they both have customizable scale, strength, and distortion parameters.
3. Used cached outputs from the upper noise to distort the bottom noise, creating more complex and realistic cloud patterns.
4. Implemented a macro variation material function, adding randomness and detail to cloud textures. Also added controls to toggle macro variation for performance optimization.
5. Optimized the material further by utilizing advanced output sockets, such as conservative density, for efficient ray marching, this can reduce computation in empty regions.
6. Exposed key settings like altitude mask, panning speed, and ambient occlusion in the material instance for real-time adjustments.
7. Introduced macro variation, implemented through a custom material function, which uses multi-sample texture tiling and blending to add additional randomness and complexity in the cloud shapes. This feature was also made toggleable with a switch parameter, allowing real-time adjustments for performance optimization.
Additionally, advanced scattering and occlusion settings were fine-tuned to achieve more customized cloud lighting. Optimization techniques such as ray marching were used to avoid rendering empty parts of the sky. Utilized the Conservative Density socket and an adjustable ambient occlusion parameter to refine self-shadowing effects and add depth to the clouds, making the cloud system adaptable to a wide range of environmental scenarios.

3D Cloud Param Adjustment
Troubleshooting Reference – Auto Exposure in UE5
Despite disabling auto exposure and changing exposure values manually, the scene would still gradually brighten over time. Here is the discussion I found helpful to fix this issue. link for the page
Despite disabling auto exposure and changing exposure values manually, the scene would still gradually brighten over time. Here is the discussion I found helpful to fix this issue. link for the page