Smoothing & FairingMario Botsch
2
Motivation
• Filter out high frequency noise
Desbrun, Meyer, Schroeder, Barr: Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow, SIGGRAPH 99
3
Motivation
• Filter out high frequency noise
4
Motivation
• Advanced Filtering
Original Low-Pass ExaggerateKim, Rosignac: Geofilter: Geometric Selection of Mesh Filter Parameters, Eurographics 05
5
Motivation
• Fair Surface Design
Schneider, Kobbelt: Geometric fairing of irregular meshes for free-form surface design, CAGD 18(4), 2001
Motivation
• Hole-filling with energy-minimizing patches
6
Liepa: Filling Holes in Meshses, SGP 2003
Motivation
7
Demo
Smoothing & Fairing
Smoothing
• How would you smooth a 1D/2D signal?
9
Diffusion Flow
10
!f
!t= "!f
diffusion constant
Laplace operator
Diffusion Flow
11
• 2nd order elliptic PDE
• Solve numerically– Discretize in space & time– Discretize time derivative– Discretize spatial derivatives
@f(x, y, t)
@t
= �
✓@
2f(x, y, t)
@x
2+
@
2f(x, y, t)
@y
2
◆
Discretize in Space & Time
• Sample function f(x,y,t) on a regular grid– Grid spacing h, time step δt
12
f[i,j,t]h
h
x
y
f [i, j, t] = f (i · h, j · h, t · �t) , i = 1, . . . , n,
j = 1, . . . ,m,
t = 0, 1, 2, . . .
• Approximate f(x+h) from Taylor series
• Approximate of f ’(x)
Finite Differences
13
Brook Taylor (1685-1731)
f
0(x) ⇡ f(x+ h)� f(x)
h
f(x+ h) = f(x) + hf
0(x) +h
2
2!f
00(x) + . . .
⇡ f(x) + hf
0(x)
• Approximate f(x-h) from Taylor series
• Approximate of f ’(x)
Finite Differences
14
Brook Taylor (1685-1731)
f
0(x) ⇡ f(x)� f(x� h)
h
f(x� h) = f(x)� hf
0(x) +h
2
2!f
00(x) + . . .
⇡ f(x)� hf
0(x)
Finite Difference Method
• Approximation of spatial derivatives
15
forwarddifferences
backwarddifferences
centraldifferences
fx
[i, j, t] ⇡ f [i+ 1, j, t]� f [i, j, t]
h
fx
[i, j, t] ⇡ f [i, j, t]� f [i� 1, j, t]
h
fx
[i, j, t] ⇡ f [i+ 1, j, t]� f [i� 1, j, t]
2h
Finite Difference Method
• Approximation of higher-order derivatives
• Approximation of Laplacian
16
fxx
[i, j, t] ⇡ fx
[i, j, t]� fx
[i� 1, j, t]
h
=f [i+ 1, j, t]� 2f [i, j, t] + f [i� 1, j, t]
h2
�f [i, j, t] ⇡ fxx
[i, j, t] + fyy
[i, j, t]
=f [i+ 1, j, t] + f [i� 1, j, t] + f [i, j + 1, t] + f [i, j � 1, t]� 4f [i, j, t]
h2
• Approximate f(t+δt) from Taylor series
• Explicit Euler time integration
Finite Differences
17
Brook Taylor (1685-1731)
Leonhard Euler(1707-1783)
f(t+ �t) = f(t) + �t f(t) +�t2
2!f(t) + . . .
⇡ f(t) + �t f(t)
f(t+ �t) f(t) + �t f(t)
Finite Difference Method
• Approximation of temporal derivative
18
ft[i, j, t] ⇡ f [i, j, t+ 1]� f [i, j, t]
�t
Diffusion Flow
19
• Continuous PDE
• Finite difference discretization
@f(x, y, t)
@t
= �
✓@
2f(x, y, t)
@x
2+
@
2f(x, y, t)
@y
2
◆
δtλ has to be small(<=1 in this case)
f [i, j, t+ 1]� f [i, j, t]
�t= �
f [i+ 1, j, t] + f [i� 1, j, t] + f [i, j + 1, t] + f [i, j � 1, t]� 4f [i, j, t]
h2
f [i, j, t+ 1] = f [i, j, t] + �t�f [i+ 1, j, t] + f [i� 1, j, t] + f [i, j + 1, t] + f [i, j � 1, t]� 4f [i, j, t]
h2
Diffusion in 2D
20
Demo
Diffusion Flow on Meshes
• Continuous
• Discretization
21
0 Iterations 10 Iterations 100 Iterations
@p
@t= ��p
δλ has to be small(~0.5 in exercises)
pi pi + �t��pi
Laplace Discretization
• Laplace discretization
• Uniform Laplace
• Cotangent Laplace
22
vi
vj
�ij�ij
�pi =1P
vj2N1(vi)wij
X
vj2N1(vi)
wij
�pj � pi
�
wij = cot↵ij + cot�ij
wij = 1
Note: No Voronoi area Ai for explicit
smoothing
Comparison
23
Original Uniform Laplace Cotan Laplace
Further Topics
• Implicit time integration
• Higher-order flows
• Boundary constraints
• Nonlinear flows, anisotropic flows
24
pi(t+ 1) = pi(t) + �t��pi(t+ 1)
@p
@t= (�1)k+1��kp
Smoothing & Fairing
26
Fairness
• Idea: Penalize “unaesthetic behavior”
• Measure fairness– Principle of the simplest shape– Physical interpretation
• Minimize some fairness functional– Surface area, curvature– Membrane energy, thin plate energy
Nonlinear Energies
• Membrane energy (surface area)
• Thin-plate surface (curvature)
• Too complex... simplify energies
27
�
SdA � min with �S = c
�
S⇥2
1 + ⇥22 dA � min with �S = c, n(�S) = d
Membrane Surfaces
• Membrane energy (surface area)
28
�
�⇥pu⇥
2 + ⇥pv⇥2 dudv � min
Variational Calculus in 1D
• 1D membrane energy
• Add test function u with u(a) = u(b) = 0
• If f minizes L, the following has to vanish
29
L(f) =� b
af �2(x) dx � min
L(f + �u) =� b
a(f � + �u�)2 =
� b
af �2 + 2�f �u� + �2u�2
⇥L(f + �u)⇥�
�����=0
=⇥ b
a2f �u� != 0
Variational Calculus in 1D
• Has to vanish for any u with u(a) = u(b) = 0
• Only possible if
➡ Euler-Lagrange equation
30
� 1
0f �g = [fg]10 �
� 1
0fg�
f �� = �f = 0
� b
af �u� = [f �u]ba⌅ ⇤⇥ ⇧
=0
�� b
af ��u
!= 0 ⇥u
Membrane Surfaces
• Membrane energy (surface area)
• Variational calculus
31
�
�⇥pu⇥
2 + ⇥pv⇥2 dudv � min
�p = 0
Thin-Plate Surfaces
• Thin-plate energy (curvature)
• Variational calculus
32
�
�⇥puu⇥
2 + 2 ⇥puv⇥2 + ⇥pvv⇥
2 dudv � min
�2p = 0
Laplace Discretization
33
Original Uniform Laplace Cotan Laplace
Smoothing ⇔ Fairing
• Fair minimizer surfaces satisfy
• Hence they are stationary points of Laplacian flows
• Diffusion flow converges to fair surfaces
• Explicit time integration corresponds to an iterative solution of the Euler-Lagrange equation
34
@p
@t= (�1)k+1��kp
�kp = 0
Z ����@kp
@uk
����2
+
����@kp
@uk�1@v
����2
+
����@kp
@uk�2@v2
����2
+ · · ·+����@kp
@vk
����2
dudv ! min
Literature
• Laplacian flow, curvature flow
– The Book: Chapter 4– Taubin, A Signal Processing Approach to Fair Surface Design,
SIGGRAPH 1995
– Desbrun, Meyer, Schröder, Barr: Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow, SIGGRAPH 1999
35
Literature
• Nonlinear smoothing
– Bobenko & Schröder: Discrete Willmore Flow, SGP 2005
• Anisotropic smoothing
– Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces, ACM Trans. on Graphics 22(1), 2003
– Hildebrandt & Polthier, Anisotropic Filtering of Nonlinear Surface Feature, Eurographics 2004
• Bilaterial smoothing
– Fleishman et al, Bilateral Mesh Denoising, SIGGRAPH 2003
– Jones et al, Non-iterative Feature-Preserving Mesh Smoothing, SIGGRAPH 2003
36