Skip to main content

AI clothing

The Buril clothing pipeline produces Unity-skinned garments without requiring Marvelous Designer or another paid cloth tool. It composes three absorbed/novel pieces:

  1. Modular Avatar absorbed — the bone-wiring layer (MIT, integrated under Editor/Tools/Clothing/ModularAvatar/).
  2. GarmentCode-style pattern engine — parametric garment generation (MIT, derived from the GarmentCode paper).
  3. Novel auto-rig — Buril's contribution: a deterministic algorithm that takes a draped mesh and produces good skinning weights without a simulator.

Tool family: clothing_* — 50 tools.

When to use the AI pipeline vs. the Marvelous bridge

Use AI clothing whenUse Marvelous bridge when
Stylized / NPC / mobile targetHero / photoreal target
No Marvelous licenseYou have a Marvelous subscription
You need 100+ garments quicklyYou need a few, perfect garments
Fold detail isn't criticalCloth fold detail matters

Both pipelines emit the same Unity output (a skinned mesh + prefab + Modular Avatar wiring). You can mix them — most projects use Marvelous for the headlining outfit and the AI pipeline for the closet.

The pipeline

1. Pick a garment template (T-shirt, jacket, dress, pants, hoodie, ...)
2. Parameterize (sleeve length, neckline, fit, color)
3. Generate pattern (GarmentCode-style flat pattern)
4. Drape onto avatar (deterministic projection, no simulation)
5. Auto-rig (novel weight transfer)
6. Apply Modular Avatar wiring (BoneProxy, MergeArmature)
7. Save prefab (Assets/Garments/<name>.prefab)

A typical call:

Generate a heroic-fantasy leather jacket fitted to the Player avatar, save to
Assets/Garments/Player_LeatherJacket.prefab.

The clothing-rigger specialist runs:

  1. clothing_template_pick --template jacket_long
  2. clothing_parameterize --style "heroic-fantasy" --material leather
  3. clothing_pattern_generate
  4. clothing_drape --avatar Player
  5. clothing_auto_rig --weight_mode novel_proj
  6. clothing_modular_avatar_install
  7. prefab_create --path Assets/Garments/Player_LeatherJacket.prefab

Total: 10-30 seconds. Cost: $0 (no LLM tokens for the pattern/drape/rig steps — those are deterministic C# / Sentis ONNX).

Templates shipped

FamilyTemplates
Topstshirt_basic, tshirt_v, polo, shirt_button, hoodie, sweater_crew, jacket_zip, jacket_long, trench, tank
Bottomspants_straight, pants_slim, jeans, shorts, skirt_pleated, skirt_pencil, dress_simple
Outerwearcape, cloak, robe, coat_winter
Accessoriesbelt, scarf, tie, gloves

Add new templates by dropping a GarmentCode-format .json into Tools~/clothing-templates/ and running clothing_template_refresh.

The novel auto-rig

The novel auto-rig is Buril's contribution to the clothing pipeline. Traditional auto-rig pipelines either:

  • Run a cloth simulation and bake weights (slow, requires Marvelous / Houdini / Blender).
  • Use proximity-based weight projection (fast but fragile — collars and cuffs always break).

Buril's approach: anchor-based weight transfer. The algorithm:

  1. Computes signed distance from each garment vertex to the underlying skin.
  2. Identifies anchor regions where garment-to-skin distance is < threshold (cuffs, collars, hems).
  3. Copies skin weights at anchor regions directly.
  4. Smoothly interpolates weights between anchors using geodesic distance along the garment mesh.

The result is good enough for stylized work, takes ~2 seconds for a typical garment, and never requires a cloth solver. The full algorithm is documented at Editor/Tools/Clothing/AutoRig/README.md (link will resolve once the docs branch lands).

Modular Avatar integration

Modular Avatar source is absorbed under MIT into Editor/Tools/Clothing/ModularAvatar/. The integration:

  • clothing_modular_avatar_install wires BoneProxy, MergeArmature, and MeshSettings components.
  • The output prefab is compatible with the upstream Modular Avatar workflow — VRChat tooling that expects MA components recognizes the wiring.
  • Buril ships with the same MIT license attribution and a per-folder absorbed-from notice.

Full attribution at Third-party licenses.

Iteration

Garments are parameterized — you can tweak after generation:

Make the jacket sleeves shorter and the collar wider.

The specialist re-runs steps 2-7 with adjusted parameters. The original template stays; only the output prefab is overwritten. To keep variants, set the output path explicitly.

Common issues

SymptomFix
Garment penetrates bodyDrape resolution too low. Re-run with --drape_density high.
Cuffs / hems flap looseAnchor detection missed those regions. Set --anchor_hint cuff,hem explicitly.
Skinning weight count too highCap with --max_bones_per_vertex 4.
Mesh has visible quad seamsRe-mesh with clothing_remesh --target_verts 4000.