As Blender 2.8 reached it’s completion, I was seeing more and more people exploring volumetric shaders in **Eevee**. Historically volumes have been very slow to render on CPU and even GPU render engines. But with **Eevee** and it’s almost real time rendering speeds, now you can experiment with volume shaders much easier than before. Seeing people create clouds and nebulas, I wanted to do some experiments and come up with my own solution on how to create fully procedural clouds. What’s cool is that the same shaders also work in Cycles. Slower of course, but producing much higher quality output if you need that (Volumetric rendering in Eevee is still quite crude and produces noticable banding artifacts).

After some experiments, I came up with few different approaches – all revolving around using Voronoi shader node (Intensity, Distance mode) for generating blobby or wispy features of the clouds.

Using the same basic principles, I created full cloudscape shader and single cloud shader. Cloudscape is useful for filling backgrounds, while single clouds can be put closer to camera for manual art direction. I did not polish these as it was more proof of concept for me that can be later massaged further for specific use cases (making them more stylized or more realistic, simulating more specific weather conditions and cloud types). If you are interested to dig around, you can dowload the file in the bottom of the post and play with it yourself.

In my first try I was trying to combine densities additively, but it was quite hard to create blob like structures. It was more useful for misty masses of clouds.

Much better approach was actually working with inverse densities and doing multiplication instead of addition. Simple fact that anything multiplied by a number close to 0 is also close to 0, was the key to this method.

Trying to explain the method in few sentences:

- We start by constructing some sort of gradient space with values from [
*1..N)*(where N > 1) (For example values from*1 to 10.0*). It can be vertical gradient for cloud layers or squashed spherical gradient for single cloud shape. (This gradient is how you control where there will be blobby features and where will be nothing) - We then multiply it with Voronoi noise (Intensity, Distance mode) (Voronoi noise must be in space [
*x..1]*where*x > 0 & x < 1.*This is how you control the influence of the blobs – if darkest parts of the voronoi noise are closer to 0, more influence it will have ).- In this step we can also introduce noise to voronoi texture coordinates to get distortion for more realistic clouds.
- To achieve wispy features, we can simply invert the Voronoi and do the multiplication. This works well on later iterations (small scale details).

- We repeat step 2 several times, each time using different Voronoi scale and smaller influence for multiplication.
- At the end we just
**invert**everything (*1.0-value*) and this is our**volume density**. After this, values larger than 1, become negative and are ignored by volume shader. You can also clamp them to 0 just to be sure.