# Blender Texture Baking

Bake texture maps in Blender 5.2 Cycles - high-to-low normal maps with cage/extrusion...

- Repository: https://github.com/EL4CTEO/blender-skills (651 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -g -a claude-code -y`
Codex: `npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -g -a codex -y`
Cursor: `npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -g -a cursor -y`
Gemini CLI: `npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add EL4CTEO/blender-skills`

## Description

Bake texture maps in Blender 5.2 Cycles - high-to-low normal maps with cage/extrusion, AO, curvature, ID, thickness, base color/roughness/metallic from procedurals, ORM packing, OpenGL vs DirectX, margins, GPU baking, fixing skewing/waviness/seams. Use when transferring sculpt or high-poly detail to game meshes or converting procedural materials to textures.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Texture Baking (Cycles)

The execution model is in `blender-core`. UVs come from `blender-retopology-uv` and materials from `blender-pbr-materials`.

## One call
```
scripts/bake_maps.py -- --low SM_Crate --high Crate_high Crate_bolts --maps normal ao curvature id \
   --res 2048 --samples 64 --margin-px 16 --pack-orm --out //textures
```
Self-bake (procedural → textures, no `--high`): `--low SM_Crate --maps basecolor roughness metallic normal --pack-orm`.
The script picks the GPU (OptiX/CUDA/HIP/Metal/oneAPI) and falls back to CPU, creates the target images with correct color spaces, cleans up its temporary nodes, and saves `T_<name>_<N|AO|CURV|BC|R|M|ORM...>.png`.

## Preparation checklist (most bake bugs come from this list)
1. **Low poly**: UVs unwrapped, no overlaps (stacked/mirrored islands moved +1 U), padding ≥ 8 px at the bake resolution, scale applied.
2. **Hard edges = UV seams** on the low poly. Use either smooth shading with the bake handling gradients, or hard edges split at seams. Never put a hard edge inside a UV island.
3. **Triangulate the low poly the same way the engine will**, or export the triangulated mesh. Mismatched triangulation shows as shading seams.
4. **High poly** covers the low completely and pokes out of it only a little. Floaters (bolts, panel details) can hover just above the surface, but must stay within the extrusion distance.
5. **Names**: `X_low` / `X_high` pairs. Bake per part, or explode the parts apart (move each pair along an axis) so neighbouring parts don't project onto each other, then put them back.
6. Apply modifiers on the high poly as needed (multires and subd are evaluated automatically).

The rest: https://github.com/EL4CTEO/blender-skills/blob/HEAD/skills/blender-texture-baking/SKILL.md
