final project presentation& demo zhi dong real time fem of elasto-plastic simulation

21
Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation

Upload: aubrey-bishop

Post on 12-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation

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

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

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

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

New Challenges

Accuracy (Physically Valid)

Simulation Frame Rate

Stability

Page 6: Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thanks and Have a Nice Holiday !