8
1 Meshing: A (Biased) Crash Course Meshing: A (Biased) Crash Course Mathieu Desbrun Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 2 The Big Picture Meshing, an essential preprocessing step For surface representation complex geometry with a few basic geometric primitives For simulation of physical phenomena realistic/accurate animation of fluid, deformable solids, electromagnetism often modeled as PDE domain discretization Then FEM/FVM to integrate PDE in space (& time) Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 3 The Big Picture Meshing, an essential preprocessing step For surface representation complex geometry with a few basic geometric primitives For simulation of physical phenomena realistic/accurate animation of fluid, deformable solids, electromagnetism often modeled as PDE domain discretization Then FEM/FVM to integrate PDE in space (& time) Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 4 The Big Picture Meshing, an essential preprocessing step For surface representation complex geometry with a few basic geometric primitives For simulation of physical phenomena realistic/accurate animation of fluid, deformable solids, electromagnetism often modeled as PDE domain discretization Then FEM/FVM to integrate PDE in space (& time) Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 5 The Big Picture Meshing, an essential preprocessing step For surface representation complex geometry with a few basic geometric primitives For simulation of physical phenomena realistic/accurate animation of fluid, deformable solids, electromagnetism often modeled as PDE domain discretization Then FEM/FVM to integrate PDE in space (& time) Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 6 What is Meshing? General Idea: breaking up a physical domain 2D domain in 2D, or in 3D, or 3D domain,… into simpler subdomains—the elements simplices (triangles, tetrahedra) or not (quads, polygons, hexahedra, polyhedra) “flat” 2D “flat” 3D

The Big Picture - Discrete Differential Geometryddg.cs.columbia.edu/SIGGRAPH05/Meshing.pdf · 2 Discrete Differential Geometry: An Applied Introduction ACM SIGGRAPH 2005 Course 7

Embed Size (px)

Citation preview

1

Meshing: A (Biased) Crash Course

Meshing: A (Biased) Crash Course

Mathieu Desbrun

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

2

The Big PictureMeshing, an essential preprocessing step

For surface representationcomplex geometrywith a few basic geometric primitives

For simulation of physical phenomenarealistic/accurate animation of fluid, deformable solids, electromagnetism− often modeled as PDE

domain discretization− Then FEM/FVM to integrate PDE in space (& time)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

3

The Big PictureMeshing, an essential preprocessing step

For surface representationcomplex geometrywith a few basic geometric primitives

For simulation of physical phenomenarealistic/accurate animation of fluid, deformable solids, electromagnetism− often modeled as PDE

domain discretization− Then FEM/FVM to integrate PDE in space (& time)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

4

The Big PictureMeshing, an essential preprocessing step

For surface representationcomplex geometrywith a few basic geometric primitives

For simulation of physical phenomenarealistic/accurate animation of fluid, deformable solids, electromagnetism− often modeled as PDE

domain discretization− Then FEM/FVM to integrate PDE in space (& time)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

5

The Big PictureMeshing, an essential preprocessing step

For surface representationcomplex geometrywith a few basic geometric primitives

For simulation of physical phenomenarealistic/accurate animation of fluid, deformable solids, electromagnetism− often modeled as PDE

domain discretization− Then FEM/FVM to integrate PDE in space (& time)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

6

What is Meshing?General Idea:

breaking up a physical domain2D domain in 2D, or in 3D, or 3D domain,…

into simpler subdomains—the elementssimplices (triangles, tetrahedra)or not (quads, polygons, hexahedra, polyhedra)

“flat” 2D “flat” 3D

2

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

7

Brief GlossaryNode, element:Structured/Unstructured Mesh:

regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of position)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

8

Brief GlossaryNode, element:Structured/Unstructured Mesh:

regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of position)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

9

Why (Un)Structured?Structure brings:

simpler data structurebetter compressionreuse of DSP algos

smoothingwavelets

UnstructuredUnstructuredmeshingmeshing StructuredStructured

meshingmeshing

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

10

Brief GlossaryNode, element:Structured/Unstructured Mesh:

regular valence and degree

Isotropic/Anisotropic Mesh:without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of position)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

11

Why Anisotropy?

#V#V #F#FIsotropicIsotropicmeshingmeshing AnisotropicAnisotropic

meshingmeshing

#V#V #F#F

AnisotropicAnisotropicquadquad meshingmeshing

#V#V #F#F

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

12

Brief GlossaryNode, element:Structured/Unstructured Mesh:

regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of position)

3

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

13

Why Gradation?

Allows for better capture

of details for same

vertex budget

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

14

Goals in Mesh GenerationControl over shape of elements

mass matrix conditioningshape often induced by PDE

good bet: regular shape

Control over sizingoften dictated by simulation … & boundary

Control over total sizelow number of elements is preferred

Tetrahedrus Commonus

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

15

How to Mesh a Domain? Usually, "bottom-up" approach

vertices are first placed (point sampling)then connected by edges, triangles, etc…

But not always…remeshing thru simplification (top-down)placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]to best approximate local shape, based on normal field

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

16

How to Mesh a Domain? Usually, "bottom-up" approach

vertices are first placed (point sampling)then connected by edges, triangles, etc…

But not always…remeshing thru simplification (top-down)placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]to best approximate local shape, based on normal field

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

17

How to Mesh a Domain? Usually, "bottom-up" approach

vertices are first placed (point sampling)then connected by edges, triangles, etc…

But not always…remeshing thru simplification (top-down)placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]to best approximate local shape, based on normal field

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

18

What We Won’t Mention [Much]

Meshing of curved manifoldsoften, can be flattened thru parameterization

see STAR report aim@shape, Alliez et al. 2004

Meshing of non manifold objectsPolygonal Meshing Surface Approximation

vertices can be off the original surfacesee [Nadler ‘86, Simpson ’94, Heckbert-Garland ‘99]

4

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

19

So How do I Mesh a Domain?Seemingly, vertex placement is crucial

we must “sample” the domain appropriatelywell-spaced point sets?

spread nodes in the (flat or curved) domainspread them evenly − using an attraction/repulsion simulation for

instance

done, right? − most papers in graphics use this approach

good news: sufficient in 2D

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

20

So How do I Mesh a Domain?

An example from the sea…

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

21

Introducing Delaunay Triang.

In 3DIn 2D

‘Canonical’ triangulation of a point setwith numerous optimal properties

see: Eppstein, Meshing Roundtable 2001Shewchuck, his UC Berkeley’s websiteLots of robust, existing codes (Triangle, CGAL, …)

“territories” = Voronoi diagram“dual” = Delaunay triangulation (DT)Live demo

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

22

Moving on to 3DEverything breaks…

the regular tet does NOT tile spaceperfectly shaped tets everywhere not attainable

DT based on well-spaced points have slivers

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

23

Scrutinizing the Beast

Four (well-spaced) vertices near the equatorial plane of their circumsphere

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

24

Taming the Beast?Recipes to get rid of slivers

local jiggling of faulty verticesthrough optimization of shape’s “quality”− for example, penalize small dihedral angles

often, non-linear and slowno guarantee of success—in fact, may be worse

locally altering the Delaunay triangulationcalled “sliver exudation”no longer Delaunay, obviouslyguarantees, but no practical bounds

5

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

25

Popular 3D Meshing MethodsDelaunay-based

refinementsphere packing

specific subdivisionoctreeregular lattice

advancing front

spring energyLaplacian (bad!)non-zero rest length

aspect / radius ratiosdihedral / solid anglesmax-min/min-max

volumes, lengthssphere radii

sliver exudationLocal Node OptimizationsGlobal Node Placement

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

26

An Interesting Alternative Emergence of variational approaches

Centroidal Voronoi TesselationOptimal Delaunay Triangulation

Idea:position of vertices also optimal in some wayoften based on lifting transformation

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

27

Lifting Transformation (nD)Lift points (x, y) to paraboloid (x, y, x2 + y2)

placement of origin irrelevant

Delaunay triang. = convex hull of 3D points

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

28

Lifting Transformation (nD)Lift points (x, y) to paraboloid (x, y, x2 + y2)

placement of origin irrelevant

Voronoi Diagram = proj. of upper enveloppe

Before…

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

29

Pushing This Analogy FurtherIdea: move vertices to perfect the

approximation of the paraboloidroots in function approximation

Hessian(||x||2) = Id

studied quite a bit in 2DLloyd algo:

for given points,DT gives optimal L1 approx

for given conn., find optimal vertex positions− Live Demo

volume btw approximant and paraboloid

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

30

(after Lloyd relaxation)(after Lloyd relaxation)

Lloyd Algorithm in 3DBreaks too, unfortunately…

why? dual cells well-shapedbut not sufficient for well-shaped tets!use of a dual approach, maybe?

6

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

31

Under/Overlaid ApproximantCVT

approximantcompact Voronoi cellsisotropic sampling

ODT [Chen 04]

PWL interpolantcompact simplicesisotropic meshing

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

32

Results of Optimization in 2D

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

33

Optimization: init

00Distribution of radius ratiosDistribution of radius ratios

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

34

Optimization: step 1

11

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

35

Optimization: step 2

22

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

36

Optimization

7

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

37

Optimization

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

38

Optimization

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

39

Input mesh

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

40

Hand: Sizing

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

41

Hand Remeshed

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

42

Stanford Bunny

8

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

43

Stanford Bunny (uniform)

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

44

The Visible Human

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

45

Fandisk

Discrete Differential Geometry: An Applied IntroductionACM SIGGRAPH 2005 Course

46

ConclusionsMeshing: a fascinating research field

needs theoretical guaranteesneeds practical results

Link to DECimproves Hodge star if mesh is nice

Please, consider using Delaunaynot slow (unlike what you’ve heard)