MPM
Ziyang Li, Weichen Liu
For this CSE 291 we did mainly two projects. The first one is the real time deformable solid, it's simulation and collision; the second one is the Snow Deformation using MPM Method.
Deformable Solid
We were determined to do a fracture project and want to destroy objects in real time. Although we stopped half way in favor of the MPM project. But we still have most of the deformable solid working properly. We are able to show the AABB for collision detections and they could be played with very fluently.
The two examples below shows a large chunk of tofu/jelly/whatsoever colliding on the ground and cubes bounding around.
Accomplishments
- Linear elastic tetrahedral elements.
- Collisions between tetrahedral elements: Intersection volume is calculated by Gift-wrapping algorithm.
- An optimization data structure to speed up collisions
- Implement basic plastic deformation
Struggles
The hardest thing in this part is to tweak the parameters.
Snow Simulation
We use MPM method to do our snow simulation. We implement the method in C++, and we do real time simulation using opengl just to render the point cloud. But then we think it's the best to use Raytracer to render the video, we then write export code and import the animation inside Blender.
Simulation
- Particle to grid:
- Shape function: Quadratic kernel function
- Mass: Weighted sum of neighbor particles
- Momentum:
- APIC momentum
- Stress momentum (Fixed Corotated Constitutive Model)
- Grid-based simulation (Calculate velocity field based on momentum)
- Grid to particle:
- Shape function: Quadratic kernel function
- Velocity: Weighted sum of neighbor grid
- Deformation gradient: Clamp and enforce snow-like plasticity
Real Time OpenGL Rendering
We are able to do MPM algorithm with near real time speed.
Offline Raytracing Results
Stacked Cubes
This is showing the same effect as the previous real time OpenGL rendering version. This time we are using just a particle system. We only have very few particles here.
Snow ball 1
This time we are clamping up the amount of particles and it is showing very promising results. The snow particles are sticking on the wall and the outermost ones are falling down.
Snow Ball 2
This is another rendering of a similar Snow Ball but we actually have fixed a bug from the first one. This time you can look at a different particle behavior.
References
- Taichi - https://github.com/yuanming-hu/taichi_mpm
- A Moving Least Squares Material Point Method with Displacement Discontinuity and Two-Way Rigid Body Coupling - http://taichi.graphics/wp-content/uploads/2019/03/mls-mpm-cpic.pdf
- The Material Point Method for Simulating Continuum Materials - https://www.seas.upenn.edu/~cffjiang/research/mpmcourse/mpmcourse.pdf
- The Affine Particle-In-Cell Method - https://www.math.ucla.edu/~jteran/papers/JSSTS15.pdf
- A material point method for snow simulation - https://www.math.ucla.edu/~jteran/papers/SSCTS13.pdf