smoothing & fairing · – bobenko & schröder: discrete willmore flow, sgp 2005 •...

36
Smoothing & Fairing Mario Botsch

Upload: others

Post on 29-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Smoothing & FairingMario Botsch

Page 2: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

2

Motivation

• Filter out high frequency noise

Desbrun, Meyer, Schroeder, Barr: Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow, SIGGRAPH 99

Page 3: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

3

Motivation

• Filter out high frequency noise

Page 4: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

4

Motivation

• Advanced Filtering

Original Low-Pass ExaggerateKim, Rosignac: Geofilter: Geometric Selection of Mesh Filter Parameters, Eurographics 05

Page 5: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

5

Motivation

• Fair Surface Design

Schneider, Kobbelt: Geometric fairing of irregular meshes for free-form surface design, CAGD 18(4), 2001

Page 6: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Motivation

• Hole-filling with energy-minimizing patches

6

Liepa: Filling Holes in Meshses, SGP 2003

Page 7: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Motivation

7

Demo

Page 8: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Smoothing & Fairing

Page 9: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Smoothing

• How would you smooth a 1D/2D signal?

9

Page 10: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Diffusion Flow

10

!f

!t= "!f

diffusion constant

Laplace operator

Page 11: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 12: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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, . . .

Page 13: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

• 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)

Page 14: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

• 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)

Page 15: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 16: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 17: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

• 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)

Page 18: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Finite Difference Method

• Approximation of temporal derivative

18

ft[i, j, t] ⇡ f [i, j, t+ 1]� f [i, j, t]

�t

Page 19: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 20: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Diffusion in 2D

20

Demo

Page 21: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 22: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 23: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Comparison

23

Original Uniform Laplace Cotan Laplace

Page 24: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 25: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Smoothing & Fairing

Page 26: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 27: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 28: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Membrane Surfaces

• Membrane energy (surface area)

28

�⇥pu⇥

2 + ⇥pv⇥2 dudv � min

Page 29: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 30: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 31: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Membrane Surfaces

• Membrane energy (surface area)

• Variational calculus

31

�⇥pu⇥

2 + ⇥pv⇥2 dudv � min

�p = 0

Page 32: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Thin-Plate Surfaces

• Thin-plate energy (curvature)

• Variational calculus

32

�⇥puu⇥

2 + 2 ⇥puv⇥2 + ⇥pvv⇥

2 dudv � min

�2p = 0

Page 33: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

Laplace Discretization

33

Original Uniform Laplace Cotan Laplace

Page 34: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 35: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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

Page 36: Smoothing & Fairing · – Bobenko & Schröder: Discrete Willmore Flow, SGP 2005 • Anisotropic smoothing – Bajaj & Xu: Anisotropic Diffusion of Surfaces and Functions of Surfaces,

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