Cloth node · simulation · time dependent
cloth_solver
XPBD cloth (Vellum-like). Input 0: any polygon mesh (grid, garment); its points become particles, triangle edges are stretch constraints and pairs of adjacent triangles give bend constraints. Input 1: optional collider meshes (voxelised to an SDF; closed or open). Pin points with a point group (`pin_group`, default 'pin') or an expression on P; pinned points follow the input animation. Also: ground plane, analytic sphere, wind with noise, optional self collision. Output: the deformed mesh with point N recomputed and point `v`; all other attributes kept. Defaults drop a cotton-like cloth onto the ground; e.g. a 2x2 grid (40x40) at y=2 over a sphere collider gives a nice drape.
Inputs
- 0cloth
- 1colliders
Parameters 23
gravityvector 3Gravity (m/s^2).
densityfloatCloth mass per square metre (kg/m^2): silk 0.05, cotton 0.2, denim 0.4, leather 1.0. Point `mass` overrides.
stretch_stiffnessfloat0..1 resistance to stretching/shearing (1 = practically inextensible, 0.3 = stretchy jersey).
bend_stiffnessfloat0..1 resistance to bending (0.001 silk, 0.02 cotton, 0.2 leather, 1 sheet metal-ish).
dampingfloatVelocity damping per second (air/inner friction).
pin_groupstringPoint (or prim) group whose points are pinned (follow the input animation). Ignored if missing.
pin_expressionstringNumpy expression on the rest pose marking extra pinned points, e.g. 'P[:,1] > bbmax[1]-0.01' (top edge) or 'ptnum < 2'. Names: P, N, Cd, ptnum, npt, bbmin, bbmax, np.
windvector 3Wind velocity (m/s); the cloth feels drag against it.
wind_turbulencefloatNoise modulation of the wind (0 = steady).
wind_noise_sizefloatSize of wind gusts in metres.
dragfloatAerodynamic drag coefficient (how strongly the cloth catches wind and air).
groundtoggleCollide with a ground plane at y = ground_height.
ground_heightfloatY of the ground plane.
spheretoggleCollide with an analytic sphere (sphere_center, sphere_radius).
sphere_centervector 3Collision sphere centre.
sphere_radiusfloatCollision sphere radius.
thicknessfloatCollision offset: how far the cloth stays away from colliders and the ground (m).
frictionfloatCollision friction 0..1 (fraction of sliding removed per substep).
collider_resolutionintVoxel resolution of the collider SDF (input 1).
self_collisiontogglePoint-point self collision (slower). Particles keep 2*thickness apart; use a larger thickness for coarse meshes.
iterationsintConstraint iterations per substep.
substepsintSubsteps per frame (more = stiffer and more stable).
start_frameintFrame where the simulation starts
Use it
Add it from the node menu (right-click empty graph space or Tab, then type cloth_solver), ask the AI for it by name, or add it with a graph op from the API or MCP:
{"op":"add","type":"cloth_solver","name":"my_cloth_solver","params":{},"inputs":["src"]}Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.