К основному содержанию
скилл CX Codex

reference-to-3d — скилл для Claude Code: 3D-модель по референсу

Строит модель в Blender по референс-листам, атласам текстур и ортографическим видам, когда важно совпадение с исходником, а не правдоподобный объект.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add RobLe3/cc-blender-skill --skill reference-to-3d -a claude-code
Открыть на GitHub

Что делает reference-to-3d

Скилл включается, когда у вас есть фронтальный шаблон, вайрфрейм, атлас текстур или арт маскота и модель обязана совпасть с ними. Вместо генерации «похожего» объекта агент сначала вытаскивает из файлов замеры, число видимых частей, силуэты и UV-регионы, а потом строит геометрию под эти цифры. Порядок источников жёсткий: фронтальный вид задаёт силуэт и число частей, атлас — границы материалов и декали, боковой, задний и верхний виды добавляют глубину, но не меняют фронтальную проекцию. Обратная связь вроде «не похоже на референс» или «не то число видимых частей» переводит работу в этот режим.

Перед первой сборкой пишется reference_manifest.json с порогами валидации, а разбор картинок идёт локально через scripts/template_analyzer.py. Дальше в сцене появляется фронтальная плоскость с префиксом REF_, контуры превращаются в сетку, UV ложатся по фронтальным границам или точному региону атласа. Экспорт не делается, пока не пройдут проверки манифеста и наложение рендера на референс.

Для работы нужен Blender MCP и локальный Python с Pillow, OpenCV и numpy. Если их нет, анализ изображений просто не запустится. Для настоящего совпадения 1:1 скилл советует не крутить моделирование ещё раз, а собрать цепочку из reference-analysis-validator, orthographic-registration, contour-to-mesh, atlas-uv-fitting и mascot-logo-reconstruction.

Какие задачи решает

  • построить модель Blender по фронтальному шаблону с точным числом видимых частей
  • разложить атлас текстур по отдельным частям, а не проецировать его целиком
  • свести фронтальный, боковой и верхний виды в одну согласованную геометрию
  • исправить модель после замечания «не похоже на референс»
  • собрать маскота или логотип бренда без радиального дублирования

Примеры запросов агенту

  • Собери модель по front_reference.png, число видимых частей должно совпасть с шаблоном
  • Разложи texture_atlas.png по частям и подгони UV 1:1
  • Сравни рендер с шаблоном и покажи, где силуэт расходится

Как установить reference-to-3d

1Через Skills CLI (Vercel)

npx skills add RobLe3/cc-blender-skill --skill reference-to-3d -a claude-code

2Вручную: положить файлы

~/.claude/skills/reference-to-3d/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/reference-to-3d/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора23

blender-pro-workflow Скилл задаёт порядок работы над 3D-сценой в Blender: от блок-аута и камеры до рендера и экспорта. Пригодится, когда запрос охватывает моделирование, свет и материалы сразу. CX Codex +1 1 300установок blender-animation Скилл для ИИ-агента, который ставит ключевые кадры, настраивает кривые и морф-таргеты в Blender через MCP-сервер. CX Codex +1 1 300установок blender-rendering Настраивает движки Cycles и EEVEE в Blender, выставляет сэмплы, денойзинг и профиль AgX. Помогает генерировать финальные кадры и анимации через агента. CX Codex +1 1 300установок blender-export Скилл выгружает сцены Blender в glTF/GLB, FBX, OBJ, USD и STL с настройками под целевую платформу. Пригодится, когда модель надо отдать в Unity, на веб или в 3D-печать. CX Codex +1 1 400установок blender-lighting Настраивает студийный, кинематографичный или уличный свет в сценах Blender через готовые Python-сценарии и MCP-сервер. CX Codex +1 1 200установок blender-cameras Скилл выставляет камеры в Blender с кинематографическими настройками: подбирает фокусное расстояние, глубину резкости f-stop, трекинг и вписывает объект в кадр. CX Codex +1 1 100установок blender-uv-texturing Скилл для работы с UV-развёртками, атласами и запеканием карт в Blender. Пригодится, когда присланный пакет текстур должен лечь на меш ровно, без растяжений. CX Codex +1 1 100установок text-to-blender Управляет Blender через MCP-сервер по текстовым запросам. Помогает собирать 3D-сцены, настраивать материалы, свет, камеры и запускать рендер без ручной возни в окне программы. CX Codex +1 1 000установок

Похожие

blender-mcp vladmdgolam Скилл для работы с Blender через MCP: осмотр сцены, Python-скрипты, экспорт в GLTF/GLB и разбор потерь материалов. CX Codex +1 2 400установок scenario-blender-expert scenario-labs Направляет агента при 3D-моделировании, ретопологии, риггинге и рендере в Blender через Python или MCP-мост. Помогает проверить меш перед экспортом в игровой движок или на 3D-печать. CX Codex +1 607установок scenario-blender-rigging scenario-labs Скилл для риггинга персонажа, существа или пропа в Blender через Python: метариг Rigify, веса, IK/FK, лицевой риг. CX Codex +1 446установок asset-pipeline rehan-remade Готовит из сгенерированной или нарисованной картинки файлы, которые загрузит движок: кадры спрайтов, полосы анимации, изометрические ракурсы из 3D-модели. CX Codex +1 1 500установок Blender SFKislev Скилл связывает агента с открытым Blender через мост Flue. Он выполняет код в среде bpy без MCP-сервера и возвращает структурированный JSON. CX Codex +1 2 800установок cli-anything-blender HKUDS Скилл, который добавляет stateful-интерфейс командной строки для редактирования 3D-сцен в Blender. Пригодится, когда агенту нужно собрать сцену, назначить материалы или отрендерить кадр без ручного кликанья. CX Codex +1 954установок

Рядом в теме «Геймдев и 3D: Unity, Unreal, Godot, Blender»

Всё по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →

Вопросы о reference-to-3d

Как установить reference-to-3d в Claude?

Выполните npx skills add RobLe3/cc-blender-skill --skill reference-to-3d -a claude-code. Скилл появится в ~/.claude/skills/reference-to-3d/SKILL.md.

Что делает reference-to-3d?

Строит модель в Blender по референс-листам, атласам текстур и ортографическим видам. Сначала измеряет исходники, потом подгоняет геометрию и UV под эти замеры.

Что нужно для работы скилла?

Blender MCP и локальный Python с Pillow, OpenCV и numpy. Без них не запустится разбор изображений.

Исходный текст

SKILL.md · MIT
---
name: reference-to-3d
description: Reconstruct Blender models from supplied reference sheets, branding templates, texture atlases, orthographic front/side/back/top views, or mascot/logo art where visual fidelity to the source is more important than a plausible generated object. Use when the user says the model must match a template, wireframe, texture pack, character sheet, mascot sheet, or brand asset exactly; also use after feedback like "does not look like the reference", "fit the texture 1:1", "wrong number of visible parts", or "compare against the template". Requires Blender MCP plus local Python with Pillow/OpenCV/numpy; pairs with blender-uv-texturing, wireframe-to-3d, blender-modeling, blender-materials, and blender-export.
allowed-tools: Read Bash Glob Grep mcp__blender__execute_blender_code mcp__blender__get_scene_info mcp__blender__get_object_info mcp__blender__get_viewport_screenshot 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__blender__get_screenshot_of_area_as_image mcp__blender_official__get_screenshot_of_area_as_image
---


## MCP backend

Use when: User supplies reference images/templates/texture atlases/orthographic views and wants a model matching them, or repeated visual mismatch feedback requires a reference-locked corrective loop.

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.
# Reference-to-3D Reconstruction

This skill is for **source-locked modeling**: the reference asset is the contract. Do not generate a plausible object from memory and then decorate it. Extract measurements, part counts, silhouettes, and UV regions from the supplied files first, then build the Blender model to satisfy those measurements.

## 1:1 reconstruction upgrade

When the user requires true 1:1 matching, chain these skills instead of attempting another plausible modeling pass:

1. `reference-analysis-validator` for manifest, masks, part counts, overlay gates.
2. `orthographic-registration` for front/side/back/top coordinate agreement.
3. `contour-to-mesh` for silhouette-derived structural meshes.
4. `atlas-uv-fitting` for per-part texture/UV fitting.
5. `mascot-logo-reconstruction` as the full orchestrator for brand mascot/logo work.

Do not export a final asset until the validation JSON and overlay render pass the manifest thresholds.

## Triggered failure mode

If the user says the output does not match the templates/textures/wireframes, stop regular `text-to-blender` generation and enter this workflow. Repeated plausible-but-wrong renders usually mean the missing step is **reference analysis**, not another modeling iteration.

## Source-of-truth hierarchy

1. **Front template / front wireframe**: primary silhouette, visible part count, face/feature positions, brand read.
2. **Texture atlas**: exact part shapes, color/material boundaries, decals, lightmap/aura intent.
3. **Side/back/top views**: depth, stacking order, thickness, backside forms. They must not change the locked front projection.
4. **User feedback**: hard constraints; promote it into validation gates.

## Mandatory preflight checklist

Before Blender modeling, write a small `reference_manifest.json` with:

```json
{
  "source_files": [],
  "primary_view": "front",
  "expected_primary_parts": {"count": null, "labels": []},
  "structural_parts": [],
  "decorative_parts": [],
  "texture_regions": [],
  "validation_thresholds": {
    "front_mask_iou_min": 0.90,
    "bbox_center_tolerance_px": 12,
    "part_count_exact": true
  }
}
```

If the expected part count is unclear, derive it from the reference sheet with the analyzer and show the user the uncertainty instead of guessing.

## Pipeline

### 1. Inventory and classify sources

Classify each provided asset:

- `front_template`: hero brand image or front wireframe.
- `side_view`, `back_view`, `top_view`: orthographic depth references.
- `texture_atlas`: basecolor / albedo atlas containing pieces.
- `decal`: transparent face/expression or detail layer.
- `emissive`, `roughness`, `bump`, `normal`, `lightmap`: material maps.
- `aura/background`: optional visual context, not structural body geometry.

### 2. Analyze images locally

Use `scripts/template_analyzer.py` for first-pass component extraction:

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/template_analyzer.py   --image /path/to/front_reference.png   --out /tmp/front_analysis.json   --mode edges  # use bright_on_dark/dark_on_bright/alpha when cleaner
```

The analyzer returns components with area, perimeter-derived score, bbox, centroid, contour, and approximate class hints. Use `--mode edges` for faint grey wireframes and Otsu modes for clean masks/atlases. Treat this as measurement input, not final authority.

### 3. Lock the front reference in Blender

Create a front reference plane or Image Empty in the same orthographic camera used for validation. Prefix it `REF_` and exclude it from export. Official Blender docs describe Image Empties as reference images/blueprints and support front/back depth, opacity, orthographic-only display, and axis-aligned display.

### 4. Build geometry from source contours

For each structural part:

1. Convert the 2D contour to front-view X/Z coordinates.
2. Generate a quad strip/grid inside that contour.
3. Assign Project-from-View-style UVs based on front X/Z bounds or exact atlas region.
4. Add only shallow Y-depth/crown/extrusion after the front silhouette is locked.
5. Keep part names semantic: `GEO-subject_part_top`, `GEO-subject_face_shell`, etc.

Do not radial-duplicate a mascot unless the reference is truly radial. Logos often have occlusion, intentional asymmetry, and a fixed visible part count.

### 5. Multi-view registration

- Front X/Z is locked first.
- Side view controls Y/Z depth envelope only.
- Top view controls X/Y spread only.
- Back view controls hidden/backside geometry and validation, not front silhouette.

If views disagree, keep the front brand read and document the conflict.

### 6. UV and texture mapping

Chain-load `blender-uv-texturing` when any texture pack is provided. For atlas-driven parts:

- crop or map per atlas region; do not project the whole atlas onto every part;
- front-facing hero surfaces use front-projected UVs;
- side/back surfaces use side/back UV islands, procedural fill, or baked colors;
- alpha decals need transparent material settings and must not introduce black planes;
- lightmaps are optional realtime helpers and should not be connected as emission unless specified.

### 7. Validation gates before export

Always produce:

- `front_preview.png`
- `front_overlay_reference.png`
- `front_mask_validation.json`
- `side_preview.png`
- `back_preview.png`
- `top_preview.png`

Use `scripts/silhouette_validator.py`:

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/silhouette_validator.py   --reference /tmp/reference_mask.png   --render /tmp/render_mask.png   --out /tmp/validation.json
```

Refuse final export if:

- primary part count differs from manifest;
- front-mask IoU is below threshold;
- face/feature centroid is outside tolerance;
- optional aura/decorations are included in the base GLB by mistake.

## Blender code patterns

### Reference plane in front-view X/Z

```python
import bpy

def create_reference_plane(name, image_path, width, height, y=0.2, alpha=0.35):
    img = bpy.data.images.load(image_path, check_existing=True)
    mat = bpy.data.materials.new('MAT-' + name)
    mat.use_nodes = True
    nodes = mat.node_tree.nodes
    bsdf = nodes.get('Principled BSDF')
    tex = nodes.new('ShaderNodeTexImage')
    tex.image = img
    mat.node_tree.links.new(tex.outputs['Color'], bsdf.inputs['Base Color'])
    mat.node_tree.links.new(tex.outputs['Alpha'], bsdf.inputs['Alpha'])
    bsdf.inputs['Alpha'].default_value = alpha
    mat.blend_method = 'BLEND'
    verts = [(-width/2,y,-height/2),(width/2,y,-height/2),(width/2,y,height/2),(-width/2,y,height/2)]
    mesh = bpy.data.meshes.new(name + 'Mesh')
    mesh.from_pydata(verts, [], [(0,1,2,3)])
    mesh.update()
    uv = mesh.uv_layers.new(name='UV')
    for li, uvco in zip(mesh.polygons[0].loop_indices, [(0,0),(1,0),(1,1),(0,1)]):
        uv.data[li].uv = uvco
    obj = bpy.data.objects.new('REF-' + name, mesh)
    bpy.context.collection.objects.link(obj)
    obj.data.materials.append(mat)
    obj.hide_render = True
    return obj
```

### Validation print contract

```python
print('VALIDATE expected_primary_parts=', expected, 'actual=', actual)
print('VALIDATE front_locked=True reference_overlay_rendered=True')
if actual != expected:
    raise RuntimeError('Part-count mismatch; refusing export')
```

## When to stop and ask for human input

Ask for a correction only after generating evidence, e.g. an overlay image or JSON showing ambiguity. Do not ask vaguely. Example: “The analyzer finds N prominent structural components plus M faint background/decorative shapes. Should the GLB include only the structural components?”

## Sources distilled

- Blender Manual: Image Empties for reference images/blueprints; front/back display, opacity, orthographic and axis-aligned controls.
- Blender Manual: Trace Image to Grease Pencil works best from manually prepared black/white images and controlled resolution.
- Blender Manual: Shrinkwrap moves vertices to a target surface and is useful after silhouette lock for conforming secondary details.
- Blender Manual: UV/Image Texture and Project-from-View-style workflows require UV maps and material nodes for renders/exports.
- OpenCV docs: contour moments, area, perimeter, bounding boxes, template matching.
- scikit-image docs: SSIM for image similarity when pixel-MSE is not perceptually meaningful.

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

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой