Deforming meshes that split and merge Chris Wojtan Nils Th urey Markus Gross Greg Turk Chris Wojtan, Nils Thurey, Markus Gross, Greg Turk
Introduction ž Presents a method for accurately tracking the moving surface of deformable materials that gracefully handles topological changes ž Why is this method useful: ž Model materials à water, toothpaste, bread dough, peanut butter, taffy, tar, clay, etc. 2 Seung-ho shin 2010/08/06 # 2
Introduction Continued Approach uses a triangular mesh to represent the surface of objects Benefit: allows the surface to move in Lagrangian manner Drawback: changing the topology of a mesh is very difficult Solution: completely avoids the difficulties by replacing the parts of the mesh that has topology changes with a simplified surface generated by marching cubes 3 Seung-ho shin 2010/08/06 # 3
Related Works Tracking surfaces with changing topologies Osher and Sethian [1988] Commonly used method for tracking such surfaces are level set method Enright et al. [2002] Particle level set methods, combine Lagrangian advection with Eulerian level set schemes Closely related to level sets are the socalled volumeof-fluid methods Seung-ho shin 2010/08/06 # 4
Related Works Strain [2001] formulated semi-lagrangian contouring èour method retains high resolution details by only locally resampling the surface where topological changes occur Point-based methods use unstructured Lagrangian marker particles to track the interface èstill require a continuous surface approximation which introduces smoothing Seung-ho shin 2010/08/06 # 5
Related Works [Reynolds 1992; Glimm et al. 1998; Jiao 2007] mesh based surface trackers Very difficult to account for topological changes Detecting and re-meshing self-intersections using a set of heuristic rules Mesh-based approach for topology changing interfaces that requires a tetrahedralization of the interface points. Ponsand Boissonat [2007] Slower than our method and its tetrahedralization makes topological control more difficult. Seung-ho shin 2010/08/06 # 6
Related Works [Bischoff and Kobbelt 2003] Control topology changes of level sets [Varadhan et al. 2004] Complex cell test We modify it to retain fine details on the tracked surface while merging undesired folded sheets Seung-ho shin 2010/08/06 # 7
Related Works Lagrangian finite element method we embed a high resolution mesh into a body-centered cubic (BCC) lattice Using Eulerian fluid simulator. Seung-ho shin 2010/08/06 # 8
Key attributes of the method Performs topological splits and merges Retains thin features and fine surface details Robust during complex topology changes Surface tracker can be tuned to allow/forbid particular kinds of topology changes Surface tracker does not depend upon any particular simulation technique Decouple physics, topological, and surface detail resolutions in simulator 9 Seung-ho shin 2010/08/06 # 9
Definitions Lagrangian mesh: Drawn on the body. The mesh deform with the body. Both the nodes and the material points change position as the body deforms, however the position of the material points relative to the nodes remains fixed. Seung-ho shin 2010/08/06 # 10
Eulerian mesh: background mesh, body flows though the mesh as it deforms. Nodes remain fixed and material points move though the mesh. The position relative to the nodes varies with motion. Seung-ho shin 2010/08/06 # 11
Approach Step 1 Step 2 Step 3 Step 4 Step 5 Input: closed manifold mesh M that represents the surface of the given material. 12 Seung-ho shin 2010/08/06 # 12
1) Surface tracker moves the vertices of the mesh according to the update rule given by the simulator: a) interpolation of simulation nodes b) numerical integration through a velocity field 2) Space around the mesh is finely sampled on a regular grid, and results in a signed distance field D. Where the sign of a sample in the distance field is determined by whether the sample is inside or outside of the mesh M, and the magnitude is the distance to the nearest part of the mesh. 3) Then the distance is field is traversed, and the eight distance samples at the corners of each cell are examined to determine whether a topological event may be taking place at the given cell. We look at the 8 corners of each cell, and using the deep cell test we determine where the topological events take place. 4) This results in a list of cells that are marked for modification. We clip the surface mesh M to the boundary of this collection of marked cells, retaining only the portions of the mesh that are outside of the marked cells. We then form new mesh components inside the marked cells using marching cubes. 5) The clipped exterior mesh is joined to the interior mesh components. The result is a new mesh that has been modified in regions of topological change Seung-ho shin 2010/08/06 # 13
Lagrangian mesh update Advantages: Inherently preserves surface details Other Methods: Level set method : leads to numerical smoothing of surface features, and impossible to represent a surface with details smaller than grid resolution Combined Eulerian and Lagrangian: difficult to retain sub-grid resolution surface details 14 Seung-ho shin 2010/08/06 # 14
Detection of topological events Signed Distance Field Calculation Calculate and place a signed distance function on a regular grid that encloses the mesh M Topological Event Detection Mechanisms Complex cell test Deep Cell and Self-Intersection Tests 15 Seung-ho shin 2010/08/06 # 15
What is a Complex Cell? Complex edge: edge in distance function D that intersects M, the surface mesh, more than once Complex face: square face in D that intersects M in the shape of a closed loop or touches a complex edge Complex cell: cubic cell in D that has any complex edges or complex faces, or any cell that has the same sign of D at all of its corners while also having explicit geometry from M embedded inside of it 16 Seung-ho shin 2010/08/06 # 16
why is the complex cell test not sufficient? Does not preserve sharp corners Complex Cell Test A straight-forward application of the complex cell test will al so mark detailed surfaces as topologically complex, and will not preserve surface details like sharp corners. 17 Seung-ho shin 2010/08/06 # 17
Deep cells Examples of co mplex cells: 18 Seung-ho shin 2010/08/06 # 18
Difference between complex and deep cells Deep cells èonly label geometry necessary for a topological change, while complex cells aggressively label important surface details, including sharp corners and highly detailed regions. Seung-ho shin 2010/08/06 # 19
Deep cell and self-intersection tests Method to preserve thin features: only allow merging and never split the topology 2 types of deep cells: Completely inside the implicit surface: merging Completely outside the implicit surface: splitting Mark cells that indicate significantly large selfintersections in the mesh 20 Seung-ho shin 2010/08/06 # 20
Self-intersections in the mesh Test performed while marching rays through the mesh in the voxelization phase, when distance field D is created. Dot product of the ray direction with the triangle Negative dot product: ray entering Positive dot product: ray leaving Initialize integer variable that stores the value of the ray entering. Seung-ho shin 2010/08/06 # 21
Cell-marching step Deep cells are marked March outward along complex edges and faces Topological cha nge after re-sa mpling 22 Seung-ho shin 2010/08/06 # 22
Cell-marching step a) All deep cells are marked b) March outward along complex edges and faces until the marked region is topologically simple c) Topological change after re-sampling marked cells Need to ensure that that every cell on the boundary of marked cell region has a topologically simple interface with marching cubes. Execute flood fill algorithm, starting with initially marked deep/complex cells and march outwards across the complex surface, until entire region of marked cells is bounded by simple cube faces. Seung-ho shin 2010/08/06 # 23
Altering mesh topology - Step1 Inside comple x region Outside comp lex region Mark the topologically complex cells 24 Seung-ho shin 2010/08/06 # 24
Altering mesh topology Step2 Type 1 vertex Find each triangle that intersects a cell edge on the boundary of the mark ed region. Calculate the intersection point between the triangle and edge and subdivide the triangle into 3 new triangles that share a vertex at the i ntersection point (type 1 vertex). 25 Seung-ho shin 2010/08/06 # 25
Altering mesh topology Step3 Type 2 vertex Find all triangle edges that intersect a cell face on the boundary of the marked region. Split each triangle edge at the point where it intersects t he face, subdividing the 2 original triangles into 4 and inserting a new v ertex on the face (type 2 vertex). 26 Seung-ho shin 2010/08/06 # 26
Altering mesh topology Step4 Simplify curve connecting type 1 and 2 vertices until it s a straight line bet ween type 1 vertices. Repeatedly collapse all type 2 vertices until they are removed. Afterwards, no triangles will cross the faces of any marked cell. E ach triangle will lie completely inside or outside of the region. 27 Seung-ho shin 2010/08/06 # 27
Altering mesh topology Step5 Delete all triangles that lie completely inside the marked region. Use marc hing cubes to generate a triangle mesh in the marked region, and connec t the meshes together at the type 1 vertices. 28 Seung-ho shin 2010/08/06 # 28
Robustness Ensure triangles are well-shaped Adaptively subdivide triangle edges when they get too long, and collapse edges when they become too short or possess a bad aspect ratio Perform edge flips after creating type 1 vertices if any newly created triangle has particularly small angles Maintain simple topology along boundary faces before sewing meshes together Delay edge collapses if it will prematurely connect other type 1 vertices Gridlock: where no safe edge collapse can be performed 29 Seung-ho shin 2010/08/06 # 29
Integration with Physics To integrated our surface tracker into both a finite element viscoelasticity solver and an Eulerian fluid solver. We chose to only calculate topological changes once per frame of the output animation. Seung-ho shin 2010/08/06 # 30
Results Level set: most of the surface d etails are lost with thi s method Particle level set: more surface details a re kept Proposed mesh-based tracker: detailed foldi ng over on flat region of the liquid 31 Seung-ho shin 2010/08/06 # 31
Comparison Results : Zalesak Sphere ž Paper s method ž Semi-Lagrangian contouring ž Particle level set žlevel set 32 Seung-ho shin 2010/08/06 # 32
Computation Time Out of the total time spent on our surface tracking algorithm, the core topology handling takes approximately 60% of the computation. The calculation of the signed distance field requires about 20%. Such as the mesh update, the mesh subdivision, and interfacing with the simulation code take the last 20%. Seung-ho shin 2010/08/06 # 33
12 thousand elements and 250 thousand surface triangles simulations took about 3 minutes per frame and spent less than 1% of the time on topological detection and meshing code 105 thousand elements and 206 thousand surface triangles Simulations took about 3 minutes per frame and spent less than 1% of the time on topological detection and meshing code Seung-ho shin 2010/08/06 # 34
Seung-ho shin 2010/08/06 # 35
Limitations Identifies topological events based on particular cell size of the distance field Topological classification will ignore small features that lie completely within a cell Extracted isosurface may not match the surface mesh at ambiguous marching cubes faces, leaving a quadrilateral hole in the mesh Proposed strategy for maintaining thin sheets doesn t preserve complicated regions that have both splitting and merging behavior Re-meshing depends only on the sampled distance field, and ignores the actual geometry of the mesh Changes to the mesh may result in changes to the volume of the material 36 Seung-ho shin 2010/08/06 # 36
Future work Couple surface tracking method to other kinds of simulators: Smoothed Particle Hydrodynamics, Lattice Boltzmann Method Use other isosurface creation methods besides marching cubes: dual contouring method of isosurface creation Using local mesh operations: edge collapses that recognize and preserve sharp features Other rules for triggering topology changes that can be used for additional materials 37 Seung-ho shin 2010/08/06 # 37
Conclusion Provides a technique for updating the surface of a deforming mesh that allows topological changes Surface tracker is the perfect balance between level set and deforming meshes that do not allow topological changes Robust: topology changes are carried out using marching cubes that only uses the sampled distance field Method many handle many different situations Motion of surface mesh can be guided by any velocity field/physics simulator 38 Seung-ho shin 2010/08/06 # 38