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

Parameters 23

gravityvector 3
Default [0, -9.81, 0]

Gravity (m/s^2).

densityfloat
Default 0.25Range 0.00001 to …

Cloth mass per square metre (kg/m^2): silk 0.05, cotton 0.2, denim 0.4, leather 1.0. Point `mass` overrides.

stretch_stiffnessfloat
Default 1Range 0 to 1

0..1 resistance to stretching/shearing (1 = practically inextensible, 0.3 = stretchy jersey).

bend_stiffnessfloat
Default 0.02Range 0 to 1

0..1 resistance to bending (0.001 silk, 0.02 cotton, 0.2 leather, 1 sheet metal-ish).

dampingfloat
Default 0.2Range 0 to …

Velocity damping per second (air/inner friction).

pin_groupstring
Default pin

Point (or prim) group whose points are pinned (follow the input animation). Ignored if missing.

pin_expressionstring
Default ""

Numpy 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 3
Default [0, 0, 0]

Wind velocity (m/s); the cloth feels drag against it.

wind_turbulencefloat
Default 0.5Range 0 to …

Noise modulation of the wind (0 = steady).

wind_noise_sizefloat
Default 1Range 0.01 to …

Size of wind gusts in metres.

dragfloat
Default 1Range 0 to …

Aerodynamic drag coefficient (how strongly the cloth catches wind and air).

groundtoggle
Default on

Collide with a ground plane at y = ground_height.

ground_heightfloat
Default 0

Y of the ground plane.

spheretoggle
Default off

Collide with an analytic sphere (sphere_center, sphere_radius).

sphere_centervector 3
Default [0, 1, 0]

Collision sphere centre.

sphere_radiusfloat
Default 0.5Range 0 to …

Collision sphere radius.

thicknessfloat
Default 0.01Range 0 to …

Collision offset: how far the cloth stays away from colliders and the ground (m).

frictionfloat
Default 0.3Range 0 to 1

Collision friction 0..1 (fraction of sliding removed per substep).

collider_resolutionint
Default 64Range 8 to 256

Voxel resolution of the collider SDF (input 1).

self_collisiontoggle
Default off

Point-point self collision (slower). Particles keep 2*thickness apart; use a larger thickness for coarse meshes.

iterationsint
Default 2Range 1 to 50

Constraint iterations per substep.

substepsint
Default 10Range 1 to 100

Substeps per frame (more = stiffer and more stable).

start_frameint
Default 1

Frame 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.