Skip to main content
skill CX Codex

blender-uv-texturing — Claude Code skill: UV and textures in Blender

A skill for UV unwrapping, atlas mapping and map baking in Blender. Useful when a supplied texture pack has to sit on the mesh without stretching.

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

What blender-uv-texturing does

The skill covers the gap between assigning a material and getting the supplied texture pack to actually fit the model. It is mandatory for template- and atlas-driven assets. A decision tree inside picks the unwrap method from what the texture represents.

For a whole object seen from the front, it builds Project-from-View UVs from the validation camera. An atlas with separate parts gets cropped by rectangle, each part landing on its own UV island. Repeating materials go through generated or object coordinates and tiled UVs, while a face decal becomes an alpha plane with no black background. Roughness, bump, normal and lightmap images are tagged Non-Color.

Everything runs through the Blender MCP server: mcp__blender__execute_blender_code, get_scene_info, render_viewport_to_path, search_api_docs, plus the official mcp__blender_official__* set. Before the first Blender call you read ../text-to-blender/references/mcp-backends.md and keep the chosen backend for the whole task. Baking needs Cycles, a UV map and an active Image Texture node as the target. For closed or extruded surfaces front projection is not enough — front cap, back cap and sidewall coverage are verified separately.

What it helps with

  • unwrap a mesh so a texture fits it 1:1
  • crop an atlas by rectangle and split parts across islands
  • fix stretched or offset textures on front-facing parts
  • bake a lightmap or roughness map into its own channel
  • prepare a textured asset for glTF/GLB export

Example prompts for the agent

  • Unwrap this model and check with a checker texture for stretching
  • Here is the texture atlas, map each part to its own rectangle
  • Bake the lightmap into a separate UV channel and save the PNG

How to install blender-uv-texturing

1Skills CLI (Vercel)

npx skills add RobLe3/cc-blender-skill --skill blender-uv-texturing -a claude-code

2Manually: put the files in place

~/.claude/skills/blender-uv-texturing/SKILL.md

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

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

Questions about blender-uv-texturing

How do I install blender-uv-texturing in Claude?

Run npx skills add RobLe3/cc-blender-skill --skill blender-uv-texturing -a claude-code. The skill file then lives at ~/.claude/skills/blender-uv-texturing/SKILL.md.

What does blender-uv-texturing do?

It unwraps UVs, maps atlases onto islands, projects textures, places alpha decals and bakes maps. Then it prepares textured assets for glTF/GLB export.

What does the skill need to run?

A Blender MCP server exposing execute_blender_code and render_viewport_to_path. Before the first call the skill asks you to read ../text-to-blender/references/mcp-backends.md and stick to the chosen backend.

Source text

SKILL.md · MIT
---
name: blender-uv-texturing
description: UV unwrap, atlas-map, project textures, use alpha decals, bake maps/lightmaps, and prepare texture-driven Blender assets for glTF/GLB export. Use whenever the user provides texture packs, texture atlases, decals, UV layouts, lightmaps, wants a texture to fit a mesh 1:1, or reports stretched/off textures. Pairs with reference-to-3d for template-accurate reconstruction and blender-materials for PBR values.
allowed-tools: Read Bash Glob Grep mcp__blender__execute_blender_code mcp__blender__get_scene_info mcp__blender__get_object_info mcp__blender__get_objects_summary mcp__blender__get_object_detail_summary mcp__blender__render_viewport_to_path mcp__blender__search_api_docs mcp__blender_official__execute_blender_code mcp__blender_official__get_objects_summary mcp__blender_official__get_object_detail_summary mcp__blender_official__render_viewport_to_path mcp__blender_official__search_api_docs
---


## MCP backend

Use when: Texture atlas/UV/baking/lightmap/decal work in Blender; any request involving texture fit, UV islands, project-from-view, texture packs, alpha decals, or baked maps.

Before the first Blender call, read [../text-to-blender/references/mcp-backends.md](../text-to-blender/references/mcp-backends.md). Prefer official MCP for shared capabilities; preserve the selected backend for the whole task. Tool names in recipes are client/legacy examples: map them through that reference and its agent-host guide.
# Blender UV Texturing

This skill fills the gap between “assign a material” and “the supplied texture pack actually fits the model.” It is mandatory for template/atlas-driven assets.

## Decision tree

```
What does the texture represent?
├── Whole object from front/reference → Project-from-View style UVs from the validation camera
├── Atlas with separate parts         → crop/map each part to its own UV island/rectangle
├── Repeating material                → generated/object coords or tiled UVs
├── Face/expression decal             → alpha material plane or projected UV island; no black background
├── Roughness/bump/normal map         → Non-Color data, correct node type
└── Lightmap                          → separate UV/lightmap channel or optional multiply helper; not emission
```

## Non-negotiable rules

1. Image textures need a material node setup to render/export; viewport UV display alone is not enough.
2. Basecolor/albedo = sRGB. Roughness, metallic, bump, normal, AO/lightmap = Non-Color.
3. Atlas textures must be mapped by region. Never apply a full atlas to every mesh part.
4. Alpha decals must use alpha-connected material settings (`BLEND`, `Alpha Hashed`, or `Alpha Clip`) and a keyed/correct PNG. Do not leave black planes.
5. For GLB, keep to exporter-recognized nodes where possible: Principled BSDF with Image Texture inputs, UVs, normals, tangents.
6. Validate with a checker texture or overlay render before final material tuning.

## Recipes

### Create front-projected UVs from world X/Z bounds

```python
import bpy

def assign_front_projected_uv(obj_name, uv_name='UV_front_projected'):
    obj = bpy.data.objects[obj_name]
    mesh = obj.data
    uv = mesh.uv_layers.get(uv_name) or mesh.uv_layers.new(name=uv_name)
    mesh.uv_layers.active = uv
    xs = [v.co.x for v in mesh.vertices]
    zs = [v.co.z for v in mesh.vertices]
    minx, maxx = min(xs), max(xs)
    minz, maxz = min(zs), max(zs)
    dx = max(maxx - minx, 1e-8)
    dz = max(maxz - minz, 1e-8)
    for poly in mesh.polygons:
        for li in poly.loop_indices:
            co = mesh.vertices[mesh.loops[li].vertex_index].co
            uv.data[li].uv = ((co.x - minx) / dx, (co.z - minz) / dz)
    mesh.update()
```

### Map a mesh to a rectangle in an atlas

Atlas rectangle is `[u0, v0, u1, v1]` in normalized UV coordinates. Use this after creating local 0–1 UVs.

```python
def remap_uv_rect(obj_name, rect, uv_name=None):
    obj = bpy.data.objects[obj_name]
    layer = obj.data.uv_layers.get(uv_name) if uv_name else obj.data.uv_layers.active
    u0, v0, u1, v1 = rect
    for item in layer.data:
        u, v = item.uv
        item.uv = (u0 + u * (u1-u0), v0 + v * (v1-v0))
    obj.data.update()
```

### Image texture material with correct color spaces

```python
import bpy

def image(path, colorspace):
    img = bpy.data.images.load(path, check_existing=True)
    img.colorspace_settings.name = colorspace
    return img

def make_pbr_texture_material(name, basecolor, roughness=None, normal_or_bump=None, alpha=False):
    mat = bpy.data.materials.new(name)
    mat.use_nodes = True
    nt = mat.node_tree
    bsdf = nt.nodes.get('Principled BSDF')
    tex = nt.nodes.new('ShaderNodeTexImage')
    tex.image = image(basecolor, 'sRGB')
    nt.links.new(tex.outputs['Color'], bsdf.inputs['Base Color'])
    if alpha and 'Alpha' in bsdf.inputs:
        nt.links.new(tex.outputs['Alpha'], bsdf.inputs['Alpha'])
        mat.blend_method = 'BLEND'
    if roughness:
        r = nt.nodes.new('ShaderNodeTexImage')
        r.image = image(roughness, 'Non-Color')
        nt.links.new(r.outputs['Color'], bsdf.inputs['Roughness'])
    if normal_or_bump:
        btex = nt.nodes.new('ShaderNodeTexImage')
        btex.image = image(normal_or_bump, 'Non-Color')
        bump = nt.nodes.new('ShaderNodeBump')
        bump.inputs['Strength'].default_value = 0.02
        nt.links.new(btex.outputs['Color'], bump.inputs['Height'])
        nt.links.new(bump.outputs['Normal'], bsdf.inputs['Normal'])
    return mat
```

### Bake target setup

Blender baking requires a UV map and an active Image Texture node or color attribute as the bake target. Use Cycles for baking.

```python
import bpy

obj = bpy.data.objects['GEO-target']
bpy.context.scene.render.engine = 'CYCLES'
img = bpy.data.images.new('BAKE_target', 2048, 2048, alpha=True)
mat = obj.data.materials[0]
mat.use_nodes = True
node = mat.node_tree.nodes.new('ShaderNodeTexImage')
node.image = img
mat.node_tree.nodes.active = node
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
bpy.ops.object.bake(type='DIFFUSE', pass_filter={'COLOR'}, margin=16)
img.filepath_raw = '/tmp/bake_target.png'
img.file_format = 'PNG'
img.save()
```

## Closed/extruded surface coverage gate

For closed or extruded assets, do not stop at front projection. Use `closed-surface-uv-coverage` to verify front cap, back cap, and sidewall material/UV/generated coverage separately. Back/side curve overlays are accents, not texture fill.

## Validation checklist

- [ ] UV layer exists and is active.
- [ ] Checker texture shows no obvious stretching on front-facing parts.
- [ ] Atlas rectangles are per-part, not whole-atlas everywhere.
- [ ] Roughness/bump/normal/lightmap color spaces are Non-Color.
- [ ] Alpha material has blend mode set and no black backing plane.
- [ ] Base GLB embeds/exports expected images and excludes reference planes.
- [ ] A front overlay render confirms the texture aligns with the source template.

## Sources distilled

- Blender Manual: UV/Image texture workflow requires material nodes for rendered texture output.
- Blender Manual: Image Texture node uses active UV map when Vector is unconnected.
- Blender Manual: Cycles baking requires a UV map and active Image Texture/Color Attribute target.
- Blender Manual: glTF exporter supports meshes, UVs, textures, and materials based mainly on Principled BSDF.
- Khronos glTF PBR: base color, metallic/roughness, normals and related maps are core concepts for realtime transfer.

© RobLe3 · MIT · RobLe3/cc-blender-skill

Similar skills

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

From the same set28

blender-export Exports Blender scenes to glTF/GLB, FBX, OBJ, USD and STL with settings tuned to the target platform. Useful when a model has to ship to Unity, the web or a 3D printer. CX Codex +1 1,400installs reference-to-3d Builds a Blender model from reference sheets, texture atlases and orthographic views when matching the source matters more than a plausible object. CX Codex +1 1,300installs blender-lighting Configures studio, outdoor, and cinematic lighting in Blender scenes using automated Python recipes via MCP. CX Codex +1 1,200installs blender-cameras Configures Blender cameras using cinematic rules: sets focal length, f-stop depth of field, tracking constraints, and auto-frames subjects. CX Codex +1 1,100installs text-to-blender Drives Blender via MCP backends from natural language prompts. It handles 3D modeling, procedural materials, lighting, camera setup, and test renders without manual UI clicks. CX Codex +1 1,000installs animation-quality-gate Validates Blender animations with contact sheets and silhouette checks before accepting passes. Catches texture flickering and broken GLB exports. CX Codex +1 822installs blender-skill-harmonizer A meta-layer for a Blender skill stack: it sets activation precedence, handoff artifacts and conflict rules when one task pulls in several skills at once. CX Codex +1 830installs reference-analysis-validator The skill measures reference images and Blender renders and blocks a 1:1 claim until the metrics pass. CX Codex +1 826installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor