Skip to content

Cloth Simulation (XPBD)

How Niche Studio's XPBD cloth engine simulates drape, self-collision, and fit heatmaps on a parametric avatar.

Updated January 8, 20267 min read

What XPBD simulation does

Extended Position-Based Dynamics (XPBD) is a physics method that solves cloth constraints — stretch, bend, and shear — iteratively per frame in a way that stays stable at real-time frame rates, including with stiff fabrics and fine constraint meshes.

Niche Studio uses XPBD with per-fabric parameters (stretch stiffness, bend stiffness, density, friction) pulled from the assigned fabric so different materials behave differently under the same avatar and gravity: a stiff canvas holds its shape, a fluid viscose drapes and pools.

Self-collision and body collision

The simulation resolves collisions both against the avatar's body mesh and between cloth panels themselves — self-collision — so overlapping layers such as a jacket over a hoodie, or a wrap panel crossing itself, settle without interpenetrating.

Reading fit heatmaps

HeatmapShowsRed usually means
StretchHow far a fabric region is stretched beyond rest lengthFabric under tension — likely tight fit or short pattern
PressureContact force between garment and bodyGarment pressing into the body — reduce ease or adjust curve
EaseDistance between garment surface and bodyVery low ease (tight) or very high ease (loose), read alongside intent