Studying a common use case – the rendering of volumetric clouds
So far, we have seen how ray marching allows us to create arbitrarily complex shapes based on SDFs and 3D surfaces. This makes it easy to create procedural scenes with solid shapes, like the ones shown in Figure 8.12.
But ray marching can also be taken one step further, to actually render 3D volumes. For example, thanks to this technique, we can create fairly realistic clouds like these ones:
Figure 8.13 – Volumetric clouds rendered on the scene skybox using ray marching
So, our goal here will be to create a material shader for the skybox of the scene, to have it display volumetric clouds similar to the ones shown in Figure 8.13.
In the following sections, we are going to implement our shader step by step and discuss how we can adapt our ray marching principles to the case of volume rendering. Then, we will see how we can use mathematical noise to create interesting shapes...