Skip to main content
skill CX Codex

blender-texture-baking — Claude Code skill: bake maps in Blender

blender-texture-baking — a skill for Claude Code that runs Cycles baking pipelines in Blender 5.3. Triggers when transferring high-poly sculpt details to game assets or converting procedural node networks to images.

MIT 587 installs ★ 2,624 updated 2026-11-13

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -a claude-code
Open on GitHub

What blender-texture-baking does

Executes baking passes via scripts/bake_maps.py. It handles high-to-low transfers using either extrusion distances or explicit cages, and bakes standalone procedural shaders directly into image textures. The underlying runner targets available GPU hardware using OptiX, CUDA, HIP, Metal, or oneAPI before falling back to CPU execution.

Generates tangent-space normal maps in OpenGL or DirectX orientation, AO, curvature derived from normals, material ID passes, thickness, and standard PBR channels. It packs AO, Roughness, and Metallic into single ORM textures ready for glTF or Unreal Engine. Temporary image texture nodes are wired with appropriate color spaces and cleaned up after output files are written.

Low-poly meshes must have unwrapped UVs without overlapping islands and scale applied. Mismatched triangulation between Blender and the target game engine will produce shading seams, so triangulating before export is necessary.

What it helps with

  • Bake high-poly normals and AO onto optimized game meshes
  • Flatten procedural Cycles node trees into standalone PBR maps
  • Pack Ambient Occlusion, Roughness, and Metallic into an ORM map
  • Fix ray misses, skewed floating bolts, and projection artifacts with a cage

Example prompts for the agent

  • Bake normal, AO, and curvature maps from Crate_high onto SM_Crate at 2048 resolution
  • Self-bake procedural materials on SM_Crate into base color, roughness, and pack ORM
  • Run normal map baking with --directx enabled and set extrusion to 0.05

How to install blender-texture-baking

1Skills CLI (Vercel)

npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -a claude-code

2Manually: put the files in place

~/.claude/skills/blender-texture-baking/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/blender-texture-baking/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about blender-texture-baking

How to install blender-texture-baking in Claude Code?

Run npx skills add EL4CTEO/blender-skills --skill blender-texture-baking -a claude-code. The definition will be placed in ~/.claude/skills/blender-texture-baking/SKILL.md.

What does blender-texture-baking do?

It orchestrates texture map generation in Blender 5.3 Cycles, handling ray projection, cage setups, procedural texture extraction, and ORM channel packing.

What is required for blender-texture-baking to work?

It requires Blender 5.3 with Cycles rendering enabled, a cleanly unwrapped low-poly UV layout, and the shared execution setup from blender-core.

Source text

SKILL.md · MIT
---
name: blender-texture-baking
description: Bake texture maps in Blender 5.3 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.
license: MIT
metadata:
  author: blender-agent-skills
  version: "1.2.0"
---

# 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).

## Rays: extrusion vs cage
- `--extrusion` (meters) pushes the ray origin outward from the low surface. It must be **greater than the farthest distance the high poly sticks out** of the low. The default is 2% of the low's diagonal; `max_ray_distance` is 2 × extrusion.
- **Cage** (`--cage Crate_cage`): a copy of the low with the same topology, inflated (Displace/"Push"). Use it when uniform extrusion fails (sharp concave corners, thin parts). Edit the cage locally where rays miss.
- Too small: holes or missing details. Too large: other parts of the mesh project in (intersections, "ghosting").

## Map guide
| Map | Space | Notes |
|---|---|---|
| normal | Non-Color, tangent, OpenGL (`--directx` for Unreal) | 16-sample AA is plenty; 8-bit PNG is fine for games |
| ao | Non-Color | 64–256 samples; bake with the high only (no ground) unless contact AO is wanted |
| curvature | Non-Color, 0.5 = flat | derived from the baked normal (convex white / concave dark); drives edge wear |
| id | sRGB | one flat color per high-poly **material**; use materials as masks |
| thickness | Non-Color | AO with inside rays; dark = thin; for SSS/translucency masks |
| basecolor/metallic/opacity | via emission override | reads the Principled inputs of the source materials (also procedural chains) |
| roughness, emit, combined | native Cycles passes | combined = lit result (lightmaps, stylized) |
| position | float | gradient masks |
ORM = R:AO G:Roughness B:Metallic, the glTF/Unreal standard. Unity uses a different packing (`blender-pbr-materials`).

## Fixing common artifacts
| Symptom | Cause | Fix |
|---|---|---|
| Wavy lines on cylinders | low poly too low, smoothing gradients | add segments, use a cage, or more support on the low |
| Skewed details (bolts lean) | ray direction follows the averaged low normals | hard edges + seams, a cage, or bake the floater separately |
| Black/garbage areas | rays miss or hit the back faces | raise extrusion, fix flipped normals (`blender-asset-qa`), check high coverage |
| Seams visible in engine | margin too small, hard edge without a seam, different tangents | margin ≥ 16 px @2k, seams at hard edges, export tangents (MikkTSpace) |
| Details from a neighbouring part | parts too close | explode the bake, or bake per object pair |
| Inverted green look in engine | OpenGL/DirectX mismatch | `--directx` for Unreal, or flip G in the texture importer |
| Stepping/banding | 8-bit with large flat gradients | bake to 16-bit (`float_buffer`) and dither on export |

## Baking non-PBR data
- **Vertex colors**: `bake.target = "VERTEX_COLORS"` with an active color attribute (useful for mobile and Roblox-free shading).
- **Lightmaps**: bake `combined` onto UV2 (`--uv-layer UVMap_Lightmap`) with the scene lights.
- **Multires** (no separate high object): `bake.use_multires=True`, `bake.type="NORMALS"|"DISPLACEMENT"|"VECTOR_DISPLACEMENT"`, `bake.use_lores_mesh=True`, then `bpy.ops.object.bake_image()`. The viewport level is the low, the sculpt level is the high.

## Gotchas
- The target image must be the **active** Image Texture node in **every** material of the low object (the script handles this).
- Baking in Cycles uses the active UV map (`--uv-layer` to pick).
- Images aren't saved automatically: `img.save()` or `save_render`. Packed or internal images disappear on reload.
- 5.2: the Cycles texture cache (`.tx`) is for render memory and doesn't affect bake results.
- Run `blender-asset-qa` on low + high first, because flipped normals and floating chunks produce most bake garbage.

© blender-agent-skills · MIT · EL4CTEO/blender-skills

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set28

The whole set →
blender-pbr-materials blender-pbr-materials — a skill for Claude Code configures PBR materials and texture sets in Blender 5.3 following engine-ready rules. CX Codex +1 644installs blender-hardsurface-modeling blender-hardsurface-modeling — a skill for Claude Code guides hard-surface and prop modeling workflows in Blender 5.3. Sets up blockout rules, modifier pipelines, and topology checks. CX Codex +1 621installs blender-lighting-lookdev The blender-lighting-lookdev Claude Code skill sets up lighting, cameras and material look-dev in Blender 5.3. It activates for render scenes, asset presentations and consistent material checks. CX Codex +1 606installs blender-retopology-uv The blender-retopology-uv Claude Code skill covers retopology and UV work in Blender 5.3. Use it to turn a sculpt or scan into a game mesh, or prepare UVs for texturing and baking. CX Codex +1 603installs blender-rendering blender-rendering — a skill for Claude Code configures Blender 5.3 rendering for stills, animation, and turntables. It covers single-frame, animation, and turntable jobs. CX Codex +1 582installs blender-geometry-nodes The blender-geometry-nodes Claude Code skill helps build Geometry Nodes setups in Blender. It comes into play for procedural assets, surface scattering, and modifier inputs. CX Codex +1 563installs blender-scene-setup The blender-scene-setup Claude Code skill sets up and audits Blender scenes. It runs while starting a project, organizing a .blend file, or preparing a handoff or export. CX Codex +1 558installs blender-sculpting blender-sculpting — a skill for Claude Code runs procedural sculpting workflows in Blender 5.3 for organic models and characters. Used when building base meshes, adding surface details, and preparing bake sources. CX Codex +1 558installs

Project sponsors

Companies that keep this analytics open