Set up an MPM cloth or shell simulation

MPM can be used to simulate basic cloth. It can also simulate thin shells, like sheet metal that gets dented by collisions.

  1. 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:

    • The mesh should be as regular as possible, for example, triangles or quads without any long slivers.
    • The edge lengths should reflect the size of detail that you want in the simulation.
    • If you are using meshes from the scene, hide the original mesh.
  2. Connect each mesh into the geometry input of a make_mpm_cloth or make_mpm_shell node, and set its properties.

    • Use separate make_* nodes if you want different meshes to have different properties.
    • Connect multiple meshes into the same node for efficiency if you want them to have the same properties. Optionally, you can also merge them into a single mesh beforehand.
  3. Connect the outputs from the make_* nodes into the sources port of a simulate_mpm node.

  4. Connect the ouput of an mpm_solver_settings node into the settings port of the simulate_mpm node, and set its properties.

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

  6. Set up the rest of the graph and scene as desired:

    • Optionally, add a 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.
    • Optionally, connect influence nodes such as wind_influence or turbulence_influence into the influences input of the simulate_mpm node.

Pin cloth or shells

Use constrain_mpm to pin portions of cloth or shells to geometry in the scene.

  1. Connect a constrain_mpm node between a make_mpm_cloth or make_mpm_shell node and the simulate_mpm node.

    • The cloth_source or shell_source output should be connected into the mpm_source input of constrain_mpm.
    • The out_mpm_source output of constrain_mpm should be connected into the sources input of simulate_mpm.
    • If the 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.
  2. Connect one or more solid meshes into the constraint_geometry input of the constrain_mpm node.

    • The meshes should enclose the points that you want to pin.
    • Typically, you want to use small, simple meshes that are hidden in the scene.
    • Make sure the meshes are animated if they need to follow visible geometry in the scene.
  3. 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.

Create clothes on characters

Here are some tips for simulating clothes on characters: