Altos Standalone Volumetric Cloud Rendering in Unity URP
November 16, 2022
Demonstration of Altos volumetric cloud rendering for Unity URP. This is in a standalone rendering environment separate from the rest of Altos’ features.
About the Altos Sky System for Unity
Altos is our complete sky system for Unity. This sky system includes a dynamic skybox, volumetric clouds, 2d clouds, skybox clouds, day and night cycle systems, sun and moon systems, as well as stunning night skies and distance-based fog -- all designed specifically for Unity URP. The dynamic skybox enables you to configure your sky to take on any custom colors based on the time of day described in our day night cycle system. The moon system operates completely independently from the sun system, so your moon can rest idle on the horizon, spin rapidly around your scene, or drift lazily through the sky.
As you might imagine, these aspects of the Altos skybox for Unity are mostly integrated closely with one another. The skybox needs to know the time of day in order to determine the correct sky colors, the moon and stars need to know how quickly time is passing in order to move through the sky correctly, and the fog needs to sample the skybox colors in order to integrate correctly and seamlessly with your scene.
That being said, we understand that many Unity game developers can find it difficult to integrate game assets from the Unity Asset Store into their existing projects. Our goal is to make it as easy as possible to pick and choose specific modules from our skybox system to integrate with your game, and for this integration to be as seamless as possible.
How to set up volumetric clouds without the rest of the Altos sky system
As part of that goal, we put together a short demo video that shows how Altos Volumetric Clouds for Unity URP can be rendered beautifully in a scene without any of the other sky systems normally included in a scene using Altos.
This video demonstrates a new demo scene with only a camera, a global post-processing volume, and the Altos volumetric cloud rendering volume. The skybox included in the sceen is rendered using Unity URP's built-in procedural skybox, which reacts naturally to changes in the time of day as expressed by the position of the main light in the scene.
As you can see in the video, we've added a small additional component to the main directional light in our Unity scene in order to overload some volumetric cloud shader parameters that would otherwise have been set by the other modules in the Altos sky system. You can check out the helper class (as originally written) on Github.
Having said that, there are a few watchouts to be aware of when using Altos volumetric cloud rendering in a standalone manner as described in this article. These watchouts are mentioned in the video, but I will also describe them here for your convenience.
Watchouts when using standalone volumetric cloud rendering for Altos
The Shader Variables used to set the light direction, fog color, and other parameters from the helper class are not part of the official Altos API. Therefore, they may be changed without warning even within non-major version changes of the asset. Therefore, make sure that you exercise caution when considering a version upgrade and carefully review the changelog when upgrading. If you do upgrade and find that something has broken, try checking the Shader Graph parameter names to attempt to identify whether this could be the cause.
Another consideration is that you will need to manually or dynamically set these shader variables yourself using data from your lighting environment. For example, you may need to manually reduce the sun intensity as the sun moves below the horizon. You may need to adjust the fog color based on your chosen fog color. You may also need to change the ambient lighting color based on your chosen skybox as well as the overall lighting conditions in your scene.
As you can see, we have put a great deal of effort into making Altos as modular as possible. In the future, we intend to continue to modularize the various components of this sky system as much as possible. We hope that increasing the modularity of this game asset will help game developers and small game studios more easily integrate this game asset, or components of this game asset, into your projects.
If you'd like to learn more about OccaSoftware and our other game assets for Unity, you can read more about our background on our About Us page.
Thanks for taking the time to read through this brief article discussing one of our best and favorite game assets, Altos - Volumetric Clouds and Sky System for Unity. We hope that this article was helpful!