blender-clothing
Game clothing in Blender 5.2 - garments from body regions (ease offset, thickness), skin-weight transfer, hiding covered body faces, cloth-sim draping for folds, body-morph shape keys on garments, layered clothing, pose-aware poke-through checks, sim-to-game-mesh cleanup. Use for shirts, pants, armor, outfits, layered or swappable clothing.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- blender-clothing
- license
- MIT
- metadata
- { "author": "blender-agent-skills", "version": "1.2.0" }
- description
- Game clothing in Blender 5.2 - garments from body regions (ease offset, thickness), skin-weight transfer, hiding covered body faces, cloth-sim draping for folds, body-morph shape keys on garments, layered clothing, pose-aware poke-through checks, sim-to-game-mesh cleanup. Use for shirts, pants, armor, outfits, layered or swappable clothing.
02 资源文件 2
- 脚本scripts/_bpyx.py4.4 KB
- 脚本scripts/garment.py11.8 KB
03 SKILL.md 正文
Clothing
The execution model is in blender-core. The rig and weights are in blender-character-rigging, classic cloth settings in blender-simulation, and Roblox layered clothing cages in blender-export-pipelines (references/roblox.md).
One call each
scripts/garment.py -- --body Body --group Torso --name Shirt --hide-body
scripts/garment.py -- --body Body --zmin 0.45 --zmax 1.05 --name Pants --offset 0.01 --drape 40 --morphs
scripts/garment.py -- --body Body --group Torso --name Armor --offset 0.02 --thickness 0.008
scripts/garment.py -- --check Shirt --body Body # pose the rig first: checks the current pose
How pros build game clothing
- Shape: start from the body (extract + offset) for fitted clothes, or from flat patterns sewn by cloth sim (Marvelous Designer or Blender cloth with sewing springs) for loose ones. Simulate on the body in its rest pose (A/T).
- Game mesh: retopo the high/sim result to clean, even quads with loops at the joints (elbows, knees, shoulders get 3 loops), then UV it. Bake folds into normal maps (
blender-texture-baking) so the low mesh stays light. - Skin: copy weights from the body (same bones, same influences), clean them (limit 4, normalize, drop < 0.001), then blend toward smoother weights only on loose parts (skirts, coats) and add extra bones for those.
- Hide what's covered: delete body faces under the garment (save tris, stop poke-through) or mask them per outfit. Keep one ring of skin under cuffs and collars.
- Verify in motion: stress poses (
blender-character-riggingstress_poses.py), then--checkin each. Fix by easing (offset), smoothing the body there, weight tweaks, or hiding.
garment.py
- Region:
--group(body vertex group, weight > 0.5) or a world--zmin/--zmaxband. The faces are copied in world space and pushed out along the vertex normals by--offset(ease: 5–10 mm fitted cotton, 10–20 mm jackets, 15–30 mm armor). ThenSolidifyadds--thickness(2–4 mm fabric, 5–10 mm leather/armor), growing outward. UVs carry over from the body. - Weights: Data Transfer (
POLYINTERP_NEAREST, all groups by name), applied, limited to--max-influences, normalized and cleaned. The body's Armature modifier is added and parented to the rig. --hide-body:Hidden_<name>vertex group (the region shrunk by one ring) + an inverted Mask modifier on the body. Swappable outfits toggle masks. For export, delete those faces on a body copy instead.--drape N: classic cloth (cotton-ish: mass 0.15, tension 15, bending 0.5, quality 8). The top 8% is pinned, the body collides at 3 mm, it settles N frames, then the result is applied. That gives gravity folds on loose areas. Use 30–60 frames.--morphs: for each body shape key, a same-named garment shape key, via Surface Deform bound in the rest pose and applied as a shape key per morph. Engines drive body and garment keys together (fat/thin, muscle, breathing). Measured: a 30% body morph pokes through 346 verts. With the matching garment key, 0.- Poke check (also run at the end of every build): casts along each body vertex normal. If the garment is hit inward before outward (or sits < 0.5 mm away), it's poke-through. Verts that hit no garment within 0.1 m aren't covered and are ignored. It reports
covered_verts,poke_vertsandpoke_max_m, uses the evaluated pose, and respects the body masks.
Layered clothing
- Order from the skin out: underwear/base → shirt → vest → jacket → armor. Each layer offsets from the one below (run
garment.py --body Shirtfor a vest over the shirt) and copies weights from the body, not from the layer below. - Interpenetration between layers in motion usually comes from mismatched weights. Copying all layers from the same body keeps them moving together.
- Roblox layered clothing needs
<Name>_InnerCage+<Name>_OuterCagebuilt from Roblox's template cages (same vert order/UVs). Other engines (UE Mutable/Unity) blend shape keys or use body-hiding masks. Same principle.
Gotchas
shape_key_add()creates keys at value 1.0 (measured). Set.value = 0when authoring morphs from Python.- Surface Deform for morphs only: if left live together with an Armature modifier, the pose is applied twice.
--morphsremoves it after baking the keys. - Apply the body's scale before building. Offsets and thickness are in meters.
- Cloth sims need the body's collision mesh at a modest resolution. Decimate a proxy for the collision if the body is > 50k verts.
- Run
blender-asset-qaon the final garment (z-fighting with the body, floating parts, normals) and check its tris againstblender-game-optimizationbudgets.
04 同仓库更多 Skills
blender-workflow-recipes
End-to-end Blender 5.2 playbooks chaining the blender-* skills with QA gates - game props (mid-poly, high-to-low), game characters (sculpt/AI mesh to rigged, animated export), Roblox props/accessories/avatars, AI or downloaded asset cleanup, procedural environments, web/AR assets, product turntables, mood/weather shots (night, rain, snow, fog). Use for complete multi-stage asset requests.
blender-weather-fx
Weather effects in Blender 5.2 - looping Geometry Nodes rain, snow, dust, ash and embers with ground hits and splashes, wet surfaces, puddles with animated ripples, wall streaks, snow cover (shader + real snow geometry), storm lightning with multi-stroke flashes and bolts, engine-ready weather masks. Use for rain, storm, snow, wet street, puddle, dust or ember scenes.
blender-video-editing
Video in Blender 5.2 - Video Sequencer edits from Python (clips, image sequences, crossfades, titles, music fades, proxies, color management, H.264/AAC output) and motion tracking (feature detection, camera solve, scene orientation, tripod and plane tracking, stabilization) for VFX shots. Use to cut renders/footage together or match-move a camera.
blender-time-of-day
Time of day and atmosphere in Blender 5.2 - measured sky + sun for dawn, morning, noon, golden hour, sunset, blue hour, overcast, night/moonlight with stars and city glow, exposure balance, height fog from visibility, god rays, Cycles vs EEVEE volumes, compositor grade, stylized moods (cyberpunk neon, horror, underwater, desert). Use for any day/night, sunset, foggy or mood lighting scene.
blender-texturing
Texture authoring in Blender 5.2 - smart-material layers (edge wear, cavity grime, dust, rust, roughness breakup) from curvature/AO masks, z-fight-safe decal and sticker placement, trim sheets, tiling + vertex-color blends, texture painting, baking the look to game texture sets. Use when a material needs wear, dirt, a decal, trims or hand painting, not just wiring.
blender-texture-baking
Bake texture maps in Blender 5.2 Cycles - high-to-low normal maps with cage/extrusion, AO, curvature, ID, thickness, base color/roughness/metallic from procedurals, ORM packing, OpenGL vs DirectX, margins, GPU baking, fixing skewing/waviness/seams. Use when transferring sculpt or high-poly detail to game meshes or converting procedural materials to textures.