user: Describe Settings from the Blender manual or Python API, including usage steps and snippets.

assistant: Bake
:   Executes the bake operation using the current settings.

Bake from Multires
:   Bakes a *Normal* or *Displacement* map directly from a mesh that has a
    [Multiresolution Modifier](../../modeling/modifiers/generate/multiresolution.xhtml).

    This method compares two resolution levels of the modifier:

    - *Viewport Levels* Used as the *low-resolution* base mesh.
    - *Render Levels* Used as the *high-resolution* detailed mesh.

    The resulting bake represents the difference between these two levels, allowing detailed sculpted
    information to be captured as a texture map.

    Bake Type
    :   Determines what kind of surface information is extracted from the Multiresolution modifier.
        See [Bake Types](../../modeling/modifiers/generate/multiresolution.xhtml#multrires-bake-types) for more information.

        Normals:
        :   Bakes surface normal direction differences between the two levels.

        Displacement:
        :   Bakes height differences as a grayscale displacement map.

        Vector Displacement:
        :   Bakes full 3D positional offsets as a vector displacement map.

Bake Type
:   Type of pass to bake.

    Combined:
    :   Bakes all materials, textures, and lighting except specularity.
        The passes that contribute to the combined pass can be toggled individually to form the final map.

    Ambient Occlusion:
    :   Bakes ambient occlusion as specified in the World panels. Ignores all lights in the scene.

    Shadow:
    :   Bakes shadows and lighting.

    Normal:
    :   Bakes normals to an RGB image.

    UV:
    :   Mapped UV coordinates, used to represent where on a mesh a texture gets mapped too.
        This is represented through the red and green channels of the image,
        the blue channel is encoded with a constant value of 1 but does not hold any information.

    Roughness:
    :   Bakes the roughness pass of a material.

    Emit:
    :   Bakes Emission, or the Glow color of a material.

    Environment:
    :   Bakes the environment (i.e. the world surface shader defined for the scene) onto
        the selected object(s) as seen by rays cast from the world origin.

    Diffuse:
    :   Bakes the diffuse pass of a material.

    Glossy:
    :   Bakes the glossiness pass of a material.

    Transmission:
    :   Bakes the transmission pass of a material.

View From
:   Source of reflection ray directions.

    Above Surface:
    :   Cast rays from above the surface.

    Active Camera:
    :   Use the active camera’s position to cast rays.

### Influence

Combined

Lighting
:   Direct
    :   Add direct lighting contribution.

    Indirect
    :   Add indirect lighting contribution.

Contributions
:   Diffuse
    :   Add diffuse contribution.

    Glossy
    :   Add glossy contribution.

    Transmission
    :   Add transmission contribution.

    Emit
    :   Add emission contribution.

Diffuse, Glossy, Transmission

Contributions
:   Direct
    :   See [above](#bpy-types-bakesettings-use-pass-direct).

    Indirect
    :   See [above](#bpy-types-bakesettings-use-pass-indirect).

    Color
    :   Colorize the pass.

        - If only *Color* is selected you get the pass color,
          which is a property of the surface and independent of sampling refinement.
        - If *Color* is not selected, you get the direct and/or indirect contributions in gray-scale.
        - If *Color* and either *Direct* or *Indirect* are selected,
          you get the direct and/or indirect contributions colored.

Normal

Space
:   Normals can be baked in different spaces:

    For materials, the same spaces can be chosen in the image texture options
    next to the existing *Normal Map* setting. For correct results,
    the setting here should match the setting used for baking.

    Object:
    :   Normals in object coordinates, independent of object transformation, but dependent on deformation.

    Tangent:
    :   Normals in tangent space coordinates, independent of object transformation and deformation.
        This is the default, and the right choice in most cases, since then the normal map can be used for
        animated objects too.

Swizzle R, G, B
:   Axis to bake into the red, green and blue channel.

### Selected to Active

Bake shading on the surface of selected objects to the active object.
The rays are cast from the low-poly object inwards towards the high-poly object.
If the high-poly object is not entirely involved by the low-poly object, you can tweak the rays start point with
*Max Ray Distance* or *Extrusion* (depending on whether or not you are using cage).
For even more control you can use a *Cage Object*.

Cage
:   Cast rays to active object from a cage.
    A cage is a ballooned-out version of the low-poly mesh created either automatically
    (by adjusting the ray distance) or manually (by specifying an object to use).
    When not using a cage the rays will conform to the mesh normals. This produces glitches on the edges,
    but it is a preferable method when baking into planes to avoid the need of adding extra loops around the edges.

    Cage Object
    :   Object to use as cage instead of calculating the cage from the active object with the *Cage Extrusion*.

Cage Extrusion
:   Distance to use for the inward ray cast when using *Selected to Active* and *Cage*.
    The inward rays are cast from a version of the active object with disabled Edge Split Modifiers.
    Hard splits (e.g. when the Edge Split Modifier is applied) should be avoided because they will lead to non-smooth
    normals around the edges.

Max Ray Distance
:   Distance to use for the inward ray cast when using *Selected to Active*.
    Ray distance is only available when not using *Cage*.

### Output

Target
:   Where to output the baked map.

    Image Textures:
    :   Bake to the image data-block associated with the active and selected
        [Image Texture](../shader_nodes/textures/image.xhtml) node. If a material does not contain an active and
        selected image texture node, nothing will be baked for this material.

        Clear Image
        :   If selected, clears the image before baking render.

    Active Color Attribute:
    :   Bake to the [Active](../../glossary/index.xhtml#term-Active) [Color Attributes](../../sculpt_paint/vertex_paint/index.xhtml) layer on the active mesh.
        Note, the active object must be a mesh as other object types do not have Color Attributes.

### Margin

When baking to images, by default a margin is generated around UV “islands”.
This is important to avoid discontinuities at UV seams, due to texture filtering and mip-mapping.

Type
:   Method to generate the margin.

    Extend:
    :   Extend border pixels outwards.

    Adjacent Faces:
    :   Fill margin using pixels from adjacent faces across UV seams.

Size
:   Size of the margin in pixels.