Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the biggest uses for Ambient Occlusion in a game aside from gloom and spreading darkness is as a foundation for dirt. In this video, I'll show how to take a simple wall module and bake out a lower size occlusion, or rather an occlusion that doesn't spread as much. This will be a foundation for dirt in places like window openings. As we can see in this example, the window openings tend to be dark and grungy with occasional grunge below on the sill and on the wall around. I'll paint a diffuse texture and then lay the occlusion over it.
Here in 3ds Max I have a basic wall section. It's got a large window opening that's recess by 8 inches and at least the start of a diffuse map unwrapped and placed on. The windows will later go in this large gray polygon. Now I'm ready to bake the occlusion. Just to make sure the occlusion goes smoothly, sometimes I'll put just a straight standard gray material on. Now I'm ready to bake. I'll press 0 and pull up the Render To Texture dialog. With my objects selected, it shows up here in the first field. I'll scroll down, making sure to Use the Existing Channel 1 for unwrapping, and in the Output I'll Add an Occlusion element.
So I can find it later I'll name this element wall section001dirt. This will be a temporary working file, so I want to make sure I can find it, grab it, use it, and later delete it. I'll make this occlusion 1024 square to match the size of my texture. When you're baking occlusion for dirt the big deal aside from getting the Samples nice and high, say 128, is to make sure that the Max Distance is lower than you'd use for an overall cinematic mood. I'm going to try an occlusion distance of 16. I'll also pull the Spread back a little bit reducing it down to 0.7 so the darkness clusters more in the corners.
If you'd like you can tune the Dark color to be more reflective of your dirt, or you can leave it black and adjust it later in Photoshop. Finally, in the Baked Material rollout I'll make sure I check Render to Files Only. I don't need this to go into a shell material; I'm going to use it in my diffuse texture after I put in Photoshop. I'll hit Render and pull up that file. With my occlusion baked I'll show the image, so we can see what it's doing clearly. The occlusion with that Max Distance being low leaves my sill and my header as well as the side of the windows dark in the corners but light at the edge where it's on the face of the wall.
Additionally on the window I've got a good spreading dirt in here. This maybe less spread than I might want in a more moody or darker rendering. A higher occlusion setting would gray all the way across the windows. I really want the corner darkest most of all. I'll pull into Photoshop and layer it over my diffuse texture. In Photoshop, I've opened up that dirt image. I'll select all by pressing Ctrl+A, Ctrl+C for Copy. Then I've got my PSD which has my diffuse texture and I'll paste that image in.
I'm going to drop mine in the Color group by dragging it onto it. Then I'll open up the group. I'll make sure that the occlusion or the dirt image is up above the brick diffuse texture. Finally, I'll switch the blending mode of the occlusion to Multiply. I get dirt across my texture, in the windows, on the sill, and generally grunging the wall. As a possibility you can erase pieces of this to make it less uniform. Sometimes I'll use my eraser and set the eraser to a large sponge brush. I'll click on the Eraser button and then right-click to choose a brush.
I'll pick one of the sponges and use the square bracket keys to upsize and downsize the brush. With my Brush Opacity fairly low, 28, I can start to take out pieces, dotting out pieces, making sure I don't leave too many streaks and making it spotted and, well, messy. That's okay. We can even erase parts of it completely. In this case, I'm taking out some of the top, but leaving occlusion and grunge and general wear and tear down in the lower corners, especially here on the bottom by the sill.
I might remove some of the top parts entirely. This may have a chance of staying the cleanest. I'll also do this on the sill and the header, just taking out little bits. I don't mind if these are fairly dirty. I remember that I've put the bottom vertices of the side elements on the left and on the left side of my header and sill, the vertices correspond to the left side of the image. I'll take out some of the dirt there as well. You can have some fun with this and brush as you need it. Maybe trying it a couple of times and experiment. Finally, I'll save this image out and load it back in 3ds Max.
Here in 3ds Max, I've put my new diffuse image with the dirt into a blend material. It's called wall sectionC. This image once I've saved it out has my occlusion and the dirt and the brick together. I haven't added a dirt layer to the brick, it's still fairly clean, but I want to do that later. I'll put this material on my model and we can see in this in no light, or rather just the default lights in the scene, without occlusion on in the Realistic shading, checking under Lighting and Shadows, that my scene is grounded.
I've got dirt and splash stuff around the windows. It's ready for more painting, diffuse texture on the window, dirt on the brick wall, and my wall looks, well, grungy and old. Ambient occlusion is a great foundation for things like dirt and rust. A lot of times I'll model a high-res piece, bake an occlusion on it, and throw it on a low-res. That will help me get detail on the windows, which I'll show in the next video. It's also a great way to gently ground things and add in a realism that would be difficult to paint.
Get unlimited access to all courses for just $25/month.Become a member
100 Video lessons · 8601 Viewers
94 Video lessons · 26808 Viewers
107 Video lessons · 37423 Viewers
147 Video lessons · 6216 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.