Houdini 20.5 Nodes Geometry nodes

MPM Solver 1.0 geometry node

Solves the MPM simulation described by its inputs and parameters.

On this page
Since 20.5

Overview

The MPM Solver can simulate many material types in a multi-physic context. MPM is an extension of FLIP to solid mechanics that was first introduced to graphics to simulate snow. It is particularly efficient at solving elastoplastic “chunky” materials where large chunks are expected to stick together, such as with snow and soil. It is also possible to simulate complex interactions like water carrying large chunks of soil or concrete.

The different materials are defined using the MPM Source while colliders are expected to come from the MPM Collider. The solver also requires the global resolution and start frame to be defined by the MPM Container. It uses sparse background grids and does not require a domain to be specified, although it can often be a useful optimization in practice. The solver is fully written in OpenCL to take advantage of the powerful GPUs available in most workstations.

Inputs

MPM Sources

All MPM Sources merged as a single geometry.

MPM Colliders

All MPM Colliders merged as a single geometry.

MPM Container

The MPM Container that defines the start frame, global resolution, and domain boundaries of the simulation if any.

Note

The MPM Container should also be referenced or connected by all MPM Sources and MPM Colliders used in the simulation.

Parameters

Reset Simulation

Clears the entire simulation cache.

Solver

Iterations

Time Scale

Multiplier applied to the timestep used by the solver.

Global Substeps

The number of DOP substeps for each simulated frame. This should generally be kept to 1 for performance reasons, but could be increased to achieve smooth continuous emission.

CFL Condition

The fraction of voxel width that a particle is allowed to travel within a single timestep.

Material Condition

A multiplier on the maximum timestep allowed based on the simulated material properties. To maintain the integrity of stiff materials, impulses need to travel very fast through the material. This imposes a constraint on the maximum allowed timestep similar to the CFL Condition. Increasing this value or reducing the stiffness of the simulated materials will relax this constraint and could speed up the simulation.

Substeps Min/Max

Limits on the minimum and maximum number of substeps.

The solver dynamically picks the lowest substep count based on the type and speed of the material. Although the max value is set at 10,000 by default, it doesn’t mean 10,000 are necessarily being used. You can see the actual substep count on the outputted geometry as a detail attribute. The high default value is to account for stiffer materials, like concrete or metal, that will require more substeps and are expected to be slow.

Tip

When facing instability, it is recommended to look at the MPM Solver's detail attributes to find the number substeps actually being computed on each frame. Using this information, it is often easy to raise the minimum substeps or reduce the CFL / Material Condition to prevent it from dipping below a certain number which will often solve the issue.

Note

Both the CFL and Material Conditions impose their own independent constraint on the maximum timestep allowed. The most strict constraint will drive the timestep while the more permissive one will have little impact. This means that, when simulating very stiff materials (bounded by the Material Condition like metal or concrete), objects will be allowed to move relatively fast without noticeable changes on the number of substeps required by the CFL Condition.

Forces

Gravity

The gravity acceleration.

Air Drag

The amount of air resistance bringing the material to match the wind’s velocity.

Wind Velocity

The uniform wind’s velocity.

Ground Plane

Enable

Creates a ground plane.

Response

Defines how the ground plane should affect the material on contact.

Bounce

Bounce or stop the material depending on its constitutive model.

Delete

Delete material points.

Position

Location of the ground plane in space.

Up Direction

Normal vector or orientation of the ground plane.

Rotate

Rotation applied to the normal vector of the ground plane.

Uniform Scale

Scaling factor applied to the infinite ground plane visualization in the viewport.

Friction

Amount of friction applied from the ground plane to the material, when in contact.

Sticky

Allows projection of the material velocity even when moving away from the ground plane. This prevents the material from detaching from the ground plane, making it sticky if friction is high enough. If the dot product between the normal vector of the ground plane and the velocity of the material is smaller than this value, the velocity of the material gets projected onto the ground plane.

Advanced

Simulation

Cache Memory (MB)

Amount of memory to use to cache the simulation.

Enable Automatic Resimulation

When any parameter inside a DOP simulation is changed, or when any referenced external node is changed, the cache of the simulation is marked as invalid. If this parameter is turned on, the next time the playbar is moved to reach a simulation time of 0, the cache will be cleared and the first simulation timestep will be recalculated. If the cache is invalidated while at a simulation time of 0, the initial state is recalculated immediately. If the current time is beyond time 0, then the most recent timestep will be recooked, and the cache beyond the current time will be cleared. But all prior timesteps will be left untouched other than to be marked invalid. If this parameter is off, the cache is marked as invalid in exactly the same way, but the cache is never cleared automatically. To recook a simulation in this mode, the Recook Simulation button on this parameter dialog or above the viewport must be used.

Deterministic Particle-to-Grid Transfer

Ensures that the particle-to-grid transfer is performed in a deterministic manner, which means that running a simulation multiple times will always yield the exact same result. Disabling this feature will prevent the simulation from being consistently reproducible. In general, the deterministic algorithm will yield better performance when particles are tightly packed together. On the other hand, isolated particles that are sparsely distributed in space like rain droplets or explosive debris could benefit from the non-deterministic version of the transfer algorithm if reproducibility is not required.

Rebuild Background Grids with OpenCL

Rebuild the VDB sparse background grids on the OpenCL device (GPU) instead of the host (CPU). This feature is turned off by default because of its high memory consumption which imposes a rather restrictive upper bound on the maximum resolution that can be simulated on a standard GPU.

Assume Unchanging Material Properties

Assumes that the material properties are constant throughout the simulation. This is an optimization that prevents the solver from recomputing the Material Condition on every frame. This should be turned off if different materials are sourced on different frames or if the dive target inside the solver is dynamically modifying the material properties as the simulation runs. Turning this off will slow down the simulation but will ensure stability by keeping the Material Condition consistent.

Enable Particle-Level Collisions

Allows a second collision step to be performed directly on the material points. This adds some computation but yields more accurate collisions. In general, this can be turned off unless very precise collisions are required such as with thin colliders.

Move Outside Colliders

Specifies how particles sinking into colliders should be treated.

Don’t Move Outside Colliders

Only apply the collision response to the particles' velocity. While more accurate, this won’t prevent particles from sinking into the colliders.

Position-Based Move Outside Colliders

Apply the collision response to the particles' velocity and move them out of the colliders acting on position directly. This can lead to a loss of volume.

Velocity-Based Move Outside Colliders

Apply the collision response to the particles' velocity and further adjust the velocity such 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.

Enable Affine Velocity (C) Clamping

Limits the magnitude of the Affine Velocity matrix C's determinant. This prevents C from becoming unreasonably large which often leads to inf and nan velocities. Instability should always be resolved with more substeps or by modifying the material properties, but this parameter can prevent some issues without affecting the amount of energy in the simulation.

Min/Max Voxel Dilation

Imposes constraints on the dilation of the sparse background grid in terms of voxel. The sparse background grid is only rebuilt every DOP substep (once per frame by default). To make sure material points do not land in inactive regions of the grid, it is being dilated to account for the motion that takes place between two consecutive DOP substeps.

Tip

Particles trying to move outside of the activated regions will be stopped at the boundary. Increasing the maximum dilation will solve this issue.

Note

Keep in mind that the dilation is defined in terms of voxels and not world units. Doubling the resolution of the simulation will effectively reduce by half the minimum and maximum padding in world units.

OpenCL

Finish Kernels

When Finish Kernels is disabled, no attempt is to wait for the OpenCL kernels to complete before continuing the next solver. This lets them run in the background until their results are actually needed. To simplify debugging, it is useful to ensure kernels are finished to make sure errors are detected in the right spot.

Recompile Kernel

When loading kernels from disk the kernel is cached to avoid regenerating it every solve. Turning this on forces the re-loading and recompiling of the kernel. This is useful if #include files refer to code that has changed, or the kernel file is changed in an external text editor.

It should always be disabled when prototyping is complete.

Kernel Options

Specify any desired compile flags for the kernel. The most common is to use -D to provide #define directives for the pre-processor.

Note

The Apple OSX OpenCL compiler requires only a single space between kernel options! Houdini defines additional flags while compiling kernels depending on the OpenCL device. The flags H_GPU or H_CPU distinguish between GPU and CPU devices, and H_NVIDIA, H_AMD, H_INTEL, or H_APPLE signify the hardware vendor. You can set the environment variable HOUDINI_OCL_REPORT_BUILD_LOGS to 1 before running Houdini to get a dump of all kernels compiled along with their preprocessor flags.

Visualize

Show Container

Displays the MPM Container's guide geometry.

Show Colliders

Displays the MPM Colliders' guide geometry.

Show Colliders

Defines the display color of the MPM Colliders' geometry.

Show Ground Plane

Displays the MPM Solver's ground plane guide geometry.

Show Ground Plane

Defines the display color of the MPM Solver's ground plane geometry.

Show Background Grid

Displays the VDB background grids' geometry.

Show BG Grid

Defines the display color of the VDB background grids' geometry.

Particles Color From Attribute

Point Attribute Name

Point attribute to remap to a color for visualization in the viewport.

  Min

Point attribute minimum to map to the 0 of the color ramp.

  Max

Point attribute maximum to map to the 1 of the color ramp.

Remap to Color

Remap the fitted point attribute values to colors.

Enable Display as Sphere

Render particles as spheres in the viewport. Override the particle rendering method defined by the MPM Sources.

Display Particles as Spheres

Render particles as spheres in the viewport.

Enable Point Scale

Override the point scale defined by the MPM Sources.

Point Scale

Multiplies the pscale attribute. This is strictly used for visualization and meshing post-simulation. The volume of each particle is always computed using the global particle separation cubed.

Display Pinned-to-Animation Guide

Display a blue wireframe sphere around the pinned particles.

Output

Point Attributes

Deformation Gradient (F)

Exports the 3×3 Deformation Gradient matrix F as a point attribute.

Tip

This attribute keeps track of the local rotation and all local elastic deformations (scale, shear). It can be used to copy geometry onto the simulated material points.

Affine Velocity (C)

Exports the 3×3 Affine Velocity matrix C as a point attribute.

Velocity (v)

Exports the particle velocity v as a point attribute.

Plastic Compression/Stretching (Jp)

Exports the determinant of the Deformation Gradient's plastic component Jp as a point attribute.

Tip

This attribute keeps track of how much compression and stretching was applied to the material as plastic deformation. Values below 1.0 represents compression while values above 1.0 represent stretching. The stretching information can easily drive secondary emission of dust or debris as it highlights where things are breaking and tearing.

Elastic Compression/Stretching (Je)

Exports the determinant of the Deformation Gradient's elastic component Je as a point attribute.

Radius (pscale)

Exports the particle radius pscale as a float point attribute.

Unique Identifier (id)

Exports unique particle identifier id as a point attribute.

Pinned (pintotanimation)

Exports the pinned particles' flag as the pintoanimation integer point attribute.

Age (age)

Exports the particle age as the age float point attribute.

Source Name (source_name)

Exports the particles' source name as the sourcename string point attribute. This attribute is defined by the MPM Sources for post-sim manipulations.

Extra Attributes

Exports additional point attributes by name.

Detail Attributes

Substep Count (substepcount)

Exports the actual number of computed substeps substepcount as an integer detail attribute.

Voxel Size (dx)

Exports the voxel width of the background grid dx as a float detail attribute.

Grid Scale (gridscale)

Exports the gridscale float detail attribute that defines the voxel size of the background grid in terms of the particle separation.

Particle Separation (particlesep)

Exports the particle separation particlesep as a float detail attribute.

Extra Attributes

Exports additional detail attributes by name.

See also

Geometry nodes