Getting realistic lighting and shadows in your 3D scenes can feel tricky. This guide will show you how to use ambient occlusion map in Blender to solve that problem. Ambient occlusion, or AO, is a shading method that simulates how light creeps into corners and crevices. It adds soft contact shadows where objects meet, giving your renders a grounded, realistic feel without needing extra lights.
How To Use Ambient Occlusion Map In Blender
An ambient occlusion map is a grayscale texture. It pre-calculates these shadowed areas and bakes them onto your model. Using an AO map in Blender is a two-part process. First, you often bake the map from your high-poly or detailed scene. Second, you apply it to your material to enhance the shadows. This guide covers both, from setup to final render.
What is Ambient Occlusion (AO)?
Think about the area where a book sits on a table. The space right underneath the book is darker than the rest of the table. Ambient occlusion simulates this effect. It’s not a direct shadow from a light source. Instead, it’s a global effect that darkens areas based on how much surrounding geometry is blocking ambient light.
In Blender, you can calculate AO in two main ways:
- Real-Time AO (Screen Space): This is calculated during the render in cycles or Eevee. It’s good but can be computationally heavy for complex scenes.
- Baked AO Maps: This is a pre-calculated texture. You save it as an image file and plug it into your shader. It’s very efficient for real-time applications like games, and it gives you full artistic control.
Using a baked map is often the preferred method for optimized, high-quality results. It’s a staple technique for asset creation.
Why Use a Baked AO Map?
You might wonder why bake a texture when Blender can compute AO live. There are several strong reasons.
- Performance: A baked texture uses almost no processing power at render time. This is crucial for complex scenes or real-time engines.
- Consistency: The shadows are locked in. They won’t change with camera angle, which is vital for animation and game assets.
- Control: You can paint, edit, or blur the AO map in an image editor like Krita or GIMP. You can tweak it to perfection.
- Compositing: AO passes are commonly used in compositing to add extra depth in post-production.
It’s a fundamental skill for any serious Blender artist working on textured models.
Preparing Your Model for Baking
Before you bake, your model needs to be ready. Good preparation prevents common baking errors like seams or blurry maps.
1. UV Unwrapping
Your model must have a good UV layout. The AO map bakes directly onto the UVs. If your UVs are overlapping or badly stretched, your bake will be ruined.
- Mark seams logically along hard edges.
- Unwrap and try to minimize stretching (blue is good, red is bad in the UV editor).
- Ensure all UV islands fit within the square image bounds (0 to 1 space).
- Leave a few pixels of padding between islands to avoid bleeding.
2. Setting Up the High-Poly and Low-Poly (If Applicable)
Often, you bake from a high-poly, detailed model onto a low-poly, optimized version. This transfers the detail.
- Your low-poly model should be the one with the UVs.
- Place both models in the same position in the 3D viewport. They should overlap.
- The high-poly model can be set to not render in the final scene.
If you’re just baking AO from the model itself onto its own UVs, you only need the one model.
Step-by-Step: Baking an Ambient Occlusion Map
Let’s walk through the baking process. We’ll assume you’re baking from your model onto itself.
- Enter the Correct Workspace: Switch to the “Shader Editor” and “UV Editor” workspaces, or layout your windows so you can see both.
- Create an Image Texture: In the UV Editor, click “Image” > “New”. Name it (e.g., “AO_Bake”). Set the resolution (2048×2048 is common) and a light gray color. Click “OK”.
- Assign the Image to Your Material: In the Shader Editor, make sure your material is selected. Add an “Image Texture” node and select the new image you created. Connect it to the “Base Color” of your Principled BSDF temporarily, just to see the UVs.
- Select Your Object: In the 3D viewport, select the object you want to bake.
- Open Bake Settings: Go to the “Render Properties” tab (camera icon). Scroll down to the “Bake” section.
- Configure Bake Settings:
- Set “Bake Type” to “Ambient Occlusion”.
- Increase “Samples” (128 or 256) for a cleaner, less noisy result.
- Check “Selected to Active” only if you’re baking from a high-poly to a low-poly model.
- Set “Distance” to a small value (like 0.05m) to control how far rays check for occlusion. A larger value gives softer, wider shadows.
- Start the Bake: Click the big “Bake” button. Blender will calculate the AO and paint it onto your image texture in the UV editor.
- Save Your Image: Once baked, go to the UV Editor > “Image” > “Save As”. Save it as a PNG or TGA file. Don’t skip this, or you’ll lose the bake!
You now have a custom AO map for your model. Remember to disconnect the Image Texture node from Base Color before moving on.
Applying the AO Map in Your Shader
Now for the important part: using the map. You don’t just plug it into color. The goal is to use it to darken crevices.
- Load Your AO Map: In the Shader Editor, add an “Image Texture” node. Open your saved AO map file.
- Use a Mix Node: Add a “Mix” node (set to “Mix” or “Multiply” blend mode).
- Connect the Nodes:
- Connect your main color texture (e.g., Diffuse map) to the top socket of the Mix node.
- Connect the AO map’s “Color” output to the bottom socket of the Mix node.
- Connect the Mix node’s output to the “Base Color” of your Principled BSDF shader.
- See the Effect: Your base color should now be darkened in the occluded areas. The “Multiply” mode simply multiplies the colors, making the white areas (1.0) have no effect and the black areas (0.0) darken fully.
For more control, you can put a “ColorRamp” node between the AO map and the Mix node. This lets you adjust the contrast and intensity of the AO effect. Slide the black and white points to fine-tune the shadows.
Advanced Tips and Common Issues
Sometimes, things don’t go as planned. Here’s how to fix common problems.
Fixing Seams and Artifacts
Black lines or seams on your model after baking? This is usually a UV or baking issue.
- Check UV Padding: Did you leave enough space between UV islands? Re-bake with more padding.
- Extend UVs: In the UV editor, you can slightly scale your UV islands outward so they bleed over the edge of the texture space. This covers small seams.
- Ray Distance: A very low “Distance” setting in the bake options can cause sharp cut-offs. Try increasing it slightly.
Combining AO with Other Maps
AO is rarely used alone. It’s part of a texture workflow.
- With Roughness: Sometimes, crevices are also more weathered and less shiny. You can slightly mix your AO map into the Roughness input to increase roughness in shadows.
- With Displacement/Bump: Using AO with a bump or normal map enhances the depth illusion. The shadows align with the perceived geometry.
Remember, subtlety is key. An AO effect that is too strong can make your model look dirty instead of shaded.
Using AO in Eevee vs. Cycles
The application of a baked AO map works identically in both render engines because it’s a shader setup. However, the real-time AO settings differ.
In Eevee:
Eevee has a “Screen Space Ambient Occlusion” (SSAO) effect in its render settings. This is separate from your baked map. You can use both together for maximum depth, but often you’ll turn off Eevee’s SSAO if you’re using a detailed baked AO map to avoid a double effect.
In Cycles:
Cycles calculates true ray-traced ambient occlusion. Again, if you’re using a baked map, you might not need to rely on this. The baked map will work perfectly in Cycles. The render engine doesn’t change how the shader nodes function.
The beauty of the baked map is it’s engine-agnostic. It will look the same everywhere.
Practical Example: A Weathered Crate
Let’s imagine you’re texturing a wooden crate. You have a diffuse color map and a roughness map.
- You bake an AO map based on the crate’s own geometry. This gives you shadows between the wood planks and in the corners.
- In the shader, you mix the AO map with your wood color map using a Multiply mix node.
- You might also use a ColorRamp to pull the mid-gray values of the AO map darker, making the plank gaps more pronounced.
- You can optionally mix a very small amount of the same AO map into the roughness input, making the shadowed areas slightly less shiny.
The result is a crate that feels solid, heavy, and grounded in its environment. The shadows are consistent from every angle, which is crucial if this asset is placed in a game scene.
FAQ Section
What is an ambient occlusion map used for?
An ambient occlusion map is used to add realistic, soft contact shadows to a 3D model. It darkens cracks, corners, and areas where objects are close together, adding a sense of depth and weight without the cost of extra lighting calculations.
How do I add an ambient occlusion map in Blender?
You add it in the Shader Editor. Load the AO map image with an Image Texture node, then connect it to a Mix node (set to Multiply) that sits between your color texture and the Base Color input of your main shader. This darkens the color based on the AO map.
What’s the difference between baked AO and real-time AO?
Baked AO is a pre-made texture applied to the model’s surface. Real-time AO (like SSAO) is calculated on-the-fly by the render engine based on scene geometry. Baked AO is more performant and consistent, while real-time AO is dynamic but can be less accurate and more costly.
Why is my baked ambient occlusion map blurry?
This is usually due to low resolution on your baked image, or insufficient margin/padding around your UV islands causing bleeding from neighboring areas. Increase your bake image size and ensure there’s clear space between UV islands in the editor.
Can I paint an AO map by hand?
Absolutely. While baking is common, you can paint an AO map manually in a 2D painting software. This gives you full artistic control to decide where shadows are most intense, which can be useful for stylized or exaggerated looks.
Conclusion
Learning how to use ambient occlusion map in Blender is a major step towards creating professional-looking 3D art. It bridges the gap between a flat, computer-generated look and a believable, tactile object. The process—from preparing UVs, to baking, to integrating the map into your shader—might seem involved at first. But once you’ve done it a few times, it becomes a quick and essential part of your workflow.
The key is to start simple. Bake an AO map for a basic object like a cube or sphere, and apply it. See how it changes the perception of form. Then, move on to more complex models. Experiment with the Distance setting during baking and the ColorRamp for adjustment. Soon, you’ll be adding that crucial layer of depth to all your projects, making them stand out with realistic, grounded lighting. Remember to always save your baked images, and don’t be afraid to tweak the effect until it looks just right for your scene.