final project presentation& demo zhi dong real time fem of elasto-plastic simulation
TRANSCRIPT
![Page 1: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/1.jpg)
Final Project Presentation& Demo
Zhi Dong
Real Time FEM of Elasto-Plastic Simulation
![Page 2: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/2.jpg)
Presentation Summary Background of real time FEM
State of Art
New Challenges
Techniques/approaches
What have actually been accomplished
Demo Video
Summary of the course project contributions
![Page 3: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/3.jpg)
Background
Computer games or simulators, demand a continuously growing degree of visual realism and technical sophistication.
Movie Industry…. Is that true?
![Page 4: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/4.jpg)
State-of-Art
Linear FEM
Warped Stiffness FEM
Remesh Method
![Page 5: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/5.jpg)
New Challenges
Accuracy (Physically Valid)
Simulation Frame Rate
Stability
![Page 6: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/6.jpg)
Techniques/approaches The basic idea is First Build a Tetrahedral Mesh
Get the Stiffness Matrix for each element:
Here is the trick: we can first get a matrix which is 12X12 where M[i][i]=1, and M[i][9-i]= M[i][6+i] ,M[i][3+i], M[i][9+i] is between 0 to which means we move one point and The adjacent point move following it, which is d=Mf, if we want to know the f we should use f=Kd where K is inverse of M, and also the element stiffness matrix.
Get the Stiffness Matrix for the mesh using element stiffness matrix(Some vertices are shared by multiple tetrahedrons) (Assembling Method)
![Page 7: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/7.jpg)
Techniques/approaches Basic Idea
Mx¨ + Cx˙ +K(x − x0) = fext (1)
For each element with 4 vertices
f= Kd (2)
Simulation Procedural
Actually, it is pretty simple, first we calculate force then we get the force by (2), then Update the displacement of each vertex by(1) , Then we make it as a loop.
![Page 8: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/8.jpg)
Techniques/approaches
Triangle Mesh Deformation( Creavity)
Now we have the tetrahedron mesh deformation, but we haven’t got the triangle
mesh deformation. We should firstly let the tetrahedron mesh totally cover the triangle
mesh, then we map the triangle into the nearest vertex in the tetrahedron mesh.
If there exists displacement on the vertex, we simply apply:
triangle vertex displacement = tetrahedron vertex displacement / (distance to the nearest tetrahedron vertex)
![Page 9: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/9.jpg)
Techniques/approaches
Fragile Effect
We firstly predefine some points which are more easily to tear apart, then at each simulation step, we check the displacement of the points, if one exceeds threshold, we should make all crack points tore apart.
Pro: Easily to implement
Con: Hard to mark the predefine crack points.
![Page 10: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/10.jpg)
What have actually been accomplished
Tools Used which part is borrowed, which part is written by myself.
Borrowed:
SlimDX: API for DirectX11 in C#
Written by myself:
Render Engine: Just reuse the code when I complete the previous HWs of COMP 768 Physics Simulation Module: all written by myself, partially because all libs don’t support C#, including high rank matrix multiplication, inverse of matrix, and other trivial stuffs.
Collision Detection: Written by myself. Reuse some code from previous HWs. Bulletseems not work very well because it is a little complex and a little bit harder to integrate.
![Page 11: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/11.jpg)
What have actually been accomplished
Architecture of System
Single Tetrahedron Simulation
: Element Stiffness Matrix : Positions For 4 nodes in the Element
Tetrahedron Mesh
: Nodes, : Tetrahedrons : Stiffness Matrix
FEM Method
: Update the forces for each node: Update the displacement of each node: Get the inverse of Stiffness Matrix
Mesh Mapping
Update triangle position based on tetrahedron positions
Contains
Uses
Following
![Page 12: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/12.jpg)
What have actually been accomplished
Actually create Physics Engine
After all is done, in the demo we will see that we actually build a whole physics engine, including collision between soft-body to rigid body and rigid body to rigid body.
What can be improved is creating some low level math libs.
![Page 13: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/13.jpg)
What have actually been accomplished
Demos After Implementing all the features of FEM, I also have done some demos to show the correctness and efficiency for my method:
Two Demos:
Stretch Bunny
Pull the tail of the bunny to stretch down and see what happens.
Balls Hitting Deformable Body Show the interaction with rigid body and fragile effect.
![Page 14: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/14.jpg)
Demo Video
Let’s Watch it!
URL: http://www.youtube.com/watch?v=J-7xuLv0Vfc
![Page 15: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/15.jpg)
Demo Video
Correctness
In the first demo, the bunny is stretched down, all adjacent parts in around the tail are moving following the tail, but it does not exceed the movement of tail.
The head of bunny moves down with the greatest “latency” which means the tetrahedrons movement are damping to the head.
![Page 16: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/16.jpg)
Demo Video
Correctness
In the second demo, the soft body is hit by several balls, I predefined the upside of the deformable body having a line of crack points. So it is obvious that if they are colliding, there exists a big crack.
It is visual convincing and shows a nice deformation intuitively.
![Page 17: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/17.jpg)
Results: comparison, analysis
Efficiency
In the whole simulation procedural, the mesh has been preprocessed, and once it has been processed, it has no updating. So the main part which affects the simulation is calculating the forces and displacement.
In our method, the displacement and forced computing is done in linear time complexity. See the previous slides…
![Page 18: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/18.jpg)
Results: comparison, analysis
Efficiency
In our demos, our laptop is using Nvidia GF170M with 2 GB memory and Pentium 4 processor. The triangle consists of 1K vertices. In our demos, it can reach 62 FPS.
![Page 19: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/19.jpg)
Summary of the course project contribution(s)
Implement real time FEM with fragile effect.
Triangle Mesh displacement Computing Method is novel and easy to implement.
Integrate FEM with rigid body dynamics which makes the system like a physics engine.
Write all stuff from scratch, without using any physics tools or libs. Just leverage DirectX11. Best way to avoid some illegal infringement.
![Page 20: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/20.jpg)
Possible future work
Using CUDA to accelerate calculation
Release or modify some parts of Bullet Engine, because it is open source engine, but Softbody module solves it using spring mass model. Adding FEM will add more fantastic effect
![Page 21: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation](https://reader036.vdocuments.us/reader036/viewer/2022070408/56649e605503460f94b5a1fe/html5/thumbnails/21.jpg)
Thanks and Have a Nice Holiday !