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:
- Modular Avatar absorbed — the bone-wiring layer (MIT, integrated under
Editor/Tools/Clothing/ModularAvatar/). - GarmentCode-style pattern engine — parametric garment generation (MIT, derived from the GarmentCode paper).
- 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 when | Use Marvelous bridge when |
|---|---|
| Stylized / NPC / mobile target | Hero / photoreal target |
| No Marvelous license | You have a Marvelous subscription |
| You need 100+ garments quickly | You need a few, perfect garments |
| Fold detail isn't critical | Cloth 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:
clothing_template_pick --template jacket_longclothing_parameterize --style "heroic-fantasy" --material leatherclothing_pattern_generateclothing_drape --avatar Playerclothing_auto_rig --weight_mode novel_projclothing_modular_avatar_installprefab_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
| Family | Templates |
|---|---|
| Tops | tshirt_basic, tshirt_v, polo, shirt_button, hoodie, sweater_crew, jacket_zip, jacket_long, trench, tank |
| Bottoms | pants_straight, pants_slim, jeans, shorts, skirt_pleated, skirt_pencil, dress_simple |
| Outerwear | cape, cloak, robe, coat_winter |
| Accessories | belt, 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:
- Computes signed distance from each garment vertex to the underlying skin.
- Identifies anchor regions where garment-to-skin distance is < threshold (cuffs, collars, hems).
- Copies skin weights at anchor regions directly.
- 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_installwiresBoneProxy,MergeArmature, andMeshSettingscomponents.- 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
| Symptom | Fix |
|---|---|
| Garment penetrates body | Drape resolution too low. Re-run with --drape_density high. |
| Cuffs / hems flap loose | Anchor detection missed those regions. Set --anchor_hint cuff,hem explicitly. |
| Skinning weight count too high | Cap with --max_bones_per_vertex 4. |
| Mesh has visible quad seams | Re-mesh with clothing_remesh --target_verts 4000. |
Read next
- Marvelous bridge — for cloth-simulated couture.
- VRoid bridge — for the underlying avatar.
- Third-party licenses — Modular Avatar + GarmentCode attributions.