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

blockbench-substance — скилл для Claude Code

Скилл blockbench-substance связывает Blockbench с Substance 3D: рендерит .sbsar в PBR-карты, печёт AO и ID с модели, расписывает её в Painter и пакует результат в texture_set.json.

Apache-2.0 212 установок ★ 30 обновлён 2026-09-26

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add jasonjgardner/blockbench-mcp-project --skill blockbench-substance -a claude-code
Открыть на GitHub

Что делает blockbench-substance

Скилл связывает Blockbench с инструментами Adobe Substance 3D: Designer, Painter и командными строками Substance Automation Toolkit. Он нужен, когда материал уже лежит в виде .sbsar или .sbs либо модель надо расписать в Painter. Обычная покраска текстур и производные normal-карты решаются другими скиллами.

Сначала scripts/sat_locate.py ищет исполняемые файлы. sbsrender, sbscooker, sbsupdater и substance3d_baker лежат внутри Designer вне PATH, а sbsmutator и pysbs приходят только с отдельным SAT. Если ничего не нашлось, работа останавливается. Дальше sat_render.py рендерит процедурный материал в карты нужного размера, substance3d_baker печёт AO, кривизну и ID с экспортированной модели, painter_remote.py управляет Painter по HTTP. Готовые карты prep_maps.py упаковывает в MER и texture_set.json.

Нужна лицензионная установка Substance 3D. Перед запеканием придётся развести UV: авто-UV на блочных форматах кладёт грани друг на друга и портит бейк. Painter не открывает glTF, поэтому модель выгружается в obj. Ещё одна ловушка — 16-битные PNG после обычного перевода в 8 бит уходят в белый, для этого есть prep_maps.py convert.

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

  • отрендерить процедурный .sbsar в текстуры 16×16 для блочной модели
  • испечь AO и карту кривизны по экспортированному .glb
  • расписать модель в Painter и забрать карты обратно в проект
  • собрать Bedrock MER из отдельных metallic и roughness
  • перевести 16-битные карты в 8 бит без пересвета

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

  • Отрендери material.sbsar в 32 пикселя и повесь baseColor на модель
  • Испеки AO с model.glb и умножь его на цветовую текстуру
  • Собери MER из out/m_metallic.png и out/m_roughness.png в final/model_mer.png

Как установить blockbench-substance

1Через Skills CLI (Vercel)

npx skills add jasonjgardner/blockbench-mcp-project --skill blockbench-substance -a claude-code

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

~/.claude/skills/blockbench-substance/SKILL.md

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

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

Вопросы о blockbench-substance

Как установить blockbench-substance в Claude Code?

Выполните npx skills add jasonjgardner/blockbench-mcp-project --skill blockbench-substance -a claude-code. Файл скилла окажется по пути ~/.claude/skills/blockbench-substance/SKILL.md.

Что делает blockbench-substance?

Гоняет материалы и карты между Blockbench и Substance 3D: рендер .sbsar, запекание масок, покраска в Painter, упаковка в texture_set.json.

Что нужно для работы blockbench-substance?

Лицензионная установка Substance 3D. sbsmutator и pysbs есть только в отдельном Substance Automation Toolkit, а Painter запускается с --enable-remote-scripting.

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

SKILL.md · Apache-2.0
---
name: blockbench-substance
description: Optional, advanced pipeline between Blockbench and Adobe Substance 3D (Designer, Painter and the Substance Automation Toolkit command lines). Use only when the user has Substance installed and asks for it — render .sbsar procedural materials to Blockbench-sized PBR maps with sbsrender, cook .sbs graphs with sbscooker, bake AO/curvature/normal/position/ID maps from a Blockbench export with substance3d_baker, drive Substance 3D Painter over its remote-scripting HTTP API to paint a Blockbench model and export Bedrock MER or glTF maps, and pack results into texture_set.json. Triggers on Substance, Substance 3D, Substance Designer, Substance Painter, SAT, Substance Automation Toolkit, sbsar, .sbs, sbsrender, sbscooker, sbsmutator, sbsupdater, sbsbaker, substance3d_baker, pysbs, bake AO for Blockbench, Painter export to Blockbench. Not needed for ordinary painting, generated textures or derived normal maps.
---

# Blockbench + Adobe Substance 3D

**Optional and advanced.** Most Blockbench work never needs this: paint with [blockbench-texturing](../blockbench-texturing/SKILL.md), generate with [blockbench-gpt-image-textures](../blockbench-gpt-image-textures/SKILL.md), derive normal/MER with [blockbench-albedo-to-pbr](../blockbench-albedo-to-pbr/SKILL.md). Use this skill only when the user asks for Substance or already has `.sbsar`/`.sbs`/Painter assets. It needs a licensed Adobe Substance 3D install. Load [blockbench-use](../blockbench-use/SKILL.md) first and [blockbench-pbr-materials](../blockbench-pbr-materials/SKILL.md) to assign results.

Substance produces **image files**. Blockbench stays the source of geometry and UVs. Every path ends with files imported through `create_texture` (`data`, `pbr_channel`) or `import_texture_set`.

## 0. Locate the tools

```bash
python scripts/sat_locate.py
```

Designer bundles `sbsrender`, `sbscooker`, `sbsupdater` and `substance3d_baker`, off PATH, in `C:\Program Files\Adobe\Adobe Substance 3D Designer\`. `sbsmutator` and the `pysbs` Python API come only with the standalone Substance Automation Toolkit. Painter is a GUI app driven over HTTP. If nothing is found, stop and tell the user; do not install Adobe software.

## Pick the path

| Goal | Tool | Reference |
|---|---|---|
| Procedural material (bricks, rust, leaves) as Blockbench textures | `sat_render.py` → `sbsrender` | [sat-cli.md](references/sat-cli.md) |
| Have a `.sbs` graph, need an `.sbsar` | `sbscooker` (`sbsupdater` first if old) | [sat-cli.md](references/sat-cli.md) |
| Edit/specialise a `.sbs` headlessly | `sbsmutator` (SAT only) | [sat-cli.md](references/sat-cli.md#sbsmutator) |
| AO / curvature / ID / position masks from the model | `substance3d_baker` | [baker.md](references/baker.md) |
| Hand-paint the model with smart materials | Painter + `painter_remote.py` | [painter.md](references/painter.md) |
| Pack Bedrock MER, convert bit depth, flip normal green, shrink | `prep_maps.py` | below |

## Workflow A: procedural material → Blockbench

```bash
python scripts/sat_render.py material.sbsar --out out --size 16 --seed 7 \
  --set Season=0.8 --normal-format directx
```

- `--size` is pixels; the script converts to log2 `$outputsize` (raw `sbsrender` needs `'$outputsize@4,4'` for 16 px). It creates `--out`; raw `sbsrender` exits 47 if the folder is missing.
- Read `inputs` from the JSON report, then set parameters by identifier. Unknown identifiers come back as `warnings`, because `sbsrender` ignores them silently.
- Match outputs to channels by `usages`: `baseColor`/`diffuse` → color; `normal`; `height`; `metallic` + `roughness` (or `glossiness`, inverted) + `emissive` → MER.
- Output is 8-bit by default. Tiling block textures render straight at 16/32 px. For atlases, render at the atlas size or larger and shrink.

## Workflow B: bake masks from the Blockbench model

1. **Fix UVs**: every face needs its own UV rectangle. Default per-face Auto UV on block formats stacks faces on top of each other and ruins the bake. See [baker.md § Prepare](references/baker.md#prepare-the-blockbench-mesh).
2. `export_model` → `codec_id: "gltf"`, `options: {"encoding": "binary"}`, `path: <abs>.glb` (or `obj`).
3. Bake at 8–16× density with **underscore** flags (the online docs show hyphens, which fail):
   ```bash
   substance3d_baker AmbientOcclusion.Raytraced model.glb --use_lowdef_as_highdef true --output_size 512,512 --output_path bake
   ```
4. `python scripts/prep_maps.py convert bake/*.png --out bake/64 --size 64` (16-bit → 8-bit, box downsample).
5. Use the maps as masks: multiply AO into the colour texture, or feed them to `sbsrender --set-entry` / Painter.

## Workflow C: paint in Painter, bring maps back

1. Fix UVs, then `export_model` with `codec_id: "obj"`. Painter cannot import glTF.
2. Start Painter with `--enable-remote-scripting` (never `--help`: it opens the app), then:
   ```bash
   python scripts/painter_remote.py --ping --wait 240
   python scripts/painter_remote.py --python-file scripts/painter_new_project.py --result \
     --set MESH=C:/work/model.obj --set NORMAL=DirectX --set RESOLUTION=1024 --set BAKE=1
   ```
3. The user paints in Painter (or you script layers after reading the local API docs).
4. Export and shrink:
   ```bash
   python scripts/painter_remote.py --python-file scripts/painter_bedrock_export.py --result \
     --set OUT=C:/work/painter_out --set NAME=model --set PRESET=bedrock --set SIZE_LOG2=9
   python scripts/prep_maps.py convert C:/work/painter_out/model*.png --out final --size 64
   ```
   `bedrock` gives `NAME.png`, `NAME_mer.png`, `NAME_normal.png` (DirectX). `gltf` gives ORM + OpenGL normal. Painter never exports below 128 px, and skips maps whose channel is absent. Trust the `files` list in the result.

## Pack and import

```bash
python scripts/prep_maps.py pack-mer --metallic out/m_metallic.png --emissive 0 --roughness out/m_roughness.png --out final/model_mer.png
python scripts/prep_maps.py texture-set --color model --mer model_mer --normal model_normal --out final/model.texture_set.json
```

Constants are 0–255; `--glossiness` replaces `--roughness` and is inverted. Then `import_texture_set` with the JSON path, or `create_texture` per file (`pbr_channel`: `color`/`normal`/`height`/`mer`) + `create_pbr_material`. Normal **or** height, never both.

## Conventions and verification

- **Normals**: Bedrock → DirectX (green-down), glTF/Java labPBR → OpenGL. Baker default is `directx`. A graph's `$normalformat` is graph-defined (one tested graph flipped red, not green), so compare renders or use `prep_maps.py convert --flip-green`. After import, raised features must read as raised in the Blockbench preview.
- **16-bit trap**: AO/curvature/height PNGs are often 16-bit; `PIL.Image.convert("L")` clips them to white. Use `prep_maps.py convert` or `--output-bit-depth 8`.
- **Paths**: pass `C:/...` paths to the executables; `/c/...` from Git Bash breaks `--alias`. Quote `'$outputsize@...'`.
- **Blockbench project safety**: note the project UUID before export and import, and confirm it before writing textures back.
- Check each imported map with `list_textures`/`get_texture` and a `capture_screenshot`. A blank-white or uniformly gray map means the bit depth, UV overlap or parameter was wrong. It is not a stylistic result.

© jasonjgardner · Apache-2.0 · jasonjgardner/blockbench-mcp-project

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
substance-3d-texturing-pipeline Claude Design Skillstack Субагент substance-3d-texturing-pipeline для выгрузки ассетов из Substance 3D: готовит текстуры и материалы к веб-доставке, собирает скрипты пакетной обработки и проверяет качество. CX Codex ★ 1 428звёзд репо substance-3d-texturing freshtechbro Скилл substance-3d-texturing для работы с Substance 3D Painter: помогает писать PBR-материалы, выгружать текстуры под Three.js, Babylon.js, Unity и Unreal и автоматизировать экспорт через Python API. CX Codex +1 2 700установок scenario-textures scenario-labs Скилл scenario-textures генерирует бесшовные текстуры и PBR-карты через Scenario MCP без разрыва краевых стыков. Пригодится при подготовке материалов для 3D-моделей и игровых движков. CX Codex +1 1 100установок scenario-patina-retexture scenario-labs Скилл scenario-patina-retexture перекрашивает готовую 3D-модель в PBR-материалы PATINA через MCP-сервер Scenario. Геометрия остаётся на месте: меняются только шейдеры и карты. CX Codex +1 913установок 3d-high-resolution-textures MengTo Скилл 3d-high-resolution-textures помогает подобрать разрешение и PBR-карты для 3D-материалов, чтобы близкие планы выглядели резко, а GPU-память не улетала в потолок. CX Codex +1 870установок blender-texturing blender-agent-skills Скилл blender-texturing для Claude Code автоматизирует создание текстур и слоёв умных материалов в Blender 5.3. Запускается при настройке износа, грязи или декалей на 3D-моделях. CX Codex +1 431установок

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

Весь набор →
blockbench-hytale Скилл blockbench-hytale ведёт агента через MCP-инструменты Blockbench: форматы Hytale, UV, растяжение кубов, шейдинг, аттачменты и анимации. Нужен плагин Hytale Models. CX Codex +1 930установок blockbench-plugins Скилл blockbench-plugins помогает разрабатывать плагины на JavaScript для 3D-редактора Blockbench: от меню и диалогов до операций с мешами и транзакций отмены. CX Codex +1 737установок blockbench-gpt-image-textures Скилл blockbench-gpt-image-textures генерирует текстурные атласы, скины и тайлы для моделей Blockbench через модели OpenAI GPT Image 2.5 на fal.ai с учётом UV-развёртки. CX Codex +1 294установок blockbench-new-model Скилл blockbench-new-model собирает модель Blockbench, сцену Blender и файлы для рендера. Подходит для новых 3D-сцен, анимаций и видео. CX Codex +1 286установок blockbench-flipbook-textures Скилл blockbench-flipbook-textures создаёт анимированные flipbook-текстуры для Blockbench и Minecraft. Переводит сетки кадров в вертикальный PNG с расчётом таймингов. CX Codex +1 281установок blockbench-vanilla-textures Скилл blockbench-vanilla-textures загружает оригинальные текстуры Minecraft из репозитория Mojang и накладывает их на грани моделей в Blockbench. CX Codex +1 273установок blockbench-particles Скилл blockbench-particles для Claude Code настраивает Bedrock-частицы и локаторы моделей в Blockbench через MCP. Настраивает эффекты огня, дыма, искр и магии для Minecraft Bedrock и GeckoLib. CX Codex +1 259установок blockbench-albedo-to-pbr Скилл blockbench-albedo-to-pbr генерирует карты высот, нормалей и упакованные слои MER из базовой текстуры для PBR-материалов в Blockbench. CX Codex +1 248установок

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

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