Software: Corona Renderer 2.0
Corona Renderer 2 lets you simulate even more advanced volumetric effects than the previous versions. In this tutorial I’ll show you how to quickly create some fog with the help of procedural textures to vary the density and to control the height dynamically.
This method is perfect to limit the effect close to some areas of the image. In the image of the car I wanted to simulate some low haze rising from the asphalt. The first step is to create a geometry that will delimit the fog, in this case a simple box.
It’s crucial never to put the camera inside the box volume, otherwise the effect won’t work due to a limit of the render engine. Assign a Corona Volume Material to the box.
In order to achieve a clear haze you have to set a color of 220 RGB for Absorption Color and Scattering color. A pure white color (255 RGB) in the Absorption Color will make the haze disappear. This property is important and I’ll show you later how you can take advantage of it.
To control the density of the effect you have to adjust the Absorption Distance. The lower the value, the thicker the fog will be.
To improve the effect we need to control the height dynamically by simulating a gradient effect.
With the Corona Distance Texmap the material can recognize an object that will be the base and starting point of the haze and tweak its height.
Remember to change the Volume Mapping mode to “Inside Volume” when you put a texture in the Absorption color.
You can control the quality and computation speed of the texture inside the volume with the Step Size parameter. Higher values will lead to faster rendering but with a lower quality for the fog. There’s not a perfect value: some test must be done to find the best balanced setting. For this example I used a value of 100cm: it was quite fast and produced good results.
In the Corona Distance Texmap you have to define the object that will be recognized as the base. Add the plane of the road into the “Distance from” area.
To create the fading effect of the fog close to the ground you have to put two different colors in Color Near and Color Far settings. Color Near 220 RGB, Color Far 255 RGB. With these settings the fog will fade upwards.
To tweak the height there is the Distance Far value.
The result is still not satisfying because the haze is too uniform.
To introduce some variations in the density and height, it’s possible to use procedural textures: a Smoke map was used in this image. A Noise map works well too. The purpose is to create color variations that will substitute the single color value of the Color Near in the Corona Distance Texmap. This will lead to density variations; in correspondence with a pure white color in the Smoke Map, some holes will appear in the fog.
To better tweak the Smoke Map I added an Output node to change the contrast using the Curve editor. As you can see from the screenshot, I made sure that there were large areas of pure white to “pierce” the fog and I raised the value of blacks to prevent the visible mist from being too dark.
This is the result obtained:
Still not perfect. I want to randomize also the height of the fog using the same Smoke Map. Simply connect the Smoke Map to the Distance Scale Texmap value. The colors of the texture will act as a black and white mask for the Distance Far.
This is the final effect:
Following this method I simulated the low fog for the DeLorean image, tweaking dynamically the height and producing a more realistic effect than a simple uniform mist.
From this backstage image you can see that the fog is localized only close to the ground and above all it isn’t uniform in terms of density.
Have fun with Corona Renderer!