Notifications
Fast Volumetric Cloud Rendering
Showcase
344
0
A project to implement fast and convincing volumetric clouds, in addition to a fully dynamic weather system.
Based on the work of the Horizon Zero Dawn team, I wanted to implement convincing and dynamic real-time clouds to Unity. Just like in Horizon: Zero Dawn, I wanted them to be fast to render, ideally as close to free in terms of frame cost as possible. This was accomplished by rendering clouds to a 1/8th resolution buffer, but then in order to maintain visual fidelity updating one out of every 4x4 block of pixels in a half resolution buffer using the 1/8th render buffer. This means it takes 16 frames to fully update the half-resolution buffer using an iterative update approach. In order to reduce visible blurring artifacts caused by this, the previous frame is reprojected onto the current frame using the camera's rotation, making temporal artifacts due to camera rotation nearly imperceptible. The clouds themselves are fully raymarched and volumetric, using precalculated perlin and worley noise to form the basic cloud shapes. In addition, a weather map is generated in a pixel shader using GPU simplex noise, designed as a function of position, time, and climate so that weather events roll over the player in real time (the player can watch storms approach from the horizon, for example). The CPU uses the same simplex noise algorithm to derive weather values and drive visual effects and sounds (thanks to Nathan Reed for helping me realize that I could swap out a float-based hash with an int-based hash to make this possible). The clouds are shown in the video running on Unity's Vulkan renderer. They have also been tested on DirectX 11, as well as WebGL 2.0 / GLES3.0.
Alan Stagner (Jet Fist Games)
Freelance General Developer - Programmer
8
Comments