Houdini 20.5 MPM

Troubleshooting

To...Do this

Control the quality (level of detail) of the simulation

Increase the Particle Separation parameter on the MPM Container. This parameter drives the quality of the sources, colliders, and solver. A smaller particle separation will result in more details, the same way it does with FLIP.

Get precise and fast animated colliders

Always use the Animated (Rigid) Collider Type when possible. This provides very precise interpolations between frames.

If you look at the MPM Configure Spinning Tire example, the material is being moved using just friction, without needing to add any custom velocity fields.

Prevent MPM particles from going through thin colliders

  1. Increase the Voxel Size in the Geometry section of the MPM Collider. This will override the global resolution and allow you to create a finer mesh for your geometry.

    Original mesh

    Finer mesh after increasing the Voxel Size

  2. In the Advanced tab of the MPM Solver, turn on the Enable Particle-Level Collisions checkbox. This will allow a second collision step to be performed directly on the material points. This adds some computation, but yields more accurate collisions.

  3. Choose Velocity-Based Move Outside Colliders from the dropdown. This option applies the collision response to the particles' velocity and adjusts the velocity so that the particles are moved outside of the colliders during the next integration step. This is the most accurate way to make sure particles do not sink inside the collider but can lead to instability.

    For an example of thin colliders, see the MPM Configure Water Glass example.

Get smooth continuous emission without stepping artifacts

On the MPM Solver, increase the Global Substeps parameter in the Iterations section of the Solver tab. This will create a smoother emission stream.

Before increasing the Global Substeps

After increasing the Global Substeps

Apply forces to the simulation

Although MPM is in SOPs, you can dive inside the MPM Solver and set up custom forces using a POP Wrangle DOP.

Simulate thin objects like a sheet of metal or a hollow object

In the Points from Geometry section there is a Type parameter that’s set to Volume by default, which fills the geometry with particles. Changing this to Surface will instead cover the geometry surface with particles. However, the scatter may cause holes to appear in the geometry, which could make it difficult to render or retarget. Turn on Relax Iterations to more evenly distribute the particles.

Before turning on Relax Iterations

After turning on Relax Iterations

Hollow Squab dropped on a box

Pin particles in space to prevent them from moving

Use the parameters in the Pin Constraints section of the MPM Source to achieve this effect.

The MPM Configure Softbody example is a great demonstration of how to pin a Point Group. The inner points are isolated, and an Attribute Wrangle is used to pin the core points in space, allowing the ears and nose to move around freely.

Prune out points shooting outside of the visible simulated domain

  1. On the MPM Container, change the Geometry Type to Convex Geometry and set the Boundaries to Delete.

  2. Wire in an Object Merge SOP that references a camera frustum to use as the bounding box.

This is useful if you have something exploding or has a lot of splash.

Reduce the effect of materials sticking to each other

Reduce the Grid Scale in the Resolution section of the MPM Container.

The background grid is shared when there are two materials simulated together. When you have two points very close to each other, the material will behave half like material A and half like material B within the voxel because they're sharing the material property. Reducing the Grid Scale will reduce the bleeding between materials.

In the following example, water is dropped onto a mound of soil, but it does not run off as expected. Changing the Grid Scale to 1 means the voxel will be roughly the same size as the particle. Once we do this, the water is able to run off and even carry some of the soil particles with it, creating a more realistic look.

Before changing the Grid Scale

After changing the Grid Scale

Run a simulation in slow motion

  1. Reduce the Time Scale parameter on in the Iterations section of the MPM Solver. A value of 0.1 will make it 10 times slower.

  2. Add a Time Shift SOP between the MPM Collider and MPM Solver.

  3. Turn off the Integer Frames checkbox.

  4. Set the Frame to multiply the floating point frames by the timescale.

    $FF*ch("../mpmsolver/timescale")

For an example of how to set this up, see the MPM Configure Spinning Tire example.

Make the simulation run faster

Reduce the Substeps Max parameter in the Iterations section of the MPM Solver.

You can do this if you feel like the system is too conservative and you could get similar results with lower substeps. However, lowering this value too much can cause the simulation to become unstable.

You could also try increasing the CFL Condition and Material Condition, which would relax the velocity and stiffness constraints and could speed up the simulation.

Fix wiggling in materials that should not wiggle (such as wet sand)

Increase the Stiffness (E) in the Material section of the MPM Source node and decrease the Cohesion by the same factor.

For example, you can multiply each existing value by 0.01. This should give you a result that is very close to the original, without the wiggling.

Fix bouncing in materials that should not bounce (such as snow)

Increase the Critical Compression, Critical Stretch, and Stiffness (E) in the Material section of the MPM Source node.

This will make the material compress a little more, but will get rid of the bouncing when it settles.

Fix fast moving particles from collapsing mid-air or creating a staircase pattern around the edges

Increase the Max Voxel Dilation in the Simulation section of the MPM Solver.

Since the simulation is sparse, sometimes the background grid doesn’t extend fast enough to keep up and cover the area where the particles are going, when they are moving very quickly. This can cause the shape of the material to collapse and show the pattern of the voxels. Increasing this value will expand the active region. The reason the max value is low by default is to account for cases where you have crazy explosions with particles that are flying out of the simulation. The active regions are clamped to avoid running out of GPU memory and the simulation crashing.

Before increasing the Max Voxel Dialation

After increasing the Max Voxel Dialation

Fix a simulation where materials have changing properties and become unstable

Turn off the Assume Unchanging Material Properties checkbox on the Advanced tab of the MPM Solver.

By default the MPM Solver assumes that material properties are constant throughout the simulation. This is an optimization that prevents the solver from recomputing the Material Condition on every frame. However, if you have material properties that change as the simulation runs, it could become unstable if the substeps aren’t adjusted appropriately. Turning this off will slow down the simulation, but will ensure stability by keeping the Material Condition consistent.

Get some MPM particles to follow an animated target

In the Pin Constraints section of the MPM Source node, turn on the Initialize as Pinned, Enable Animation, and Use Input Animation checkboxes.

Before pinning points to animation

After pinning points to animation

Create a collider with variable friction

  1. Connect your collision object to an MPM Collider and set the desired Friction.

  2. Create a second branch from your original collision object and use an Attribute Paint SOP to paint areas where you want more friction.

  3. Use a Scatter SOP to scatter points on the painted areas by turning on Density Attribute and using the mask attribute.

  4. Use a VDB from Particles node to turn it into a VDB and wire it into a second MPM Collider.

  5. Set the second Friction on the second MPM Collider. In the following example, a Friction value of 0 was used for the slope (first MPM Collider) and a value of 10 was used for the painted areas (second MPM Collider).

  6. Merge the two MPM Colliders with a Merge SOP and connect it to the second input of your MPM Solver.

No friction

Painted areas have friction

Easily point deform non-fracturing objects (such as rubber or jello)

  1. Use a Time Shift and Point Deform after the MPM Solver to re-target your original geometry onto the simulated MPM points.

  2. Connect the Time Shift node to the output of the MPM Solver, and second input of the Point Deform.

  3. Set the Frame value to 1 to freeze on the rest frame. You can do this by right-clicking the parameter field and selecting Delete Channels. Then type 1 to reference the first frame.

  4. Connect the first input of the Point Deform to the output of your original source geometry, and connect the third input to the output of the MPM Solver.

Add variation to the way the material behaves and fractures

You can do this using an Attribute Wrangle SOP.

float noise = fit(abs(snoise(@P*5,5,0.5,1)), 0, 0.25, 0, 1);
@E *= fit01(noise, 1, 4);

For example, this code generates a noise value, then scales it and stores it as noise. It scales the noise value again and multiplies it by the attribute @E, which is the Stiffness (E) (Young’s modulus). This results in the MPM Source fracturing in a less uniform way.

MPM

Getting Started

Next Steps

Advanced