Learn how to render simple volumetric fog.
- [Instructor] Atmosphere perspective gives a sense of scale to an exterior rendering by simulating haze in the environment. In Arnold, this is done through the render setup dialog. So open render setup. In the Arnold Renderer tab, scroll down a little bit into the Environment Background and Atmosphere section, and we got the Scene Atmosphere down at the bottom. And it says No Mat. Just click on that, and from the Material Map Browser, go to the Materials, Arnold, Atmosphere, and you wanna choose Fog.
Click OK. And now the material has been assigned to the scene atmosphere. Let's now go into the Material Editor, and drag that Fog node into the Material Editor view. Drag and drop, and choose Instance. Double click on that Material node, and rename it Fog Arnold. We have parameters such as the color, the distance, which is the density, which is the height of the fog.
Let's see what we get if we just rendered with these default parameters. I'm in production rendering mode, and I'm only rendering a small frame of only 240 pixels in height. Let's do production rendering. It's a draft quality rendering so it looks pretty fuzzy, but we can see that there is black fog that's hogging the ground here. We need to change these parameters. First and foremost, the distance which is the density can only go down to .01.
That's its lowest possible value. So let's take it all the way down to .01. Then the height is the thickness of the fog or the depth of the fog, and the direction of that is determined here by these three fields, x, y, and z. With an x of zero, y of zero, and z of one, the fog is in the z-axis of the world. And there would be a gradient here, and it'll fade from very dense at the bottom to less dense at the top, and eventually reaching zero by the time the height value is reached.
And the origin is where thar gradient begins or the thickest part of the fog. To get a good result with this, I want a very think layer of fog. Because of the density of the fog, even at its lowest value here, I need to just use the very top layer of a very thick column of fog. I'm gonna set the height to a value of 10,000. And then the origin, I'm gonna bias the fog down by a lot, by negative 70,000 in the z-axis.
So type that in that in here, negative 70,000. The result here is I have a very tall layer of fog, 10,000 in height, and then I'm biasing the fog down by 70,000. And let's go ahead and render that. In the rendering, we see that we're getting some fog. It's dimming the background. The foreground here is not affected very much, but the mountains and the sky in the background are being dimmed down, even though the color set to white here.
And what's happening is the exposure control is making this white color appear black because it's not just simply intense enough. But we can fix that with a color map node. So I can go to the Material Map Browser. I currently got it hidden, but I can go and open that back up again. And in the Maps section, under General, there's a Color Map. Drag that over into the view. And its sole purpose is to provide a color and simply connect its output to the Fog Arnold color input.
Then double click on that Color Map and rename it, call it Fog Color. First and foremost, we need to turn off this switch labeled Reverse Gamma. And it's designed to convert a color to linear space, but it's already in a linear space, so we don't need to do that. So, turn Reverse Gamma off. Then we have the actual color, click on that, and we'll set the hue to 0.6, saturation 0.3, and a value of one.
And then finally, we need to increase the Gain here, that's the key. If we only have a default gain of one, then this will always look black here. We're gonna turn the gain up to a high value of 1,000, making that fog a thousand times brighter. And we'll do another production render. And now we've got a very clear example of some haze or fog in the background. And that's how to apply atmospheric fog in the Arnold scene environment.
- Arnold rendering concepts
- Arnold lights such as quad, spot, and distant
- Modifying Arnold object properties
- Filtering light with the gobo filter modifier
- Image-based lighting with Skydome
- Daylight simulation with Physical Sky
- Arnold Standard Surface material parameters
- Diffuse, opacity, and bump mapping
- Rendering refractions with Transmission
- Building an Arnold shading network
- Test rendering with utility map
- Mesh subdivision and displacement at render time
- Atmospheric perspective with scene environment fog
- Rendering a spherical environment with VR Camera