Join Adam Crespi for an in-depth discussion in this video Creating an ambient-occlusion override material, part of Maya: Rendering Exteriors.
Ambient inclusion is one of those magic kind of renderings. What it does is to settle everything down and put in grounding darkness making objects really look like they're in contact with each other. Here's how it works. Light, at some point, has bounced around enough to be ambient. That is it's not coming from somewhere in particular. Adjacent objects block that bouncing of ambient light, giving us corner darkness or proximity shadows we could think of. What this does then is make all of our detail pop out all the subtle reveals and notches we put in things.
It also casts a little darkness between adjacent objects. For example, a character's feet really look like their sticking to the floor with an ambient and exclusion pass. It can really help out with subtle details like the flashing on the brick or really making that F Smith sign look like it's shading correctly against the building. What I'll start out with then is exploring the ambient inclusion shade with an override material and see how this looks in my rendering. First, I'll go into the render settings and into the features tab where I'll turn off global illumination, final gather and lens shaders.
These are important. We don't need to soak up any extra time bouncing light with our global illumination and final gather. And the lens shaders will tone map the ambient occlusion image, leaving it gray instead of black and white as we'd like. So, turning those off, not only gives us a faster rendering but gives us a true occlusion where we can multiply it over in post. Now, I'll get an override setup. I've gone to the render layers and I'll right click on the master layer, choose overrides, create new material override and surface shader.
I'll use the surface shader and tuck the occlusion in. And yes, everything should go black here. It's being overridden with a black surface shader at the moment. I'll press Control+A to go to the Attribute editor, and name this material AO General. Now I'll go into the out color texture of my Surface Shader. And into the Textures under Mental Ray, and I'll choose the mib_anb_occlussion. I'll pull up my IPR, and see how this works. I'll drag a region around, and what we'll see here is an interesting gray on the building.
Ambient occlusion is governed by a bright and a dark color. When there's no occlusion, it's white. When there's full occlusion, it's dark, and we get grays between. The samples are fairly low at 16, so it's quick, but there's dots all over everything. So I'll kick up the samples to 64. Now I'll get a slightly slower render, but a smoother grade on the occlusion. In ambient occlusion then, max distance in seen units and refers to the distance at which objects stop casting occlusion. What we're seeing here is that the parking lot and sidewalks are casting occlusion on my building.
The floor and the canopy are occluding each other and so on, giving me mushy grays all over and that'll go against all the lighting work I've just done. I'll bring up this max distance. Zero means everybody in the pool or everybody casts occlusion no matter how far out. I'll put this at, 200 and see what it looks like. Now I get a much better read on the occlusion. The walls where the shouldn't be occluded are white, and the occlusion really sits in all the detail nicely. I'll back this off just a little bit more, to about 100 or so, and this way I don't get too much darkness playing up the walls.
Now, we'll look at the spread. In Ambient Occlusion, the spread defines how that occlusion spreads into that zone. Does it cluster more in the corners or spread out further? And it's an artistic choice. What I'll do is to back off the spread to about .7 or so, so it's a little tighter and a little darker in the corners. Fall off then determines the rate the inclusion decreases with one being linear. A fall off of 0.5 makes the occlusion start off and decrease more sharply. Conversely, a fall off of 1/2, really pushes that darkness out into the zone.
Being that I don't want this to be a heavy looking rendering, I'll keep that fall off nice and low, about .6. So I've got good, light, tight darkness in the corners, and bright white surfaces everywhere else. All of the detail pops out and I'm ready to render this and composite it over in post.
- Creating exterior materials
- Converting paint effects for mental ray
- Positioning the sun with the Daylight system
- Lighting using HDR imagery
- Lighting interior spaces
- Adjusting and optimizing the render settings
- Setting up additional rendering passes for compositing purposes
- Compositing and adding post effects in Nuke and After Effects