Render simple volumetric fog.
- [Instructor] To begin the chapter on rendering let's add a simple fog atmosphere to this exterior shot. The effect we want to achieve is atmospheric perspective where objects in the distance are lower contrast due to atmospheric scattering in the air. Let's render the camera view, clicking it to give focus. And go to the menus and choose Arnold, Render. The Arnold render view shows the exterior scene with no fog applied. Now open the render settings.
You can do that from status line. Render settings and then the Arnold render tab Open up the environment section. Inside here, you'll see two slots for maps. The background legacy slot is only there for backward compatibility with pervious versions of Arnold. We don't need this background field anymore because the skydome light does everything we need. We want to apply an atmosphere here to the scene.
So click on Create Render Note. And from the pop up dialogue choose Create AI fog. The fog's created. We want to select the AI fog. It looks like it is already selected. We can see in the channel box, but just to make sure, you can click on the Go to Input Node button here. And launch the attributes editor, if it's not already open. You can right click anywhere in a view port and use control a to open the attributes.
Just to make sure we don't lose these attributes let's copy the tab. Now I've got a separate window with the AI fog and I can close these other windows. And just focus in on the AI fog attributes. Regardless of what's selected in my view. In the fog attributes, we've got the most important one which is the ground normal. This determines the direction of a gradient. AI fog always creates a gradient. And the ground normal determines the direction for that.
We want the gradient to be based on altitude which is the Y axis in Maya. So the ground normal Y attributes, which is the middle column, to a value of one. And press tab and set the Z attribute to zero. And now, we don't see it, but the fog is actually vertical and we can look at that a little bit better if we use the front view port. So close the Arnold render view. Click in the front view port to activate it.
And reopen the Arnold render view from Arnold render. If you get the camera rendering again, go up to the pull down list and choose Front. And now we can see there's a line and it's below the landscape and that's the fog. We can get in closer. We can use the mouse wheel in the front view port and the Alt and middle mouse button. Get in really close on that. And as it renders, we can see there's a little bit of a soft edge or a gradient there The effect we want to achieve with atmospheric perspective is a more or less uniform fog spread throughout the scene.
And to achieve that with AI fog, we have to adjust the parameters and first we need to understand how those parameters work. We have distance and height. Actually neither one of these is related to distance directly. Distance is actually the density of the fog and higher values are more dense. The height is the rate of decay for a gradient. The fog falls off to zero according to an exponential factor and that's determined by the height attribute and it's not actually distance, the greater values for height will in fact increase the height, it's just not in world units.
Let's try it We'll increase the height value to 100. And dolly back in the front view of it. And now we can see our fog pushing up into the landscape. AI fog always has that gradient and you can't create a solid block of fog that's uniformly dense. Use a Maya classic fluid for that or connect an Arnold standard volume to the shading group of an object. But AI fog is so much simpler to set up once we understand it's limitations and work with them.
The ground point, here, is the location where the fog gradient begins. And the density begins to fall off. At the ground point, the fog is at maximum density. And above the ground point, the fog falls exponentially at a rate determined by the height attribute. We can bring the ground point down a little bit. Let's set that to a value of negative 100. So it looks like the ground point needs to move down quite a lot. And in order to get a nice thin fog, we only want this top layer.
So the height is going to be very, very large. So both of these values need to be increased into the ten or hundreds of thousands. Let's switch back to our camera shape, over in the Arnold render view. Let's set the height to 20,000. And we've got a perfectly solid white screen but let's bring that ground point down quite a lot. Set that to a value of negative 120,000 and press enter. And now, we've got a uniform fog, but it's just too thick.
Let's reduce the density, by setting the distance down to a value of 0.002. And now we've got a very nice atmospheric perspective effect. Here's a full screen rendering, before and after applying the AI fog atmosphere. And that's now to add fog to a scene with Arnold.
- Arnold rendering concepts
- Lighting with Maya and Arnold lights
- Controlling exposure
- Filtering light with Gobo
- Light attenuation with Decay
- Image-based lighting with Skydome
- Exterior daylight with Physical Sky
- Arnold Standard Surface material attributes
- Mapping material attributes
- Rendering refractions
- Mesh subdivision and displacement at render time
- Shading effects such as ambient occlusion and vertex color
- Camera effects such as fisheye and depth of field
- Animation image sequence rendering