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 Sand Instances example illustrates the use of the Sand material type. It puts down a simple network of nodes to simulate Crag walking through a sandbox.
Important nodes ¶
sand
This is the MPM Source that uses the Sand material preset.
crag
This is the MPM Collider, which uses the Animated (Rigid) collider type. It allows for very precise interpolation of the colliders by the solver, as it keeps only one VDB and interpolates between the transforms resulting in very accurate collisions. The
Crag: Test Geometry is made of multiple rigid pieces, and based on the Name Attribute, it will figure out that all of these pieces are rigid and create a collider per piece (67 total). This allows you to use very precise collisions with something that looks like it’s deforming.
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. The Material Condition is decreased to
0.7
to fix some instability where the material requires more substeps than what is provided by default.
orient_from_F_and_set_name
This Attribute Wrangle provides some initial random orientation to the points and extracts the rotation from the deformation gradient. From frame to frame it will extract the rotational component of the deformation gradient and will add it on top of the randomized orientation of the points. This makes the sandbox look more natural by adding more variations.
rocks
The rock geometry to instance onto each point.
instance_rocks
This Copy to Points node instances the rocks onto each oriented point.
Learning from this example ¶
The purpose of this example is to show that you can extract orientation information from the deformation gradient to do instancing. It also illustrates that you can decompose a deforming collider into multiple rigidly transforming colliders.
To... | Do this |
---|---|
Removed randomized rotation of the rocks |
On the //rotate(rot, fit01(rand(@id%7745), -3.14, 3.14), normalize(fit01(vector(rand(@id%6651)),-1,1))); //rotate(rot, fit01(rand(@id%9531), -3.14, 3.14), normalize(fit01(vector(rand(@id%1232)),-1,1))); |
See the randomized rotation of the particles |
Click the
|
See the different shaped rocks |
|