MPM can be used to simulate basic cloth. It can also simulate thin shells, like sheet metal that gets dented by collisions.
Get one or more meshes use as the initial shapes of the cloth or shell. These meshes can be input from the scene or created in the graph. For best results:
Connect each mesh into the geometry
input of a make_mpm_cloth
or make_mpm_shell
node, and set its properties.
make_*
nodes if you want different meshes to have different properties.Connect the outputs from the make_*
nodes into the sources
port of a simulate_mpm
node.
Connect the ouput of an mpm_solver_settings
node into the settings
port of the simulate_mpm
node, and set its properties.
Use the cloth_mesh
or shell_mesh
output of the simulate_mpm
node in your graph. For example, connect it to a graph output, a terminal
node, or a file I/O node.
Set up the rest of the graph and scene as desired:
collider
node, connect its output into the colliders
input of the simulate_mpm
node, and connect a geometry that acts as an obstacle to its geometry
input. You can have multiple geometries connected to a collider
node, and multiple colliders
nodes connected to the simulate_mpm
node.wind_influence
or turbulence_influence
into the influences
input of the simulate_mpm
node.Use constrain_mpm
to pin portions of cloth or shells to geometry in the scene.
Connect a constrain_mpm
node between a make_mpm_cloth
or make_mpm_shell
node and the simulate_mpm
node.
cloth_source
or shell_source
output should be connected into the mpm_source
input of constrain_mpm
.out_mpm_source
output of constrain_mpm
should be connected into the sources
input of simulate_mpm
.make_mpm_cloth
or make_mpm_shell
node was already connected directly into the simulate_mpm
node, remove that connection. Otherwise the mesh will be simulated twice — once pinned and once unpinned.Connect one or more solid meshes into the constraint_geometry
input of the constrain_mpm
node.
Use the strength
parameter of constrain_mpm
to control how strongly the constrained points follow the constraint meshes versus how strongly they are affected by collisions. This value can be set above 1.0.
Here are some tips for simulating clothes on characters: