Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/armory3d/armorpaint/llms.txt

Use this file to discover all available pages before exploring further.

Texture baking transfers high-frequency surface detail and computed lighting information from your 3D mesh into flat 2D textures that can be used at render time without re-computing that data each frame. In ArmorPaint you bake maps to capture curvature, ambient occlusion, surface normals, and other properties that feed directly into your PBR painting workflow — for example, using a curvature bake as a mask to automatically place wear and grunge at geometric edges. Baking is initiated from the Bake panel in the sidebar and writes the result into the currently active layer.

Bake Types

ArmorPaint exposes fourteen bake types through the bake_type_t enum. Select the desired type in the Bake panel before triggering a bake operation.

Curvature (0)

BAKE_TYPE_CURVATURE — Computes surface curvature by sampling screen-space normal derivatives. Convex edges produce bright values; concave creases produce dark values. Configurable strength, radius, and offset parameters let you control the contrast and spread of the effect. Supports axis-clamping to restrict curvature to a specific surface direction.

Normal — Tangent (1)

BAKE_TYPE_NORMAL — Bakes tangent-space normals from a high-poly source mesh onto the low-poly target. The result is the classic blue-purple normal map compatible with all major game engines and renderers.

Normal — Object (2)

BAKE_TYPE_NORMAL_OBJECT — Bakes object-space normals. The RGB channels encode the X, Y, and Z components of the surface normal in the object’s local coordinate system. Supports Y-up axis remapping.

Height (3)

BAKE_TYPE_HEIGHT — Bakes a height (displacement) map by computing the world-space distance between corresponding positions on the high-poly and low-poly surfaces. Useful for parallax occlusion mapping and displacement.

Derivative (4)

BAKE_TYPE_DERIVATIVE — Produces a derivative normal map by computing finite differences across the baked height field. The red and green channels store the horizontal and vertical slopes respectively, with a neutral grey (0.5, 0.5) representing flat surfaces.

Position (5)

BAKE_TYPE_POSITION — Records the world-space position of each surface point, remapped to the [0, 1] range. The result can be used as a gradient mask or for custom shader effects that depend on spatial position. Supports Y-up axis remapping.

Tex Coord (6)

BAKE_TYPE_TEXCOORD — Bakes UV coordinates directly into the texture. The red channel stores the U component and the green channel stores the V component, producing a characteristic red-green gradient map.

Material ID (7)

BAKE_TYPE_MATERIALID — Assigns a unique pseudo-random colour to each material slot in the scene. The colour is generated from a hash of the material ID, guaranteeing visually distinct colours for adjacent materials.

Object ID (8)

BAKE_TYPE_OBJECTID — Similar to Material ID, but assigns a unique colour per object rather than per material. Useful when working with multi-object scenes where you need to distinguish objects programmatically.

Vertex Color (9)

BAKE_TYPE_VERTEX_COLOR — Transfers per-vertex colour data stored in the mesh into a texture map. If the mesh does not contain vertex colours, the output defaults to white (1.0, 1.0, 1.0).

Occlusion (10)

BAKE_TYPE_OCCLUSION — Bakes ambient occlusion using hardware ray tracing (on supported GPUs) or rasterised approximation. Dark values indicate occluded regions; bright values receive full ambient light. Ray-traced AO uses the bake_ao_strength, bake_ao_radius, and bake_ao_offset parameters and samples up to bake_samples rays per texel (default: 128).

Lightmap (11)

BAKE_TYPE_LIGHTMAP — Bakes a static lightmap incorporating direct and indirect lighting from the scene’s environment. Powered by hardware ray tracing on supported GPUs, using the raytrace_bake_light shader.

Bent Normal (12)

BAKE_TYPE_BENT_NORMAL — Computes bent normals — the average unoccluded direction weighted over the hemisphere — using hardware ray tracing. Bent normals improve ambient occlusion accuracy and specular occlusion when used in shaders, using the raytrace_bake_bent shader.

Thickness (13)

BAKE_TYPE_THICKNESS — Bakes a thickness map by casting rays inward through the mesh and measuring the distance to the opposite surface. Dark values indicate thin geometry; bright values indicate thick sections. Commonly used for subsurface scattering approximation. Uses the raytrace_bake_thick shader.

Bake Axis

The bake_axis_t enum controls which surface directions are considered when computing curvature and other directional bake types. Restricting the axis is useful when you only want curvature on surfaces facing a specific direction.
ValueConstantDirection Vector
0BAKE_AXIS_XYZAll axes (no restriction) — float3(x,y,z)
1BAKE_AXIS_XPositive X — float3(1,0,0)
2BAKE_AXIS_YPositive Y — float3(0,1,0)
3BAKE_AXIS_ZPositive Z — float3(0,0,1)
4BAKE_AXIS_MXNegative X — float3(-1,0,0)
5BAKE_AXIS_MYNegative Y — float3(0,-1,0)
6BAKE_AXIS_MZNegative Z — float3(0,0,-1)

Up Axis

The bake_up_axis_t enum sets the world-space up direction used when remapping object-space normals and positions into the baked texture. Match this to the up-axis convention of your target application.
ValueConstantDescription
0BAKE_UP_AXIS_ZZ-up (Blender default)
1BAKE_UP_AXIS_YY-up (most game engines)
2BAKE_UP_AXIS_XX-up

Bake Workflow

1

Select or import your mesh

Load the mesh you want to bake onto. For high-poly to low-poly baking (normals, height), import both meshes and assign the high-poly source using the High-Poly picker in the Bake panel (bake_high_poly index).
2

Choose a bake type

In the Bake panel, select the desired bake_type_t from the dropdown. Different types expose different parameters — for example, curvature shows strength, radius, and offset sliders; AO shows strength, radius, offset, and samples.
3

Set the output resolution

Create or select a layer at the target texture resolution. The bake output is written at the resolution configured for that layer. Typical production resolutions are 2048, 4096, or 8192 px.
4

Configure axis settings

Set the Bake Axis (for curvature direction filtering) and the Up Axis (for object-space normals and positions) to match your coordinate system conventions.
5

Start the bake

Click the Bake button. For rasterised bake types the result is immediate; for ray-traced types (AO, Lightmap, Bent Normal, Thickness) the engine dispatches hardware ray tracing and accumulates samples over multiple frames.

Split Types for Multi-Object Scenes

When baking a scene with multiple objects, the split_type_t enum determines how the objects are separated into individual bake targets:
ValueConstantDescription
0SPLIT_TYPE_OBJECTEach object in the scene produces a separate bake output
1SPLIT_TYPE_MATERIALObjects are split by material slot; each unique material produces its own output
2SPLIT_TYPE_UDIMObjects are split by UDIM tile, producing one output per tile in the UDIM grid

Ray-Traced Baking

Four bake types — Occlusion, Lightmap, Bent Normal, and Thickness — are computed using hardware-accelerated ray tracing via the Brute Pathtracer engine. The bake dispatcher selects the appropriate ray-tracing shader automatically:
// Shader selection from render_path_raytrace_bake.c
return g_context->bake_type == BAKE_TYPE_OCCLUSION     ? "raytrace_bake_ao..."
     : g_context->bake_type == BAKE_TYPE_LIGHTMAP      ? "raytrace_bake_light..."
     : g_context->bake_type == BAKE_TYPE_BENT_NORMAL   ? "raytrace_bake_bent..."
     :                                                    "raytrace_bake_thick...";
The bake targets use RGBA64 (16-bit per channel) render targets to preserve precision in the accumulated samples.
Ray-traced baking requires a GPU with hardware ray-tracing support: DXR on Direct3D 12 (Windows), Vulkan RT on Vulkan-capable hardware (Linux/Windows), or Metal RT on Apple Silicon and supported AMD GPUs (macOS). Ray-traced bake types will not be available on hardware that does not meet these requirements.
Curvature and ambient occlusion maps are two of the most versatile baked textures in a PBR workflow. Use the curvature map as a mask to drive edge wear — bright edges catch dust and scratches while dark crevices trap dirt and grunge. Layer an AO bake on top to darken deep cavities independently of real-time lighting, giving your materials a grounded, physically plausible look even under flat illumination.

Build docs developers (and LLMs) love