Bake In Blender - Ambient Occlusion (AO)

Bake In Blender - Ambient Occlusion (AO)

I want to bake ambient occlusion into a texture in Blender!

So, here is a summary of the procedure for AO baking in Blender. I'll try to keep it as brief as possible.

Advance Preparation
  • Prepare objects to be AO-baked
  • Expand the object's UVs

 

*Please also refer to the UV expansion in Blender article when expanding UVs.

(You can also find more and easier AO-baking free add-on TexTools in this article as well.)

 

This article corresponds to the long-term supported version Blender 2.83/2.93 LTS.

 

Sponsored Links
Sponsored Links

Procedure for AO baking in Blender

Start!

(1) Apply the appropriate material to the object to be AO-baked

Select the object to be AO-baked and select the Property Editor and select the Material tab.

Click [+New] to assign a material. (If you have already assigned material, you can leave it as it is.)

Select the object you want to AO-bake and press
Create a new material from the Materials tab

 

(2) Apply image texture to material and specify image size

Click on the circle to the right of "Base Color" in the Material item and select "Image Texture" from the pop-up window that opens.

In the case of Bender 2.93, a window will appear if you click on the "0" next to the left side of "Base Color".

Click on base color to assign image texture
In Blender 2.93, click on the circle to the left of the base color and choose an image texture

 

When an image texture is assigned to the base color, click [+New] below it. (If another texture is assigned and there is no [+New], click the icon next to the texture name.)

Click the New button below the image texture
If there is no [+New] button under the color, click on the New icon

A small window will then open where you can specify the size of the image to be AO-baked. You may also decide the name of the image here. (You can also leave the default name)

When a new image window opens, enter the size of the baked image

When completed, press the OK button.

 

(3) Change render from Eevee to Cycles

Blender's default render is Eevee, but Eevee cannot be baked, so change to Cycles.

Select the render tab in the Property Editor and click on " Click on "Render Engine". Select "Cycles" from the list displayed.

Open the Render tab and change the render from Eevee to Cycles

When the render is set to Cycles, "Bake" is added to the list of items in the Render tab.

Bake item added when render is set to Cycles

 

Sponsored Links

 

(4) Change the bake type of the bake item to AO

Open the Bake section, which looks like the image below, and click on the "Bake Type" section. Select "Ambient Occlusion (AO)" from the list displayed.

Click on Bake Type from the Bake item.
Set ambient occlusion for bake type

Bake type to AO will reduce the number of options and give a cleaner look.

Bake type as AO, fewer optional items and cleaner.

 

(5) Select an object and press the Bake button

Now that the AO is ready to be baked, select the object you wish to AO-bake and press the "Bake" button in the Bake item.

After selecting the objects to be AO-baked, click the Bake button.

AO baking will start and a progress bar will appear at the bottom of Blender. Wait until it finishes.

Wait until the bake is finished.

Baking is complete when the progress bar disappears.

 

(6) Save the image as named from the UV Editor or Image Editor

Switch Workspace to "UV Editing" or "Texture Paint", and display the "UV Editor" or "Image Editor".

After AO baking, switch workspace to UV Editing or Texture Paint

When you bring up the UV editor or the image editor, you will see a black and white AO image.

UV Editor in the UV Editing workspace
Image editor in the Texture Paint workspace

If it is not displayed, click the icon next to the image name and the image will be displayed when you select the name of the image created in step 2).

If the AO image is not displayed in the editor, click on the image icon to select it

With the AO image displayed, click on "Image" in the editor's upper menu, then "Save As" to save the baked AO image.

Save AO Bake image using Save As from the editor's image menu.
Image data format and image name can be set here.

That's all for "AO Baking in Blender!"

Completion of AO Bake in Blender
Finish~

 

Sponsored Links

 

Supplemental Information of AO Bake

Flat + texture display if you want to see the baking result in 3D viewport

If the AO bake is successful, the baked AO image is automatically assigned to the object, but it cannot be seen in the viewport until the texture is displayed.

From the 3D View Shading, you can see the flat+. Texture setting to see the result of the AO bake.

Difficult to see AO bake results with default settings studio + material
Shading in 3D view is flat + textured for easy confirmation of AO baking results

 

Selection object → Bake using active

The Selection→Active option can also be used to bake AOs from other models into the active model.

It looks like it might be possible to bake from a high poly model to a low poly model, but in that case, you would need to set the "cage" and "ray distance" in a good way. (Just my thoughts on doing it.)

Selective objects → When using active, also utilize cage and lay distances.

*For more information on active objects, see here.

 

Margin (padding) settings

In the "Output" section of the Bake item, there is a "Margins" field.

This margin (also called padding) is quite important, and it is recommended that sufficient margin be left around the UV area when creating textures.

The default setting of 16px should be fine, but if the image to be baked is very large, it may be better to use a little more space than the default.

AO bake result with 2px margins
AO bake result with 16px margins
AO bake result with 32px margins

 

Smooth shade/Flat shade affects bake results

Note that the degree of smoothing of the object to be AO-baked will affect the baked result.

AO Bake Result with Smooth Shade
AO Bake Results in Flat Shade

*For smooth/flat shades, see here.

 

Render enable/disable of other objects also affects the baking result

When baking AO, if the rendering of other objects is enabled, it will affect the baked result. Note that it does not matter whether the object is visible or invisible in the viewport.

Enable/disable rendering of other objects and show/hide them in view
Render enable/disable affects the result of AO bake

*How to enable/disable render (camera symbol) in the outliner See here.

 

Increase the sampling rate if you want finer AO

The fineness of the AO bake result depends on the number of samplings.

A higher sampling rate can be expected to produce cleaner baking results, but the higher the sampling rate, the longer the baking time will be.

AO bake result with sampling number 8
AO bake results with 32 sampling numbers
AO bake results with sampling number 128

 

Sponsored Links

 

Extra: What is Ambient Occlusion?

?

Ambient Occlusion (AO)

A rendering method that calculates the degree of occlusion of ambient light in a scene. It calculates the occlusion of light from one point in the scene to the hemisphere direction to generate realistic shadows.

From CG WORLD List of CG Terms

To put it bluntly.

Deep parts of an object and narrow gaps appear to be darker because light does not reach them easily.

The ambient occlusion is the output of the calculation of the state of

If the object has no deep or narrow areas, the ambient occlusion will be almost nonexistent (near pure white).

Light does not reach deep or narrow areas and appears darker = ambient occlusion (AO)

 

I love AO baking when I create textures by hand because ambient occlusion gives a three-dimensional effect and improves the atmosphere.

For example, Lopo-san model looks like a very flat texture, but it is actually AO-baked. If you compare the model with/without AO in the texture, you can see the difference.

Mr. Lopo model with texture AO
Mr. Lopo model without texture AO

But if you want to make a 3D model that looks like a celluloid-like animation, for example, it may look better without AO.

That's all the extra information I have for you.

Toha
Toha

AO should be utilized as needed.

 

 

● Bake in Blender for gradient version is here.

● Bake with Blender MatCap version is here.

List of comments

  1. Blender初心者 says:

    I am a beginner, so I apologize if my question is off the mark.
    Do I need lights when baking AO?
    If lights are required, does the placement of the lights or the number of lights affect the AO bake results?
    For example, if I place 100 lights around a character and bake the AO, is it possible to make the AO disappear because it is too bright?
    This tweet (https://twitter.com/miut_dayo/status/1123220299598614530) and was overwhelmed by the number of lights, so I wondered.
    This is not an AO bake in this case, but I would be grateful if you could enlighten me.

    • Toha トハ says:

      Thank you for your comment, Blender novice.

      Regarding your question, please don't worry - you don't need a light when baking AO!
      Change the bake type of the bake item to AOand that the number of optional items in the bake will be reduced to make it look nicer, the article says.
      This is because lights and everything else do not affect AO baking, so those setting items are no longer available.

      Extra: What is Ambient Occlusion?AO is "a calculation of how much ambient light is blocked based on the object's shape," as mentioned briefly in the following section.
      So it doesn't matter if you have zero or many lights, as long as you only have objects with open UVs, you can bake AO~.

      The example in the tweet you posted is a color bake that includes materials, lighting, etc., so it is different from an AO bake.
      AO Bake is relatively easy to do, so please try it again if you like.

      • Blender初心者 says:

        Thank you very much, Toha.
        I learned a lot.
        I really appreciate your help with other articles as well.

Toha
Toha

Please feel free to comment~!

タイトルとURLをコピーしました