blender-texture-baking
Installation
SKILL.md
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)
- Low poly: UVs unwrapped, no overlaps (stacked/mirrored islands moved +1 U), padding ≥ 8 px at the bake resolution, scale applied.
- 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.
- Triangulate the low poly the same way the engine will, or export the triangulated mesh. Mismatched triangulation shows as shading seams.
- 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.
- Names:
X_low/X_highpairs. 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. - Apply modifiers on the high poly as needed (multires and subd are evaluated automatically).