docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Icon Bake Ambient Occlusion

    Toolbox Rule Engine
    Compute the Ambient Occlusion (AO) influence between each selected object, and bake it in textures. This action can be useful to improve performances and AO accuracy by avoiding using realtime GI or SSAO post-processing.

    Parameters

    Parameter Type Description
    mapsResolution AOMapDimensions Generated texture size, per mesh.
    resolution Int32 Custom resolution for generated textures size per mesh.
    samplesPerPixel (Samples per pixel) SamplesPerPixel Number of rays used to calculate the occlusion value for each pixel in the rendered image. Increasing this value will improve the quality and accuracy of the ambient occlusion effect by providing more detailed and smoother maps of shadows and shading, reducing the need for a denoiser. However, higher samples per pixel lead to longer processing times.
    samples Int32 Custom Samples per pixel value.
    denoiseIntensity (Denoiser) DenoiseIntensity Adjusts the strength of noise reduction in the output maps. Higher settings provide a cleaner image by reducing graininess but may slightly soften fine details. Select based on your desired balance between image clarity and detail preservation.
    groundIncidence (Ground incidence) Boolean A fictive plane will be used to simulate the ground incidence on the object.
    advancedUVParameters (Advanced) AdvancedUVParameters
    forceUVGeneration (Recreate UVs) Boolean Override existing UVs.
    uvChannel (UV channel) Int32 Useful if you use custom lit shaders. Otherwise keep 0.
    padding (Padding) Int32 Increase it to prevent mipmaps light bleeding.

    Additional Information

    Ambient Occlusion (AO) improves realism by simulating real-world shadowing. Baking AO information in textures is crucial in real-time 3D applications for balancing performance, quality, and control, enabling the creation of rich models without sacrificing interactive performance. The Bake Ambient Occlusion action allows to bake AO maps directly in the Editor without requiring artistry skills or the need of an external DCC tool.

    This action handles the creation of material variant if the orignal material is already used elswhere. The texture produced is automatically repacked based on the render pipeline used. The texture is saved in the scene, the prefab, or as a separate asset accordingly to the Save Assets in project setting.

    Image

    Pixyz BakeAO vs Native Lightmapper

    Why use Pixyz BakeAO feature instead of Unity's native Lightmapper? Because the latter presents workflow issue for configurator-like projects:

    • Static Object.
    • Per Scene.
    • Hard to tweak.
    • Takes time to iterate.

    In the image below, the shadow of the shoe was baked on the floor, leaving its mark when moving the shoe:

    Image

    Baking maps to store AO information in the materials has its pros:

    • Is embedded in the object. No need to be static.
    • Can be shared between multiple scenes.
    • Easier to split per subcomponent => Allows configuration.

    And fewer cons:

    • No Global Illumination stored, meaning less realism (only contact shadows are simulated).

    The shoe can be moved around, while preserving the realism added by the AO maps:

    Image

    The Bake Ambient Occlusion action solves user challenges effectively with per MeshRenderer baking, through simple parameters (see above).

    Troubleshooting & Guidance

    The action's UI displays helpful messages to guide users in resolving the most common issues:

    • UV channel not populated.
    • UVs not normalized.
    • UV overlap.
    • SkinnedMesh checking.
    • Non standard Lit shader without AO slot.
    • Non unique mesh reference.

    Image

    Limitations

    • No automatic AO texture assignation for custom materials (by design). Texture will be stored in your project.
    • No proper opacity threshold support (plan to support material Alpha clipping threshold).
    • Denoiser values setup is not automatic yet?
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)