On this page |
There are several MPM Configure examples available through the tab menu. These are similar to shelf tools that put down networks of nodes for learning purposes. The MPM Configure Water Glass example illustrates the use of the “liquid” Water material type. It puts down a simple network of nodes to simulate water being poured from one glass into another.
Important nodes ¶
water
This is the MPM Source that uses the Water material preset.
anim_glass
This is the MPM Collider, which uses the Animated (Rigid) collider type. It allows for very precise interpolation of the collider by the solver, as it keeps only one VDB and interpolates between the transforms resulting in very accurate collisions and stickiness on the collider. The Voxel Size is also decreased to
0.001
in order to override the default resolution defined by the Particle Separation parameter on the MPM Container. This increase in resolution will prevent the water from leaking through the thin walls of the glass. The Friction has also been changed to
0
, so that the water moves over the surface freely.
static_glass
This is the MPM Collider, which uses the Static collider type. It allows for very precise interpolation of the collider by the solver, as it keeps only one VDB and interpolates between the transforms resulting in very accurate collisions and stickiness on the collider. The Voxel Size is also decreased to
0.001
in order to override the default resolution of the Particle Separation parameter on the MPM Container. This increase in resolution will prevent the water from leaking through the thin walls of the glass. The Friction has also been changed to
0
, so that the water moves over the surface freely.
merge_colliders
This node merges the two colliders before feeding them into the MPM Solver.
mpmcontainer
This is the MPM Container, which defines the resolution of the simulation using the Particle Separation parameter.
mpmsolver
This is the MPM Solver, which does the work of solving the scene. It is important to note that Enable Particle-Level Collisions is turned on in the Collisions tab. This allows a second collision step to be performed directly on the material points. It adds some computation, but yields more accurate collisions. The Material Condition is also decreased slightly to fix some instability where the material requires more substeps than what is provided by default.
Learning from this example ¶
-
If you turn off Voxel Size on the
MPM Collider, you will see that the top of the glass disappears. This is because the glass is very thin, and requires a smaller Voxel Size to be represented properly inside the solver.
-
If you turn off Enable Particle-Level Collisions, you will see that the water goes right through the glass. The global resolution of the simulation is too coarse to properly capture the thin walls of the glass. The particle-level correction is the only thing preventing the particles from going through the glass in this case.
-
If you look on the Visualize tab of the
MPM Solver, you will see that Color From Attribute is turned on, which looks at the speed attribute and shows you how fast the water is moving.