370 likes | 525 Views
Adaptive Simulation of Soft Bodies in Real-Time. Gilles Debunne Mathieu Desbrun Marie-Paule Cani Alan Barr i MAGIS USC Caltech i MAGIS is a joint project of CNRS - INPG - INRIA - UJF. Grail @USC. Real time deformable model.
E N D
Adaptive Simulation of Soft Bodies in Real-Time Gilles Debunne Mathieu Desbrun Marie-Paule Cani Alan Barr iMAGIS USC Caltech iMAGIS is a joint project of CNRS - INPG - INRIA - UJF Grail@USC
Real time deformable model • Virtual laparoscopic surgery • Real time dynamic simulation • Realistic surface mesh deformation • Force feedback
Contributions • Multi-resolution hierarchical model • Automatic adaptivity
Overview • Previous work • Physical model • Discrete operators • Adaptive simulation • Results and video
Previous work • Finite elements [GTT89][BC96][DCA99][JP99] • Energy based [TPBF87] • Mass-spring systems [Hutch96][BW98] • Particle systems [MP88][DG96] • Hybrid models [MT92][Gas93][DG95][DDBC99]
Physical model( I ) : Deformation • d : displacement field w/r rest position • Strain tensor e= ½ (Ñd + ÑdT) rest pos. d = 0
F Physical model (II) : Constraint • Stress tensor s, 3x3 symmetric matrix n F = sndA surface dA
Physical model(III) : Hooke’s law • Linear relation between strain and stress s = 2 me + l tr(e) I3 • Acceleration of a point ra = rg + divs l and m are the Lamé coefficients ra = rg + mDd + (l+m) Ñ(Ñ.d)
Algorithm • From the displacement field d • ComputeDd and Ñ(Ñ.d) • Compute the acceleration a • Integrate the acceleration
Differentialoperators • Computation based on the Gauss theorem i = x, y or z Volume integral turned into boundary integral n ¶ / ¶i X dV = X . ni dS Volume V Boundary¶V
Definition of associated volume • The volume associated to a point is its Voronoi region (natural element). 1st ring neighbour
Application • Gauss is applied on the gradient and on the divergence of the displacement field d. • First order finite elements : linear interpolation j dj Ñdi= 1/2A ( (dj-di)ki + (dk-di)ij ) di dk i k
Laplacian Dd & Grad Div Ñ(Ñ.d) • Sum over all the surrounding tetrahedrons • For each participating tetrahedron : Ddi = - Sj=1..4 (ai . aj) dj Ñ(Ñ.d) i = - Sj=1..4 (aiT . aj) dj ai i
Multi-resolution validation Dynamic behaviour is preserved
Adaptivesimulation : meshes • Several independent meshes of the object
Introducing ghost points • Information is transmitted through ghost points active ghost E2 G F E1 H E3 F interpolated from (E1E2E3)
Adaptivity of the simulation • A point is replaced by those of the finer level which are inside its Voronoi region.
Adaptivity in color Deformation Level of detail
Conclusion • Physical model (PDE) • New discrete operators Dd and Ñ(Ñ.d) • Adaptive simulation
Perspectives • Cuts in the object • Plasticity • Parallelization
Real-time simulation • Imposed constant frame rate • Computations have to be completed in less time than the frame interval • Wait if too fast • Linear timeprevents too long computations 1 2 3 4 5 6 6 7 8 9 10 11 0 1 2 3 4 5 6 7 8 9 10 11 12
Cuts in the object • Weaken then suppress links • Propagate to higher levels
Surface rendering • Skin nodes attached to surface points p p = S wi pi
0 +2 Time steps • Courant’s criterion dt < h • a dt = vnew - vold< max • Stored in time bin lists. • Inverse powers of 2 of the frame rate
i Computing the Laplacian d • Generalization of 1D equation [DMSB99] [Fuji95] di = j 2 dj-di j Lij Lij dj di j Lij i
2 (dj-di).nij j Lij Lij i Extension to Grad Div (.d) • Measure of volume expansion (.d) = j nij nij Rotationial Radial
Discretization : Sample Points • Sample points in the material • Adaptive sampling : hierarchy
Precomputed Particle Neighborhood • Connectivity is precomputed • List of potential neighbors • Limited to a restricted octree
Collision detection • The organ • triangle mesh • can deform, can be cut • avoid pre-computations! • One or more tools • of simple geometry • rigid • passing through a fixed point
Using OpenGL hardware • Using the OpenGL select buffer Static tool position orthographic camera Dynamic tool perspective camera + 2 clipping planes
SGI Onyx2 IR Pentium (3Dfx) Pentium (soft) DEC Alpha 4D60 Performances 200 • Time • About 0.1 ms on OpenGL hardware • About 2 ms otherwise • Acceleration factor w.r.t. Rapid (OBB Trees) [Gottshalk & al. SIG’96] 150 100 50 1
Collision response • Which points should be moved • Along which direction
Adaptivity of the simulation • A point is replaced by those of the finer level which are inside its Voronoi region.