Turn a 2D concept into a 3D model locally - MOSS concept (art-forge-loop), TRELLIS.2 image-to-3D in ComfyUI, optional Hi3D refine to a detailed sculpt, then measure it against your Blender model or clean it into a game mesh and deterministic animated sprite sheet. Use when asked to make a 3D creature, prop, character or animated HUD asset from a concept, or to check a model's proportions against its concept art.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Concept To 3d?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/barretv-concept-to-3d)
---
name: concept-to-3d
description: Turn a 2D concept into a 3D model locally - MOSS concept (art-forge-loop), TRELLIS.2 image-to-3D in ComfyUI, optional Hi3D refine to a detailed sculpt, then measure it against your Blender model or clean it into a game mesh and deterministic animated sprite sheet. Use when asked to make a 3D creature, prop, character or animated HUD asset from a concept, or to check a model's proportions against its concept art.
metadata:
category: gamedev
tools: comfyui, blender, python
---
# Concept → 3D: MOSS concept → TRELLIS.2 → (Hi3D) → Blender
```
art-forge-loop (illustration mode) ComfyUI, GPU Blender / CPU
side concept ──────────────► TRELLIS.2 coarse mesh ──► Hi3D 512→1024 sculpt ──► measure, or clean + zone + rig
(and a 3/4) (~3.5 min at 6 GB) (9-11 min at 6 GB) (blender-anim verifies)
```
Two ways to use the sculpt:
1. **Sculpt donor (safest).** The sculpt is a measuring stick: compare your hand-built or procedural Blender model to it and move proportions toward it. The sculpt never ships.
2. **Sculpt as the model.** Clean, decimate and colour-zone the sculpt itself, then rig it. Faster, but generated sculpts are mushy in small parts (faces, claws, plate edges); rebuilding those parts as clean geometry on the sculpt's body (a hybrid) reads best.
## GPU safety (read before any GPU job)
Generation is heavy and long. On small or laptop GPUs, stacked GPU work can hang or reboot the machine.
- **One GPU job machine-wide.** Check `nvidia-smi --query-gpu=utilization.gpu,memory.used --format=csv`, plus running ComfyUI, Blender renders, browsers running WebGL and other agents. Wait for them; never start a second job alongside.
- **Cool down** about 60-90 s between heavy jobs. **Stop ComfyUI** when you finish.
- If `gpu_lock_dir` is set in `~/.asset-kicking-skills/config.json`, take the lock (create a file in it named after your job) before a GPU job and delete it after.
- Everything after generation (measuring, clay renders, cleanup) runs on the CPU.
## Needs
- ComfyUI 0.42 or newer (TRELLIS.2 is a core node from about 0.45; `Hi3D` needs the `ComfyUI-Hi3D` custom node).
- Model bundles `trellis2` (and `hi3d` for the refine) from `setup/models.py`.
- Blender 4.4+ on PATH (or `BLENDER_PATH`), Python with numpy and Pillow for the CPU tools.
- The tier's ComfyUI launcher from `setup/launcher.py` (6 GB: `--lowvram --reserve-vram 0.7 --vram-headroom 0.5 --disable-smart-memory --cache-none`).
## 1. Make the concept
Use `art-forge-loop` in illustration mode. Ask for a **side view** on a plain background, full body, nothing cropped, and a 3/4 view as a second opinion. Pick one per view at 9+ on your bar.
**Use the side concept for 3D.** A 3/4 painting foreshortens the near limbs and TRELLIS.2 builds them literally: in one test the 3/4 sculpt came out 60% wider than the side sculpt of the same creature.
## 2. Generate (GPU)
1. Pad the concept to a square and copy it to `ComfyUI/input/<name>.png`. BiRefNet cuts it out inside the graph.
2. Start ComfyUI with the general launcher, then build the graphs (they adapt to the installed ComfyUI by reading `/object_info`):
```bash
python <skill>/bin/build_graphs.py work/graphs --image <name>.png --name <tag>
```
Options: `--seed` (Hi3D), `--tseed` (TRELLIS.2 structure), `--stages 512,1024` (add `,1536` on 8 GB+), `--no-remesh`, `--dino <file>` if your TRELLIS.2 image encoder has another name.
3. Coarse mesh (TRELLIS.2, ~3.5 min at 6 GB):
```bash
python <skill>/bin/run_prompt.py work/graphs/<tag>_coarse.api.json
```
4. Copy `ComfyUI/output/hi3d/<tag>_coarse_*.glb` to `ComfyUI/input/3d/<tag>_coarse.glb`, then refine (Hi3D, 9-11 min for 512→1024 at 6 GB, peaks near 5 GB):
```bash
python <skill>/bin/run_prompt.py work/graphs/<tag>_refine.api.json
```
Stop here if you only need a coarse shape: the TRELLIS.2 mesh alone is often enough as a proportion guide.
5. Stop ComfyUI.
## 3a. Use it as a sculpt donor (CPU)
```bash
blender -b --factory-startup -P <skill>/bin/hi3d_export_mesh.py -- model.glb model.npz
blender -b --factory-startup -P <skill>/bin/hi3d_export_mesh.py -- sculpt.glb sculpt.npz --max-faces 300000
python <skill>/bin/hi3d_compare.py model.npz sculpt.npz out/cmp # IoU per view + overlay PNG + align json
python <skill>/bin/hi3d_measure.py model.npz sculpt.npz out/cmp.json # head, limbs, shoulder, haunch, tail sizes
blender -b --factory-startup -P <skill>/bin/hi3d_render.py -- sculpt.glb out/cmp.json out/clay # CPU clay renders
python <skill>/bin/hi3d_sheet.py out/sheet.webp --title "My creature" --row "side" concept=c.png before=b.png sculpt=out/clay-side.png after=a.png
```
- Game axes: +Y up, +Z forward. The compare picks the yaw, scales the sculpt to the model's length and puts it on the model's floor (Hi3D output is normalised to unit radius and has no floor).
- Move your build's proportions where **both** sculpts (side and 3/4) agree; where they disagree, trust the side one or go halfway. Re-run until IoU stops improving.
- `hi3d_measure.py` regions are fractions of the bounding box tuned for quadrupeds; edit `REGIONS` for other body plans.
- What it gave on its first use: silhouette IoU up in every view, stance width, haunches and hump settled with numbers. What it did not give: a better face. It fixes **proportions and masses**, not detail.
## 3b. Use the sculpt as the model (CPU, Blender)
1. **Clean:** import in game axes, scale to the intended size, voxel remesh (about 0.02 of the body length) to close holes, delete floating islands, symmetrize from the better side, put the lowest point on the floor. Use the 1024 sculpt; 1536 detail does not survive a game budget.
2. **Colour zones on the full-res mesh:** register the concept to the side silhouette (an affine fit is enough) and take big regions from it; take small parts from geometry (claws and teeth by thin ray thickness, mouth by openness, eyes by raycast).
3. **Decimate** (Collapse, X symmetry) with the zone borders protected by a vertex group. Give each low-poly face the zone most of its nearest hi-res faces have, then merge tiny islands.
4. **Rig and animate** with `blender-anim` (SkinTokens or capsule-distance weights for simple quadrupeds), then gate with its `verify.py`.
Toon-shading rules learned the hard way:
- One solid colour per face per region; nothing finer than the face size (it reads as splotches).
- Smooth the **shading normals**, not the colours: a Taubin-smoothed copy written as custom normals; otherwise sculpt micro-detail breaks a toon ramp into mottle.
- Keep neighbouring tones close so a wandering border does not show.
- Emissive lines only on long connected edge chains (24+ vertices); short ones read as smudges.
**Hybrid (best read so far):** keep the cleaned sculpt's body for its mass and rebuild the parts that carry the read as clean geometry: the head from ellipsoids in a head-local frame, armour plates as Voronoi slabs with bevels over a glowing under-layer, claws and crystals as faceted tubes. Copy skin weights from the nearest body vertex, keep hard parts rigid on their bone, and drop loose vertices after decimating.
## 3c. Front concept -> game prop: crop the source, then bake PBR maps
A front-planar texture is a useful **source and preview**, not the shipped
material for a free-orbit 3D prop. A plate from the full concept frame samples
background on every near-horizontal face (the top of a booth, slab, cart or
altar), which is why those props used to render lavender or grey. Do not patch
that with a flat second material on the top faces; unwrap the mesh and bake a
real map set:
1. **Prepare the color donor.** Render or crop the concept to an opaque,
edge-bled plate (step 3d). Keep the raw generation and cropped plate as
separate hashes. This plate is only a donor; the final map is baked from it.
2. **Keep the pre-map low and an aligned high.** Clean/decimate the TRELLIS
low mesh to the game budget. Keep a higher-resolution aligned copy of the
same generation (60k target is enough at this scale) as the normal/AO bake
source. Preserve the prepared low GLB before installing any baked version.
3. **Unwrap with measured candidates, not one guessed angle.** Keep the
prepared low's donor UV untouched as `FrontUV`, then try the six pack
families on the real game UV: Smart UV at 66 and 89 degrees, each with and
without `average_islands_scale`, plus two dense pack-only passes
(island margin 0.004/pack 0.0005 and island margin 0.003/pack 0.001).
`uv.pack_islands` is always `rotate=True, scale=True`; averaged candidates
use `CONCAVE` and a 0.001 pack margin. Keep the candidate with the largest
measured UV footprint; record every candidate's coverage in the bake
receipt. Averaged islands are the default and equalise texel density; a
pack-only candidate is allowed only as a reviewed exception for flat,
lattice or dense hard-surface meshes where it materially wins (the receipt
keeps the averaged alternative). Delete the donor `FrontUV` before export
so the shipped GLB has exactly one real game UV set.
**Measured result on the 46-asset carnival set:** coverage rose from
0.244-0.884 to 0.446-0.933 and every asset's texel density strictly
improved. The audit floor is now **0.42**, with the nine pack-only
exceptions listed by name and reason in the style audit.
4. **Bake the set** with `bake_game_maps.py`: **2048 base color (JPEG), 2048
tangent normal (PNG), 1024 AO and 1024 roughness (JPEG)**, then assemble one
Principled material and export with `export_morph=True` so baked `Idle`
clips survive. Use the authored concept/atlas as the color donor, a small
low-frequency carnival-palette overlay, and no flat top-face material.
**Measured ceiling on the target machine:** 2048 took 14-16 s and
1.1-1.2 GB peak per prop and produced 4.3-9.9 MB GLBs; 4096 took 38.5 s,
4.26 GB and produced a 12.36 MB GLB (projected ~570 MB for 46 assets), so
2048 is the highest practical setting. Keep the 60k high mesh at 64 voxel
cells: a 120k cap produced no extra triangles on shop/booth/soul-jar, and
128 cells took 68 s / 8.26 GB and visibly noisier normals. Record the
rejected settings and their real numbers next to the chosen one.
5. **Never re-bake a baked GLB.** Its base map is already palette-mapped and
the next bake compounds the palette into orange/teal speckle. Always bake
from the preserved pre-map low (or from the original prepared asset), not
from `public/art/models`.
6. **Gate the map set, not just the GLB.** The 3D audit must parse
`baseColorTexture`, `normalTexture`, `occlusionTexture` and
`metallicRoughnessTexture`, gate 2048/2048/1024/1024 minimums, compute UV
coverage from `TEXCOORD_0` at the 0.42 floor, and hash every baked map. The
style audit must compare every asset against its previous UV receipt
(coverage and texel density must both strictly improve), check the baked
base map's saturation and luma as well as its palette coverage, and reject a
non-averaged pack that is not in the documented exception ledger. A GLB with
only a 64 px embedded texture is not a material pass.
Do not use `rembg` on an opaque plate if the renderer can emit alpha: it is much
slower and it still leaves the margin/bbox problem. Keep the raw generation page
and the **cropped texture** as separate recorded hashes; they are different
inputs.
## 3d. Crop and seal the concept plate
A front-planar texture taken from the **full** concept frame samples the
backdrop on near-horizontal faces and renders lavender or grey. Fix the donor
at the source:
1. Render the concept with **transparent film** and RGBA
(`scene.render.film_transparent = True`,
`image_settings.color_mode = 'RGBA'`) in orthographic front view, same
framing as the game model.
2. Crop to the object's **alpha bounding box**, paste it on the world
background color and resize to 512. Project the donor UVs in that cropped
box; do not hand-wave the object's margins into the texture.
3. Verify with a 3/4 CPU render and in the game itself; a front clay render
hides the top-face bug. If a prop still reads wrong, the concept silhouette
or the crop is wrong before it is a material problem.
## Game engine handoff
The outputs are engine-neutral: a GLB (glTF 2.0 with an embedded sRGB texture) loads in Godot, Unity
(glTFast), Unreal (glTF importer), Blender and three.js, and a sprite sheet with its JSON metadata works in
any engine or a CSS/canvas UI. Use the project's own renderer; this skill never asks a game to change stacks.
Check the asset in the game itself, not only in a Blender render: load the GLB in the project's real scene,
with its real lighting, outline and post effects, and look at it from the gameplay camera.
**If the game is a three.js / React Three Fiber web game:** load the GLB with `GLTFLoader` (or drei's
`useGLTF`), yaw it toward the gameplay camera, and keep the project's post-processing composer in the render
path when you check it: an asset that only looks right with the effects removed is not done.
## 4. Ship a game target: GLB prop or animated HUD sprite (CPU)
The same refined sculpt can become two kinds of real game file. Both passes are
deterministic and write a JSON receipt with every input hash.
**A. 3D prop (GLB).** Use a prepared game mesh when the game has a real
`GLTFLoader` path; do not substitute a flat billboard. First turn the generated
RGBA cut-out into an opaque, edge-bled texture: front-planar UVs sample the
whole texture rectangle, so transparent margins would otherwise produce black
fringes. The same pass removes MOSS's detached violet floor shadow.
```bash
python <skill>/bin/prepare_concept_texture.py \
art/source/prop-concept-hi.png art/textures/prop.png \
--max-px 512 --drop-shadow --drop-bottom-islands \
--report art/build/prop-texture.json
blender -b --factory-startup --python-exit-code 1 \
-P <skill>/bin/prepare_game_mesh.py -- sculpt.glb public/art/models/prop.glb \
art/textures/prop.png --max-tris 24000 --height 2.4 \
--report art/build/prop.json
```
`prepare_concept_texture.py` crops to the real alpha bounds, diffuses the
object colour into transparent pixels, makes the result RGB, and records the
input/output hashes. Use `--drop-shadow` for flat-lit concepts with a floor
shadow; use `--drop-bottom-islands` for detached shadow blobs.
`prepare_game_mesh.py` decimates on import (Hi3D 512 outputs are still 1-2M triangles; never feed
the 23M coarse mesh to a decimator), floors and centres the object, fits an
exact height, creates a front-planar UV, binds the painted concept as an
embedded sRGB texture, validates the mesh, and exports one GLB. `+Z` is the
painted front and `+Y` is up after the glTF export. Yaw the model toward the actual
gameplay camera in the engine (a camera on +X/+Z needs about 45°, `Math.PI / 4` in three.js) and put any
inverse-hull outline in the renderer.
**B. Animated HUD sprite.** Render real geometry as a short, deterministic loop,
then compose the sheet and timing metadata the game reads.
```bash
blender -b --factory-startup --python-exit-code 1 \
-P <skill>/bin/render_sprite_sheet.py -- art/build/prop.glb \
art/build/frames --frames 8 --fps 12 --anim glitch --size 128 --view front
python <skill>/bin/build_sprite_sheet.py art/build/frames \
public/art/ui/prop-idle.png art/ui/prop-idle.json \
--frames 8 --fps 12 --outline 3 --sheet-url art/ui/prop-idle.png \
--source art/build/prop.glb
```
`render_sprite_sheet.py` uses an orthographic front camera, transparent film,
the baked concept as emission (so lighting cannot drift the palette), and
looping authored transforms. `build_sprite_sheet.py` derives the dark outline
from alpha, defaults to a 1-column vertical strip, and writes `columns`, `rows`,
`frames`, `fps`, `duration`, frame/sheet hashes and the source hash. A game can
consume the JSON directly (a CSS vertical strip uses `background-size: 100%
<rows*100>%` and advances one row per frame).
Run the composer and texture contract tests on CPU with
`python -m unittest bin.test_game_pipeline -v` (sheet dimensions, metadata,
grid layout, missing-frame failure, opaque texture shadow removal,
byte-identical repeats, and that the skill stays engine-neutral).
**C. Variant passes on a prepared GLB (CPU).** Once a prepared game GLB is
approved, do not pay for new image-to-3D geometry for a palette/skin variant.
Reuse the donor's mesh, UVs and baked animation:
```bash
blender -b --factory-startup --python-exit-code 1 \
-P <skill>/bin/reskin_game_glb.py -- \
public/art/models/crowd-frog.glb art/textures/crowd-reptile.png \
public/art/models/crowd-reptile.glb
blender -b --factory-startup --python-exit-code 1 \
-P <skill>/bin/bake_idle_morph.py -- \
art/build/crest-static.glb public/art/models/stage-crest-3.glb
```
`reskin_game_glb.py` replaces every embedded image and re-exports animations,
morphs and the material. `bake_idle_morph.py` adds a small two-second looping
`Idle` shape key to a single-mesh static prop; the game keeps its inverse-hull
outline static while the painted mesh breathes. It refuses a mesh that already
has an `Idle` key rather than double-baking the clip. Both scripts print a JSON
receipt with animation names and morph counts; check that the expected `Idle`
clip survives before wiring the file.
For a set of world crests, use one approved donor geometry with a different
prepared front-planar texture per world, keep the same authored height/floor
contract, and bake the same `Idle` clip. This is a variant pass, not a new
pipeline. In the live proof, sample the mixer's `time` before/after a real frame
gap and require advancement. A 30 fps proof may show only the game's capped
delta (`Math.min(dt, 0.05)`), so do not demand a wall-clock second; one capped
frame still proves the mixer is wired and advancing.
**D. A prop kit is one atlas plus one Blender build.** When a scene needs a
family of small static props (shops, stalls, machines, furniture, plants), do
not run image-to-3D once per prop: the palettes and edge language diverge.
Author one padded painted atlas (one cell per material role), model the props in
Blender at a shared authored height, UV each prop to atlas cells, join each
static prop to one mesh, normalize it to a floor pivot and export an embedded-
texture GLB. Keep hierarchy only for props that move, and bake a looping `Idle`
into those. Use image-to-3D for the hero silhouettes, not the whole furniture
set. Gate every GLB in the shipped paths (parse, embedded texture, triangle
budget, static floor, `Idle` on animated props, a game-code consumer) and prove
each animated prop's mixer advances live. Report the Blender-authored kit as
such; do not call it a per-prop TRELLIS pass.
**Verify before wiring:** run the project's audit against the *shipped* paths,
not the frames. A useful gate checks the GLB parses as glTF 2.0, has the
expected triangle budget/height/embedded texture, checks every sprite frame's
alpha, silhouette IoU, motion and loop seam, and compares the shipped file
against an independently produced repeat for byte identity. Make that gate
exit non-zero by pointing it at
a deliberately blank or truncated copy, then restore it. The `art-forge-loop`
style audit is for painted plates; keep the 3D/sprite gate separate.
## Licences (outputs)
- **TRELLIS.2:** MIT. **BiRefNet:** MIT. **DINOv3** (TRELLIS.2's image encoder): Meta's DINOv3 License, commercial use allowed; used locally, never redistributed.
- **Hi3D:** Hi3D Open License 1.0. Commercial use is allowed. Meshes you generate are yours to sell with **no** "Powered by Hi3D" notice and no scale licence, as long as you ship meshes and not Hi3D weights or code. If you build Hi3D itself into a product or service, its branding rule and the 200k MAU / USD 1M per month threshold apply. Read the full text before shipping.
- Do not use UltraTex or FLUX.1-dev texturing (non-commercial), or Hunyuan3D 2.x (its licence excludes the EU, UK and South Korea).
## Traps
1. **Two Hi3D node packs conflict.** Install only `Aero-Ex/ComfyUI-Hi3D`; forks register the same node IDs.
2. **Hi3D sculpts have no scale and no floor**, and a raw 1024 sculpt is 2-4M faces: decimate on import (`--max-faces`) before anything else touches it.
3. **A 3/4 concept makes fat limbs** (see step 1).
4. **Separate parts by material name**, not slot: separate-by-material compacts slots.
5. **Check Blender's exit code** (`--python-exit-code 1`) before spending a GPU run on renders.
## Files
| path | what it is |
|---|---|
| `bin/build_graphs.py` | writes the coarse (TRELLIS.2) and refine (Hi3D) API graphs from `pa_wf01.json` |
| `bin/run_prompt.py` | queues one API graph, waits, prints per-node timing and saved files |
| `bin/pa_wf01.json` | the source workflow (PixelArtistry, MIT; see THIRD_PARTY_NOTICES.md) |
| `bin/hi3d_export_mesh.py` | Blender: dump a GLB's triangles in game axes to .npz |
| `bin/hi3d_compare.py` | CPU: align sculpt to model, IoU per view, overlay, profiles |
| `bin/hi3d_measure.py` | CPU: named mass sizes, model vs sculpt |
| `bin/hi3d_render.py` | Blender Cycles on the CPU: clay renders in the model's frame |
| `bin/hi3d_sheet.py` | Pillow: concept / before / sculpt / after sheet |
| `bin/prepare_concept_texture.py` | CPU: crop, shadow-remove, alpha-bleed and seal a cut-out into an opaque front-planar texture |
| `bin/prepare_game_mesh.py` | Blender: decimate, floor/fit, front-planar donor UV/texture, export the pre-map game GLB |
| `bin/bake_game_maps.py` | Blender: adaptive Smart-UV pack (six candidates), bake 2048 base/normal + 1024 AO/roughness, assemble PBR material, export GLB with `Idle` |
| `bin/bake_idle_morph.py` | Blender: add a baked looping Idle shape key to a single-mesh prepared GLB |
| `bin/reskin_game_glb.py` | Blender: replace a prepared GLB's embedded concept texture while preserving animations |
| `bin/render_sprite_sheet.py` | Blender: deterministic orthographic frame loop from a prepared GLB |
| `bin/build_sprite_sheet.py` | Pillow: alpha outline, vertical/grid sheet, timing + hash metadata |
| `bin/test_game_pipeline.py` | CPU unittest for sheet contract, texture sealing and byte-identical repeats |