Adaptive Simulation of Soft Bodies in Real-Time Gilles Debunne Mathieu Desbrun Marie-Paule Cani Alan Barr iMAGIS USC Caltech Grail@USC
Jan 19, 2016
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
iMAGIS-GRAVIR / IMAG
Real time deformable model•Virtual laparoscopic surgery•Real time dynamic simulation•Realistic surface mesh deformation•Force feedback
iMAGIS-GRAVIR / IMAG
Contributions•Multi-resolution hierarchical model
•Automatic adaptivity
iMAGIS-GRAVIR / IMAG
Overview•Previous work
•Physical model
•Discrete operators
•Adaptive simulation
•Results and video
iMAGIS-GRAVIR / IMAG
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]
iMAGIS-GRAVIR / IMAG
Physical model ( I ) : Deformation
• d : displacement field w/r rest position
•Strain tensor = ½ (d + dT)
rest pos.
d = 0
iMAGIS-GRAVIR / IMAG
Physical model (II) : Constraint
•Stress tensor , 3x3 symmetric matrix
n
FF = n dA
surface dA
iMAGIS-GRAVIR / IMAG
a = g + d + (+) (.d)
Physical model (III) : Hooke’s law• Linear relation between strain and stress
= 2 + tr() I3
• Acceleration of a point
a = g + div
and are the Lamé coefficients
iMAGIS-GRAVIR / IMAG
Algorithm
•From the displacement field d
•Compute d and (.d)
•Compute the acceleration a
• Integrate the acceleration
iMAGIS-GRAVIR / IMAG
Differential operators
•Computation based on the Gauss theorem
i = x, y or z
Volume integral turned into boundary integral
Volume V Boundary V
/ i X dV =
X . ni dS
n
iMAGIS-GRAVIR / IMAG
Definition of associated volume
•The volume associated to a point is its Voronoi region (natural element).
1st ring neighbour
iMAGIS-GRAVIR / IMAG
Application•Gauss is applied on the gradient and on the divergence of the displacement field d.
•First order finite elements : linear interpolation
i
j
k
di
dj
dk
di =
1/2A ( (dj-di)ki + (dk-di)ij )
iMAGIS-GRAVIR / IMAG
Laplacian d & Grad Div (.d) •Sum over all the surrounding tetrahedrons
•For each participating tetrahedron :
di = - j=1..4 (i . j) dj
(.d) i = - j=1..4 (iT . j) dj
ii
iMAGIS-GRAVIR / IMAG
Multi-resolution validation
Dynamic behaviour is preserved
iMAGIS-GRAVIR / IMAG
Adapting the resolution
iMAGIS-GRAVIR / IMAG
Adaptive simulation : meshes•Several independent meshes of the object
iMAGIS-GRAVIR / IMAG
Interface between the meshes
iMAGIS-GRAVIR / IMAG
Introducing ghost points
• Information is transmitted through ghost points
FE1
E2
E3
F interpolated from (E1E2E3)
G
H
active ghost
iMAGIS-GRAVIR / IMAG
Adaptivity of the simulation• A point is replaced by those of the finer level which
are inside its Voronoi region.
iMAGIS-GRAVIR / IMAG
Adaptivity in color
Deformation Level of detail
iMAGIS-GRAVIR / IMAG
Conclusion
•Physical model (PDE)
•New discrete operators d and (.d)
•Adaptive simulation
iMAGIS-GRAVIR / IMAG
Perspectives
•Cuts in the object
•Plasticity
•Parallelization
iMAGIS-GRAVIR / IMAG
Real-time simulation• Imposed constant frame rate
•Computations have to be completed in less time than the frame interval
– Wait if too fast
– Linear time prevents too long computations
0 1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 6 7 9 10 118
iMAGIS-GRAVIR / IMAG
Cuts in the object
•Weaken then suppress links
•Propagate to higher levels
iMAGIS-GRAVIR / IMAG
Local reference frames
iMAGIS-GRAVIR / IMAG
Surface rendering•Skin nodes attached to surface points
p = wi pi
p
iMAGIS-GRAVIR / IMAG
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
+20
iMAGIS-GRAVIR / IMAG
Computing the Laplacian d•Generalization of 1D equation [DMSB99]
[Fuji95] di = j
dj -di
Lij
2
j Lij
i
jdi
dj
i Lij
iMAGIS-GRAVIR / IMAG
Extension to Grad Div (.d)•Measure of volume expansion
(.d) = j nij
(dj -di).nij
Lij
2
j Lij
i
Radial Rotationial
nij
iMAGIS-GRAVIR / IMAG
Results
iMAGIS-GRAVIR / IMAG
Discretization : Sample Points•Sample points in the material
•Adaptive sampling : hierarchy
iMAGIS-GRAVIR / IMAG
Precomputed Particle Neighborhood
•Connectivity is precomputed
•List of potential neighbors
•Limited to a restricted octree
iMAGIS-GRAVIR / IMAG
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
iMAGIS-GRAVIR / IMAG
Using OpenGL hardware•Using the OpenGL select buffer
Static tool position
orthographic camera
Dynamic tool
perspective camera
+ 2 clipping planes
iMAGIS-GRAVIR / IMAG
1
50
100
150
200Performances
•Time– About 0.1 ms
on OpenGL hardware– About 2 ms otherwise
•Acceleration factor
w.r.t. Rapid (OBB Trees)[Gottshalk & al. SIG’96]
SGI Onyx
2 IR
DEC Alpha 4
D60
Pentiu
m (
3Dfx)
Pentiu
m (s
oft)
iMAGIS-GRAVIR / IMAG
Collision response•Which points should be moved
•Along which direction
iMAGIS-GRAVIR / IMAG
Adaptivity of the simulation• A point is replaced by those of the finer level which
are inside its Voronoi region.