Learn how to use surface distance to map parameters.
- [Instructor] Ambient occlusion is a shading effect that detects the distance between nearby surfaces. Ambient occlusion is not needed in a lighting context with Arnold, because the global illumination is brute force. It's calculated on every pixel. There's no need to add cracks and crevices with ambient occlusion like you might in a previous work flow. But ambient occlusion can still play a role in a shader network. For example, I want to apply a shading effect to this picture frame where the recessed areas will be a little bit darker, and AO is a perfect candidate for that task.
Do an active shade, select the prospective viewport, and click the ActiveShade button. Open up the material editor, and I've already got a material assigned to the frame, and it's called frame silver arnold standard. We can double-click on that to load its parameters. To make the demonstration quite clear, let's temporarily disconnect the bump map. In the view we can select the wire connecting the bump 2D node with the frame silver normal input.
Select that wire and press delete. Now we have no bump map there. Also, to make it easier to see, we'll just temporarily adjust a few parameters in the Arnold Standard surface itself. Bring the General Specular Reflection scale down to zero, and also set the Metalness to zero. Now we have a more diffuse surface and it will be easier for us to see the ambient occlusion effect. We'll apply it to the base color.
Click on the map button directly to the right of the base color swatch, and from the Material Map Browser go to Maps, Arnold, Surface, Ambient Occlusion, and double-click it. And now it's connected. We don't see much at first. Let's select the Ambient Occlusion node, double-click it. Rename it. Call it frame silver occlusion. In the parameters we have a white and black color.
Let's set those to really obvious primary colors. Click on white, and set that to a bright green. Bring down the red and blue channels to nothing. We'll also set the black color temporarily, click on that color swatch, and increase the Red channel up to its maximum. And click OK. In the ActiveShade we can see we're getting some shading on the frame. In the parameters, the most important switch actually is at the bottom, Self Only.
Right now, the ambient occlusion is detecting the distances between all surfaces in the scene. And the wall behind the frame is affecting the shading, as is the matte and the picture itself. To make this shading effect purely local, set the Self Only flag to on, and now the wall and the other objects don't affect the shading. In this case, it's also very helpful to enable the Invert Normals switch.
And once that's on we can start playing around with the Far Clip and Near Clip. And these are the distances for the two colors. And let's bring the Far Clip way down. We can drag that way down into the ones, and we'll start to see an effect in the active shade. Let's set the Far Clip to 2.5. Also increase the Near Clip a little bit. Drag that up just a bit into the range of about one.
Type in a value of one. And now we've constrained the shading effect into the area that we want. If you wanted a more subtle effect, you could increase the Falloff, and small Falloff values will have a large influence on the result. In this case, I don't want that, I'm gonna set the Falloff to zero. The Spread is going to be Spherical by default, it's going to detect in all directions equally, so leave the Spread at one. And if you have noise issues, you can increase the number of Samples here or in the camera anti-aliasing, but we don't need to do that now, it looks fine.
Alright, we've set the ranges for the ambient occlusion. Let's put these colors back to their defaults. Click the white swatch, and set that whiteness all the way up to its max. And click the black swatch, and bring its value down to zero. That's how to apply ambient occlusion to shade the base color of an Arnold Standard surface.
- 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