sim nodes
5 node types in the sim category.
drape#
aliases: cloth vellum_cloth vellum cloth_sim
Cloth simulation (XPBD, Vellum-lite): drape a mesh over colliders and the floor, hang it from pins, blow it in the wind.
Simulates the cloth input for steps steps and outputs the final state (same points, prims and attributes; P moved, v, rest_P, N, pinned). Constraints in compliance form, so stiffnesses are physical and independent of the step size: stretch on the polygon edges (rows and columns solved as whole chains, so hanging cloth does not sag), shear on the quad diagonals, bending across edges (isometric where flat at rest, dihedral towards the rest angle of the input elsewhere), tethers to the nearest pin. Collides with the collider input (a static mesh; points stay thickness away; closed pieces push out points that get inside) and the floor plane, with friction; sharp collider corners get extra corner contacts, but a sharp collider edge can still pass between the points of a coarse cloth (use a finer cloth there). Pins: pin_group, a pin point attribute, or the nearest cloth points to the pins input. Typical graphs: grid above a box → drape(grid, box); grid with a pinned top edge + wind → a banner. Deterministic (bit-identical with and without the worker pool). Houdini: Vellum Cloth + Vellum Solver, run to a settled frame.
Inputs
| # | name | description |
|---|---|---|
| 0 | cloth | the cloth: any polygon mesh (quads are triangulated internally for the constraints; the output keeps the topology), polylines become strings |
| 1 | collider | static collision geometry (its polygons; closed pieces push out points that end up inside) (optional) |
| 2 | pins | pin points: the nearest cloth point to each is pinned (see pin_snap) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
steps | int | 100 | 0..100000 | simulation steps of 1/fps s each; the output is the state after the last one (settle time = steps / fps) aliases: frames |
substeps | int | 4 | 1..100 | substeps per step: more = stiffer cloth and fewer missed contacts (cost grows linearly) aliases: sub_steps |
iterations | int | 1 | 1..100 | constraint sweeps per substep (stretch chains solved exactly, the rest Gauss-Seidel); substeps help more than iterations aliases: constraint_iterations |
fps | float | 24 | 1.. | steps per simulated second (step length 1/fps s) (advanced) |
gravity | vec3 | [0,-9.81,0] | gravity acceleration in m/s² | |
stretch_stiffness | float | 100000 | 0.. | stretch stiffness of the polygon edges in N/m (≈ the sheet's 2D Young's modulus); 1e4+ is practically inextensible, 100 is rubbery; 0 = no stretch constraints aliases: stretch stiffness |
shear_stiffness | float | 1000 | 0.. | shear stiffness of the quad diagonals (and inner polygon edges) in N/m; low = fabric that drapes on the bias; 0 = none aliases: shear |
bend_stiffness | float | 0.001 | 0.. | bending rigidity in N·m (resolution independent): 1e-5 silk, 1e-4 cotton, 1e-3 canvas, 1e-2 tarp/leather; 0 = no bend constraints aliases: bend bending |
density | float | 0.2 | 0.. | surface density in kg/m² for the point masses (a point float mass attribute overrides it); only matters relative to the stiffnesses and the wind (advanced) |
damping | float | 0.2 | 0.. | velocity damping rate in 1/s (velocities shrink by e^(-damping·t)); higher settles sooner aliases: velocity_damping |
drag | float | 0.5 | 0.. | air drag ½·ρ·Cd in kg/m³ on each triangle against the wind (normal component, quadratic); 0 = vacuum aliases: air_drag |
wind | vec3 | [0,0,0] | wind velocity in m/s (acts through drag) | |
thickness | float | 0.02 | 0.. | collision offset in m: points stay this far from colliders and the floor (and 2× apart with self_collision, which works best with about half the edge length) aliases: collision_thickness pscale |
friction | float | 0.4 | 0.. | Coulomb friction coefficient against colliders and the floor (0 = slippery) |
floor | bool | true | collide with the ground plane y = floor_height aliases: ground ground_plane | |
floor_height | float | 0 | height of the ground plane aliases: ground_height | |
self_collision | bool | false | point-point self collision (spatial hash, pairs found per step); effective when thickness is about half the edge length aliases: selfcollision | |
rest_scale | float | 1 | 0.01.. | multiplies the stretch and shear rest lengths: < 1 tightens the cloth (a taut tarp, a cushion that pulls in its seams), > 1 slackens it aliases: restlength_scale |
seed | int | 0 | seed of a tiny deterministic jitter of the start positions (10⁻³ of the edge length) that breaks perfect symmetry | |
pin_group | group (point) | "" | points pinned in place ("" = none); a point attribute pin != 0 and the nearest cloth point to each point of the pins input are pinned too | |
pin_snap | bool | false | move the cloth points pinned by the pins input onto those pin points first (hang a cloth from hooks) | |
tethers | bool | true | long-range attachments: no point gets farther from its nearest pin than along the cloth at rest, so pinned cloth does not stretch under its weight or the wind (advanced) | |
keep_rest | bool | true | write the input positions to the point attribute rest_P | |
max_points | int | 100000 | 1..10000000 | refuse inputs with more points than this (cost grows with points × steps × substeps × iterations) (advanced) |
Writes: point v, rest_P (keep_rest), N, pinned (int, when anything is pinned)
Example
{
"nodes": {
"cloth": {
"type": "grid",
"params": { "size": [2, 2], "divisions": [24, 24], "center": [0, 1.3, 0] }
},
"table": {
"type": "box",
"params": { "size": [1, 1, 1], "center": [0, 0.5, 0] }
},
"out": {
"type": "drape",
"in": ["cloth", "table"],
"params": { "steps": 48, "thickness": 0.03 }
}
},
"output": "out"
}
Used in the example cloth_drape.
inflate#
aliases: vellum_pressure pressure balloon
Inflate a closed mesh with an XPBD volume constraint (Vellum pressure): cushions, balloons, bulging sacks.
Simulates the geo input as a closed cloth bag whose volume is driven towards pressure × its rest volume, against the same stretch, shear and bend constraints as drape (and the same collider, floor, pins and wind). pressure 1 keeps the volume, 1.5 puffs a box into a cushion, < 1 deflates it; pressure_stiffness sets how hard the volume pushes against the cloth (a stiff cloth caps the volume: a sphere needs a soft stretch_stiffness to grow, a box bulges into a pillow). The pressure rises smoothly over the first half of the steps, and the skin is solved edge by edge so it stretches evenly. Gravity and the floor are off by default (the shape inflates in place); turn them on to rest a cushion on the ground. Houdini: Vellum Pressure constraint.
Inputs
| # | name | description |
|---|---|---|
| 0 | geo | a closed polygon mesh (box, sphere, a sewn sack) |
| 1 | collider | static collision geometry (its polygons; closed pieces push out points that end up inside) (optional) |
| 2 | pins | pin points: the nearest cloth point to each is pinned (see pin_snap) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
pressure | float | 1.5 | 0.. | target volume / rest volume (1 = keep, 1.5 = cushion, 3 = balloon if the cloth can stretch) aliases: volume_scale |
pressure_stiffness | float | 10000 | 0.. | stiffness of the volume constraint in N/m (compared with stretch_stiffness: equal values split the difference); 0 = no pressure |
steps | int | 60 | 0..100000 | simulation steps of 1/fps s each; the output is the state after the last one (settle time = steps / fps) aliases: frames |
substeps | int | 4 | 1..100 | substeps per step: more = stiffer cloth and fewer missed contacts (cost grows linearly) aliases: sub_steps |
iterations | int | 1 | 1..100 | constraint sweeps per substep (stretch chains solved exactly, the rest Gauss-Seidel); substeps help more than iterations aliases: constraint_iterations |
fps | float | 24 | 1.. | steps per simulated second (step length 1/fps s) (advanced) |
gravity | vec3 | [0,0,0] | gravity acceleration in m/s² | |
stretch_stiffness | float | 10000 | 0.. | stretch stiffness of the polygon edges in N/m (≈ the sheet's 2D Young's modulus); 1e4+ is practically inextensible, 100 is rubbery; 0 = no stretch constraints aliases: stretch stiffness |
shear_stiffness | float | 1000 | 0.. | shear stiffness of the quad diagonals (and inner polygon edges) in N/m; low = fabric that drapes on the bias; 0 = none aliases: shear |
bend_stiffness | float | 0.001 | 0.. | bending rigidity in N·m (resolution independent): 1e-5 silk, 1e-4 cotton, 1e-3 canvas, 1e-2 tarp/leather; 0 = no bend constraints aliases: bend bending |
density | float | 0.2 | 0.. | surface density in kg/m² for the point masses (a point float mass attribute overrides it); only matters relative to the stiffnesses and the wind (advanced) |
damping | float | 1 | 0.. | velocity damping rate in 1/s (velocities shrink by e^(-damping·t)); higher settles sooner aliases: velocity_damping |
drag | float | 0 | 0.. | air drag ½·ρ·Cd in kg/m³ on each triangle against the wind (normal component, quadratic); 0 = vacuum aliases: air_drag |
wind | vec3 | [0,0,0] | wind velocity in m/s (acts through drag) | |
thickness | float | 0.02 | 0.. | collision offset in m: points stay this far from colliders and the floor (and 2× apart with self_collision, which works best with about half the edge length) aliases: collision_thickness pscale |
friction | float | 0.4 | 0.. | Coulomb friction coefficient against colliders and the floor (0 = slippery) |
floor | bool | false | collide with the ground plane y = floor_height aliases: ground ground_plane | |
floor_height | float | 0 | height of the ground plane aliases: ground_height | |
self_collision | bool | false | point-point self collision (spatial hash, pairs found per step); effective when thickness is about half the edge length aliases: selfcollision | |
rest_scale | float | 1 | 0.01.. | multiplies the stretch and shear rest lengths: < 1 tightens the cloth (a taut tarp, a cushion that pulls in its seams), > 1 slackens it aliases: restlength_scale |
seed | int | 0 | seed of a tiny deterministic jitter of the start positions (10⁻³ of the edge length) that breaks perfect symmetry | |
pin_group | group (point) | "" | points pinned in place ("" = none); a point attribute pin != 0 and the nearest cloth point to each point of the pins input are pinned too | |
pin_snap | bool | false | move the cloth points pinned by the pins input onto those pin points first (hang a cloth from hooks) | |
tethers | bool | false | long-range attachments: no point gets farther from its nearest pin than along the cloth at rest, so pinned cloth does not stretch under its weight or the wind (advanced) | |
keep_rest | bool | true | write the input positions to the point attribute rest_P | |
max_points | int | 100000 | 1..10000000 | refuse inputs with more points than this (cost grows with points × steps × substeps × iterations) (advanced) |
Writes: point v, rest_P (keep_rest), N, pinned (int, when anything is pinned)
Example
{
"nodes": {
"bag": {
"type": "box",
"params": { "size": [1, 0.3, 1], "divisions": [8, 3, 8] }
},
"out": {
"type": "inflate",
"in": ["bag"],
"params": { "pressure": 1.6, "steps": 30 }
}
},
"output": "out"
}
particles#
aliases: pop pop_network popnet particle particle_system
Particle simulation (Houdini POPs in one node): emit from points, gravity, drag, wind, curl noise, velocity fields, attraction, floor and mesh collisions (die/slide/bounce), trails as polylines. Deterministic, steps with the frame.
Steps of dt = 1 / (fps × substeps). Each step, every emitter point (input 0: points, or the points of any geometry) gives birth to emit_rate particles (fractions accumulate with a random phase per point; emit_all also emits one particle per point at time 0). A particle starts at its emitter point with the point's v, plus speed along the point's N (+Y without N), plus a random velocity up to velocity_var, and carries the point's attributes and groups (Cd, pscale, …; a point id seeds its randomness, so reordering points keeps each one's stream). Each step: acceleration = gravity + noise (curl: divergence-free) + field force + attraction; drag pulls the velocity toward the air velocity (wind + air fields) at rate drag; then the particle moves and collides with the floor plane and with the polygons (and heightfields) of input 1: die removes it, slide keeps the tangential motion, bounce reflects it with restitution bounce; friction is Coulomb (μ). Points collide as points unless use_pscale (spheres of radius pscale). Input 2 is a field: points with v (nearest or inverse-distance weighted), a heightfield (force = -gradient of height × field_scale: downhill) or an SDF (force = -gradient of the distance: toward the surface; sampled on a grid). Particles die when age reaches life (0 = never) or on a die collision; the output has the live ones: P, v, age, life, id (birth order), pscale and the carried attributes; trails > 1 keeps the last positions as one polyline per particle (point age at that position, curveu 0..1 tail to head, prim id). Time: a cook at start_frame (or any cook with animate false) runs steps steps; with animate, frame f runs steps + (f - start_frame) × substeps, reading the inputs at each frame, and every frame's state is cached like the solver's (stepping 10 → 11 runs one frame; jumping back re-simulates from the latest cached frame before it, or from the start). The result is the same bit for bit however the steps are split into frames and with or without the worker pool. max_particles counts a particle from birth to the end of its life, also when a collision removed it earlier.
Inputs
| # | name | description |
|---|---|---|
| 0 | emitter | points that emit (any geometry: its points); point v, N, pscale, Cd, id and other attributes are used and carried |
| 1 | collision | polygons (and heightfields) to collide with; also the surface for attract_to surface (optional) |
| 2 | field | velocity field: points with v, a heightfield (downhill gradient) or an SDF volume (gradient toward the surface) (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
steps | int | 48 | 0..100000 | steps simulated at start_frame (a plain cook); with animate, later frames add substeps steps each |
fps | float | 24 | 0.001.. | simulation frames per second; dt = 1 / (fps × substeps) |
substeps | int | 1 | 1..100 | steps per frame |
animate | bool | true | advance with the cook frame (frame f > start_frame runs (f - start_frame) × substeps more steps, cached per frame); false = always steps steps, not time-dependent | |
start_frame | int | 1 | frame that shows the state after steps steps (earlier frames show it too) | |
emit_rate | float | 1 | 0.. | particles born per step per emitter point (0.25 = one every 4 steps) aliases: rate birth_rate |
emit_all | bool | false | also emit one particle from every emitter point at time 0 (with emit_rate 0: a single burst) | |
speed | float | 0 | initial speed (m/s) along the emitter point normal N (+Y without N), added to the point v | |
velocity_var | float | 0 | 0.. | random initial velocity, uniform in a ball of this radius (m/s) aliases: spread velocity_variance |
life | float | 0 | 0.. | lifetime in seconds (0 = forever) aliases: lifetime life_expectancy |
life_var | float | 0 | 0.. | random ± variation of the lifetime (s) aliases: life_variance |
pscale | float | 0.05 | 0.. | pscale of particles whose emitter point has none |
gravity | vec3 | [0,-9.81,0] | acceleration (m/s²) | |
drag | float | 0 | 0.. | air resistance (1/s): the velocity approaches the air velocity (wind, air fields) at this rate; wind needs drag > 0 aliases: air_resistance |
wind | vec3 | [0,0,0] | air velocity (m/s); acts through drag | |
noise | float | 0 | noise force amplitude (m/s²); 0 = off aliases: noise_amplitude turbulence | |
noise_size | float | 1 | 0.001.. | noise element size (m) aliases: element_size |
curl | bool | true | curl noise (divergence-free swirls, no sinks) instead of three independent noises | |
noise_octaves | int | 2 | 1..8 | fractal octaves of the noise (each costs one more evaluation) |
attract | float | 0 | attraction strength (1/s²: acceleration per metre of distance to the target); negative repels | |
attract_to | enum | "point" | target: attract_point, or the closest point of the collision surface (input 1) options: point surface | |
attract_point | vec3 | [0,0,0] | target of attract_to point | |
collide | enum | "bounce" | response to the floor and the collision input: none, die (removed), slide (normal velocity removed), bounce options: none die slide bounce | |
bounce | float | 0.5 | 0..1 | restitution of bounce (0 = no rebound, 1 = elastic) aliases: elasticity restitution |
friction | float | 0.2 | 0.. | Coulomb friction coefficient on contact (tangential speed lost = friction × normal speed lost) |
floor | bool | false | collide with the plane y = floor_height aliases: ground_plane | |
floor_height | float | 0 | height of the floor plane | |
use_pscale | bool | false | collide as spheres of radius pscale (rest on surfaces) instead of as points | |
field_mode | enum | "force" | how the field (input 2) acts: force = added to the acceleration (× field_scale); air = added to the air velocity (acts through drag, like wind) options: force air | |
field_scale | float | 1 | multiplier of the field vector | |
field_sample | enum | "nearest" | points field: the nearest point's v, or inverse-distance weighted v of field_neighbours points options: nearest idw | |
field_neighbours | int | 6 | 2..32 | points field, idw: points averaged aliases: field_neighbors |
field_max_distance | float | 0 | 0.. | points field: ignore points farther than this (0 = unlimited) |
field_resolution | int | 64 | 4..256 | SDF field: samples along the longest side of the grid the distance is sampled on (advanced) |
seed | float | 0 | random seed (emission phases, birth offsets, lifetimes, velocities, noise) | |
max_particles | int | 1000000 | 0..50000000 | births are refused while this many particles hold a slot (from birth to the end of their life) |
max_births | int | 1000000 | 1..10000000 | guard: most particles born in one step (the rest of the step's births are refused, with a warning). Steps are also simulated in batches of about this many births, so memory stays bounded however many particles are born and die over a run (the result does not depend on it otherwise) |
trails | int | 0 | 0..10000 | positions kept per particle and output as a polyline (0 = no trails; 2 or more) aliases: trail_length |
output | enum | "both" | points (the particles), trails (one polyline per particle) or both (points first; no trails when trails < 2) options: both points trails |
Writes: points: P, v, age, life, id, pscale + emitter attributes and groups; trails: polylines with point age, curveu and the particle attributes, prim id
Example
{
"nodes": {
"ground": {
"type": "grid",
"params": { "size": [6, 6], "divisions": [12, 12] }
},
"nozzle": { "type": "points", "params": { "positions": [[0, 0.2, 0]] } },
"fountain": {
"type": "particles",
"in": ["nozzle", "ground"],
"params": {
"steps": 60,
"emit_rate": 4,
"speed": 5,
"velocity_var": 1.2,
"life": 2.5,
"seed": 1,
"collide": "bounce",
"bounce": 0.4,
"trails": 6
}
},
"tint": {
"type": "color",
"in": ["fountain"],
"params": { "mode": "ramp", "attrib": "age", "range": [0, 2.5] }
},
"out": { "type": "merge", "in": ["ground", "tint"] }
},
"output": "out"
}
Used in the example sparks.
rbd_settle#
aliases: rbd rigid_body rigidbody settle drop rbd_drop physics_settle rbdbulletsolver
Drop pieces (packed instances or polygon pieces) onto a terrain, container or ground plane and let them come to rest (Houdini RBD drop / settle), with the Rapier physics engine.
For procedural assembly: scatter pieces above a surface, settle them, and they rest in contact instead of floating or intersecting. Input 0 = the pieces: every packed prim (copy_to_points {pack: true}, pack) is one piece whose convex hull is computed once per source and shared by all its instances; polygons are grouped into pieces by the pieces param. Input 1 = static collision geometry (terrain mesh, heightfield, container; exact triangles; packed input is unpacked); without it a ground plane at y = ground. Pieces with a prim or point attribute active = 0 stay put and others collide with them (active defaults to 1, so geometry merged without it moves); point (or prim) attributes v (m/s) and w (rad/s) give initial velocities. The output is the input with each piece moved rigidly (packed input stays packed: only anchors and instance transforms change), plus v, w, settled and contacts on the moved points. Pieces must not start inside each other (they are pushed apart violently; a warning says how many did): space them, or use rbd_stack, which drops them one at a time. Same inputs and seed give the same result (Rapier's WASM build is deterministic; bodies are inserted in a spatial order, so the input order does not matter). By default the node ignores time and shows the settled state on every frame; animate shows the fall frame by frame (cooking frame 11 after 10 resumes the simulation).
Inputs
| # | name | description |
|---|---|---|
| 0 | pieces | pieces to drop: packed instances and/or polygon pieces |
| 1 | collision | static collision geometry (polygons and heightfields); none = ground plane (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
pieces | enum | "auto" | how polygons form pieces (packed prims are always one piece each): auto = prim attribute piece, else copynum (unpacked copy_to_points), else name, else connected parts; connectivity; name; attrib (piece_attrib) options: auto connectivity name attrib | |
piece_attrib | string | "" | pieces = attrib: the prim (or point) attribute whose values name the pieces, e.g. "class" from connectivity | |
collision_shape | enum | "convex_hull" | shape the pieces collide with: convex_hull (computed once per packed source, scaled per instance), box (bounding box in the piece frame), sphere (bounding sphere), mesh = the exact triangles, only for static pieces (active = 0; moving pieces fall back to convex_hull). The collision input is always used as exact triangles options: convex_hull box sphere meshaliases: shape collision | |
hull_points | int | 64 | 0..4096 | convex_hull: most vertices per hull (0 = the exact hull). Collision cost grows with hull size; a smooth piece with more hull vertices is reduced to the ones that matter most, so pieces can sink into each other by a few % of their radius at cut corners aliases: max_hull_points hull_vertices |
duration | float | 8 | 0..120 | simulated seconds at most; the simulation stops earlier once every piece has settled aliases: time seconds |
steps_per_second | int | 60 | 10..1000 | solver steps per simulated second (time step 1 / steps_per_second); raise it for small or fast pieces aliases: steps rate hz |
gravity | vec3 | [0,-9.81,0] | gravity (m/s²) | |
friction | float | 0.7 | 0..2 | friction coefficient of every collider (pieces, collision geometry, ground) |
restitution | float | 0 | 0..1 | bounciness (0 = no bounce, settles fastest) aliases: bounce bounciness |
density | float | 1000 | 1..100000 | density of the pieces (kg/m³); with one density for all pieces only the shapes matter |
linear_damping | float | 0 | 0..10 | linear velocity damping (1/s) (advanced) |
angular_damping | float | 0.5 | 0..10 | angular velocity damping (1/s): stops round pieces rolling forever; 0 = free rolling |
rest_damping | float | 5 | 0..100 | extra angular damping (linear: 40 % of it) for a piece that has been nearly at rest (below 4 × sleep_threshold) for 0.5 s, so slow wobbling and creeping end; released when the piece speeds up again. 0 = plain physics |
sleep_threshold | float | 0.05 | 0.0001..10 | a piece counts as settled below this speed (m/s; spin: angular speed × piece radius); the simulation ends when every piece has stayed below it for 0.5 s. Lower it for small pieces aliases: settle_threshold |
ground_plane | enum | "auto" | infinite ground at y = ground: auto = only when input 1 (collision geometry) is not connected (a connected input without polygons or heightfields gives nothing to land on, with a warning); on = also with input 1 options: auto on off | |
ground | float | 0 | height of the ground plane aliases: ground_height | |
ccd | bool | true | continuous collision detection, so fast pieces do not pass through thin collision geometry (advanced) | |
solver_iterations | int | 4 | 1..32 | Rapier solver iterations per step (more = stiffer stacks, slower) (advanced) |
max_pieces | int | 5000 | 1..1000000 | guard: fail instead of simulating more pieces than this (1,000 convex pieces take about 1–3 s) |
seed | int | 0 | seed of the jitter | |
jitter | float | 0.001 | 0..0.1 | random start offset (fraction of each piece radius, horizontal) and tilt (radians), so perfectly symmetric stacks still topple deterministically; 0 = none |
keep_packed | bool | true | packed input stays packed with updated instance transforms (false = unpack the result) | |
delete_fallen | bool | false | remove pieces that fell off the collision geometry (otherwise they stay where they were stopped, in point group "fallen") | |
animate | bool | false | false: every frame shows the settled result (the node does not depend on time). true: the frame shows the simulation at (frame - start_frame) / fps seconds, for viewing the drop | |
start_frame | int | 1 | animate: the frame the simulation starts at |
Writes: pieces moved to their settled transforms (packed: anchor P and the instance transform; unpacked: P, N, up, orient), point attributes on the moved points (packed: the anchors) v (velocity, m/s), w (angular velocity, rad/s), settled (int 0/1), contacts (int: colliders touching the piece); point group fallen (pieces that fell off the collision geometry); stats steps, sim_time, pieces, settled, fallen
Example
{
"nodes": {
"rock": {
"type": "sphere",
"params": {
"type": "ico",
"level": 1,
"radius": 0.25,
"scale": [1, 0.6, 0.85]
}
},
"rock_shape": {
"type": "noise_displace",
"in": ["rock"],
"params": { "amplitude": 0.06, "frequency": 3 }
},
"spots": {
"type": "point_grid",
"params": { "counts": [4, 1, 4], "size": [3, 0, 3], "center": [0, 2, 0] }
},
"spin": {
"type": "attrib_randomize",
"in": ["spots"],
"params": { "name": "orient", "distribution": "orient", "seed": 3 }
},
"rocks": {
"type": "copy_to_points",
"in": ["rock_shape", "spin"],
"params": { "pack": true }
},
"ground": {
"type": "terrain",
"params": {
"size": [6, 6],
"divisions": [24, 24],
"height": 0.6,
"frequency": 0.3,
"seed": 2
}
},
"settle": { "type": "rbd_settle", "in": ["rocks", "ground"] }
},
"output": "settle"
}
rbd_stack#
aliases: rbd_pile stack_pieces pile rbd_fill
Drop pieces one at a time (every interval steps), each lifted above what already lies under it, so crates stack and rocks pile up instead of starting inside each other.
rbd_settle for pieces that overlap where they are: give every crate the same position (or a few spawn points) and they come down one after another onto the pile. Each piece keeps its input X/Z and rotation; with lift its drop height is raised until it clears whatever is under it (a downward shape cast through the pieces already dropped and the collision geometry), plus clearance. Pieces drop in the order param's order, one every interval steps; duration counts from the last drop. Same inputs, outputs and parameters as rbd_settle (see there); with animate, pieces that have not dropped yet are not in the output.
Inputs
| # | name | description |
|---|---|---|
| 0 | pieces | pieces to drop: packed instances and/or polygon pieces, possibly overlapping |
| 1 | collision | static collision geometry (polygons and heightfields); none = ground plane (optional) |
Parameters
| name | type | default | range | description |
|---|---|---|---|---|
interval | int | 15 | 1..10000 | solver steps between two drops (15 at 60 steps/s = four pieces per second) |
order | enum | "input" | drop order: input = prim order, height = lowest first (equal heights in the input-independent spatial order), random = seeded shuffle options: input height random | |
lift | bool | true | raise each piece above whatever already lies under its drop position (a shape cast from above), so pieces given the same position stack | |
clearance | float | 0.02 | 0..10 | lift: gap left between a dropped piece and the pile under it (m) |
pieces | enum | "auto" | how polygons form pieces (packed prims are always one piece each): auto = prim attribute piece, else copynum (unpacked copy_to_points), else name, else connected parts; connectivity; name; attrib (piece_attrib) options: auto connectivity name attrib | |
piece_attrib | string | "" | pieces = attrib: the prim (or point) attribute whose values name the pieces, e.g. "class" from connectivity | |
collision_shape | enum | "convex_hull" | shape the pieces collide with: convex_hull (computed once per packed source, scaled per instance), box (bounding box in the piece frame), sphere (bounding sphere), mesh = the exact triangles, only for static pieces (active = 0; moving pieces fall back to convex_hull). The collision input is always used as exact triangles options: convex_hull box sphere meshaliases: shape collision | |
hull_points | int | 64 | 0..4096 | convex_hull: most vertices per hull (0 = the exact hull). Collision cost grows with hull size; a smooth piece with more hull vertices is reduced to the ones that matter most, so pieces can sink into each other by a few % of their radius at cut corners aliases: max_hull_points hull_vertices |
duration | float | 8 | 0..120 | simulated seconds at most; the simulation stops earlier once every piece has settled aliases: time seconds |
steps_per_second | int | 60 | 10..1000 | solver steps per simulated second (time step 1 / steps_per_second); raise it for small or fast pieces aliases: steps rate hz |
gravity | vec3 | [0,-9.81,0] | gravity (m/s²) | |
friction | float | 0.7 | 0..2 | friction coefficient of every collider (pieces, collision geometry, ground) |
restitution | float | 0 | 0..1 | bounciness (0 = no bounce, settles fastest) aliases: bounce bounciness |
density | float | 1000 | 1..100000 | density of the pieces (kg/m³); with one density for all pieces only the shapes matter |
linear_damping | float | 0 | 0..10 | linear velocity damping (1/s) (advanced) |
angular_damping | float | 0.5 | 0..10 | angular velocity damping (1/s): stops round pieces rolling forever; 0 = free rolling |
rest_damping | float | 5 | 0..100 | extra angular damping (linear: 40 % of it) for a piece that has been nearly at rest (below 4 × sleep_threshold) for 0.5 s, so slow wobbling and creeping end; released when the piece speeds up again. 0 = plain physics |
sleep_threshold | float | 0.05 | 0.0001..10 | a piece counts as settled below this speed (m/s; spin: angular speed × piece radius); the simulation ends when every piece has stayed below it for 0.5 s. Lower it for small pieces aliases: settle_threshold |
ground_plane | enum | "auto" | infinite ground at y = ground: auto = only when input 1 (collision geometry) is not connected (a connected input without polygons or heightfields gives nothing to land on, with a warning); on = also with input 1 options: auto on off | |
ground | float | 0 | height of the ground plane aliases: ground_height | |
ccd | bool | true | continuous collision detection, so fast pieces do not pass through thin collision geometry (advanced) | |
solver_iterations | int | 4 | 1..32 | Rapier solver iterations per step (more = stiffer stacks, slower) (advanced) |
max_pieces | int | 5000 | 1..1000000 | guard: fail instead of simulating more pieces than this (1,000 convex pieces take about 1–3 s) |
seed | int | 0 | seed of the jitter | |
jitter | float | 0.001 | 0..0.1 | random start offset (fraction of each piece radius, horizontal) and tilt (radians), so perfectly symmetric stacks still topple deterministically; 0 = none |
keep_packed | bool | true | packed input stays packed with updated instance transforms (false = unpack the result) | |
delete_fallen | bool | false | remove pieces that fell off the collision geometry (otherwise they stay where they were stopped, in point group "fallen") | |
animate | bool | false | false: every frame shows the settled result (the node does not depend on time). true: the frame shows the simulation at (frame - start_frame) / fps seconds, for viewing the drop | |
start_frame | int | 1 | animate: the frame the simulation starts at |
Writes: pieces moved to their settled transforms (packed: anchor P and the instance transform; unpacked: P, N, up, orient), point attributes on the moved points (packed: the anchors) v (velocity, m/s), w (angular velocity, rad/s), settled (int 0/1), contacts (int: colliders touching the piece); point group fallen (pieces that fell off the collision geometry); stats steps, sim_time, pieces, settled, fallen
Example
{
"nodes": {
"crate": { "type": "box", "params": { "size": [0.5, 0.4, 0.4] } },
"spots": {
"type": "point_grid",
"params": { "counts": [2, 1, 1], "size": [0.3, 0, 0] }
},
"many": {
"type": "copy_xform",
"in": ["spots"],
"params": { "count": 5, "translate": [0, 0, 0.05] }
},
"crates": {
"type": "copy_to_points",
"in": ["crate", "many"],
"params": { "pack": true }
},
"pile": {
"type": "rbd_stack",
"in": ["crates"],
"params": { "interval": 10, "duration": 3 }
}
},
"output": "pile"
}
Used in the example fracture_settle.