Just as you can look at art history through the representation of clouds alone, from ancient Chinese clouds of Gong Xian to the Impressionistic swirls of Van Gogh, you can trace a lineage in video games from Super Mario’s Shigeru Miyamoto little puff balls to the clouds you parachute through at the start of PUBG.
Today we look at Avestan clouds. Our rendering team has recently overhauled this entire part of our gameworld. Why? It had been somewhat overlooked before now, and while we supported cloud shadows, there were none in the sky! This type of foundational rendering work will also be used for many parts of our game: volumetric rendering and weather systems, to name just a few.
Let’s have a look at how the first week of work on this feature looked for one of our engineers:
Putting clouds in the sky is pretty complex, as it turns out. Andrés, our Graphics Engineer, needed to implement volume ray-tracing, a rendering technique that samples volumetric media along a ray (or line) to compute how much it contributes to every pixel on the screen. With this information, we can composite the final color of the clouds on the screen in any situation, no matter if they’re far away or really close!
In the next video you can see that the shapes of clouds are now more complex. While this does not reflect the final shape in the game, it was useful for us to experiment with cloud shapes. These clouds are made by layering ‘noise’ in order to recreate natural-looking shapes. You can also see in the early part of the video that when you look at the sun we get a blooming effect in the clouds, kind of like a lens flare, and this comes from Mie scattering, a phenomenon that occurs when light travels through thick particles (like water droplets or dust).
Finally, in this third video marking the end of one week of work on this topic, you can see that clouds are now fully volumetric, colliding with objects as well as hiding them.
More development effort has been put into this feature, and while this doesn’t represent the final in-game results, it’s a nice representation of what a week of work looks like for one of our engineers!
Current state of clouds in-game, WIP