| name | atlas-uv-fitting |
| description | Detect texture-atlas regions and map each source part to its own UV rectangle or projected UV surface. Use when a texture pack must fit a Blender model 1:1, when textures look off/stretched, when alpha decals or lightmaps are provided, or before exporting a textured GLB for a brand mascot/logo. |
| when_to_use | Texture atlas region detection, per-part UV mapping, front-projected UVs, decal/lightmap handling, texture validation against source templates. |
| allowed-tools | Read Bash Glob Grep mcp__blender__execute_blender_code mcp__blender__get_object_info |
Atlas UV Fitting
This skill exists because assigning a texture material is not the same as fitting a texture.
Supplemental map sanity rule
Do not blindly wire emissive/roughness/bump/lightmap images into every atlas-mapped part. First verify the supplemental map has the same UV layout and semantic region as the basecolor. If it contains aura dots, guide marks, lightmap blobs, or decorations outside the part, leave it disconnected for that mesh and use constant roughness/bump plus explicit edge/glow geometry instead.
Hard rules
- Atlas textures must be mapped by region; never apply the full atlas to every structural mesh.
- Front-facing hero surfaces use front-projected UVs or a source-region rectangle.
- Side/back surfaces use their own UV islands or procedural/baked fills.
- Roughness, bump, normal, AO, and lightmap images are
Non-Color.
- Alpha decals must use alpha-connected materials and no black backing planes.
- Base GLB should not include reference planes or optional aura unless explicitly requested.
Workflow
- Run
scripts/atlas_region_detector.py on basecolor/decal/aura atlases.
- Name regions semantically in
atlas_regions.json.
- Create/activate UV map per mesh.
- Remap local 0-1 UVs into the matching atlas rectangle.
- Audit the GLB/export material node graph: Principled BSDF + Image Texture nodes.
- Render texture overlay validation before export.
Sources distilled
- Blender UV/Image Texture node uses UV maps for rendered/exported texture output.
- Blender baking needs UV maps and active image targets.
- Blender glTF exporter is most reliable with Principled BSDF, UVs, textures, normals.
- Khronos glTF PBR: base color, metallic/roughness, normal maps are standard channels.
Semantic atlas mapping
Region detection is only a candidate list. For source-locked work, create an atlas_part_map.json that binds each structural part name to exactly one atlas region or declares procedural/no_texture.
Mapping order:
- Detect candidate regions from basecolor/decal/lightmap.
- Reject decorative/aura/composite-preview regions unless the target is context/aura.
- Match structural parts by role, aspect ratio, and relative size.
- Manually rename ambiguous regions before automated UV assignment.
- Verify supplemental maps share the same region layout before connecting roughness/bump/emission/lightmap.
Do not map a full rosette/composite atlas region onto individual petals unless the mesh is a single rosette sheet. Individual meshes need individual source regions.
Additional script
scripts/atlas_region_mapper.py proposes part→atlas-region mappings using aspect/size similarity. Treat output as a draft; semantic names still win.