---
name: game-ready-3d-first-time
description: Specify and generate AI 3D game assets (characters, buildings, resources, terrain) so they come out rig-ready and engine-ready on the FIRST pass - concept prompt rules, an asset spec, a pre-flight checklist before renting GPUs, and the fixed post-process. Use before generating concepts or running image-to-3D for a game, to avoid re-generating, re-rigging and re-paying.
---

# Game-ready 3D assets on the first pass

Hard-won on one RTS project (Oct 2026): concept art (image gen) → image-to-3D (Pixal3D/Trellis in ComfyUI on a
rented GPU) → UniRig auto-rig → retargeted animation → three.js game. Almost every repair we paid for traced back
to something the concept or spec could have prevented. Fixing it upstream costs one prompt; fixing it downstream
costs GPU minutes, agent tokens and owner trust.

## What each upstream mistake cost us
| Upstream mistake | Downstream cost |
|---|---|
| Characters drawn holding weapons/tools (sword, spear, axe on the shoulders, scepter) | Props fused into the mesh; UniRig weighted them to arms and legs, so blades bent like rubber. Needed island/capsule weight pinning, explicit overrides, and rest-arm clips; attacks became body lunges |
| Two-handed pose (hands clasped on a sword) | Cloth weighted to the hands tore whenever the hands separated; locomotion had to freeze the arms |
| Arms down against the body, long cape or robe | Arm/cape weights inseparable; cape tore on runs and casts; clips dropped |
| No defined building front | Buildings showed their back to the camera in-game; the owner said it "looks like crap vs the concept" |
| No material rules | Generated characters had a fake metalness bake (mean 0.17–0.46 on cloth/skin) and a baked AO map: dull, pale, near-black units in three.js |
| Hero-quality image-to-3D for trees and rocks | ~700k-face meshes for objects that appear hundreds of times; GPU capacity wait blocked the whole map |
| **Re-spec done right:** farmer v2 in A-pose with empty hands | Rigged by UniRig at 52 joints and 0 unweighted vertices; every clip worked on the first bake |

## 1. Write the asset spec before any image (one JSON, single source of truth)
Per asset: `name`, `kind` (character / building / resource / prop / texture), `role` (worker, melee, ranged…),
`nominal_height_m`, `front` (characters: face the camera; buildings: door side), `pose`, `held_items` (should be
empty for characters: props are separate assets), `team_color_zones` (tabard, banner, pennant), `tri_budget`,
`generation` (`image-to-3d` | `procedural` | `stock-motion`). Scripts read this file for prompts, conversion order,
normalization and manifests. Never retype a value in a second place.

## 2. Concept prompt rules (characters)
- **A-pose, empty open hands.** The pose text that worked:
  "Full body A-pose for rigging: standing upright, arms held straight down and angled about 30 degrees out from the
  body, elbows slightly bent, both hands open, empty and fully visible with all fingers, clearly separated from the
  dress and apron. Feet shoulder-width apart, both feet visible. Nothing in her hands: no basket, no tools, no props."
- **Every held item is its own asset**: sword, shield, bow, spear, axe, hammer, basket, carried loads. Small tools are
  cheaper as procedural low-poly props (250–800 tris) attached to hand sockets than as image-to-3D.
- **Silhouette separation:** arms clear of the torso, legs clear of each other. Short tunics over long robes. If a
  cape is essential, make it short or a separate mesh.
- **Same framing for every unit:** full body, three-quarter view from slightly above, plain light-gray background,
  soft even lighting, no cast shadow, no ground plane, no text. Attach 2–3 approved concepts as **style references
  only** ("never copy their subjects").
- Team color as clean, flat, separate regions (tabard, banner), so a mask or hue swap works later.

## 3. Buildings
- Draw the **front (door, banners) toward the viewer** at a three-quarter angle, which is the angle the RTS camera uses.
- After conversion, normalize once: level it (generated models come tilted 13–18° and yawed 50–57°), square it to the
  axes, base center to the origin, and turn the front to a project-wide axis (e.g. glTF +X). Record that axis in the
  manifest. The engine then applies ONE shared yaw so every building faces the camera on every team.
- Construction stages (foundation / frame / finished) share the finished model's normalization and scale.

## 4. Resources, environment, terrain
- **Instanced things (trees, bushes, rocks, ore) → procedural low-poly in Blender**, matched to a concept: 300–900
  tris, ≤3 flat materials, origin at ground center, a seeded RNG for variants, plus a depleted variant (stump,
  stripped bush). No GPU, no capacity risk, and better frame rates.
- **Terrain:** generate top-down seamless textures (grass ×2, dirt, forest floor, road, farm soil, sand, shallows,
  water, matching the AoE2 terrain set). Score seams per axis (mean opposite-edge difference / mean neighbour
  difference; ~1 is invisible); anything above ~1.6 gets an offset-blend with a half-shifted copy. Verify with a 2×2 tile.
- Reserve image-to-3D for hero assets: characters, buildings, unique siege engines, animals.

## 5. Pre-flight before renting a GPU
- [ ] Every concept image reviewed by a person (pose, empty hands, front visible, nothing fused, style matches)
- [ ] One batch file with ALL assets for this session, in priority order (blocking assets first)
- [ ] Workflow dry-run locally on CPU (node errors only at the model loader)
- [ ] Live GPU stock checked, a retry loop across GPU types/images ready, watchdog with a hard stop
- [ ] Post-process script ready, so outputs are game-ready minutes after download
- [ ] Budget ledger entry (shared cap across agents), one owner per pod

## 6. Fixed post-process (run on every output, no exceptions)
1. Decimate to the budget and resize textures to 1024 WebP (run steps separately if you need empty socket nodes kept).
2. Materials: `metallicFactor 0` for non-metal; drop `occlusionTexture`.
3. Normalize: mesh-bounds height to `nominal_height_m`, facing per the spec, origin at the base.
4. `gltf-transform validate`: 0 errors.
5. Render under the **engine's real lights and tone mapping** (Neutral, not ACES) from the **game camera**, next to
   the concept. Show that image, not a Blender material preview.

## 7. Characters into motion (if animated)
UniRig (skeleton + skin) → retarget stock CC0 clips with geometry-based bone mapping and rest calibration → hand and
carry sockets scaled for meter props → web export. An A-pose, empty-handed character needs none of the prop-pinning
or arm-freezing workarounds.

## Cost reference (this project, Oct 2026)
- Image-to-3D (Pixal3D, H100 NVL): ~130–160 s per character, ~320 s per detailed building. 4090: ~5–7 min per asset.
- UniRig: ~2 min per character including I/O; first environment setup is 10–25 min (dominated by downloads).
- Retarget + review + web export: ~5 s per unit on CPU.
- Biggest real cost: GPU **capacity** (30+ min with no instances of any type); three stopped pods could not resume because their hosts were busy.
