36
Subdivision Subdivision surfaces surfaces Construction and analysis Construction and analysis Martin Reimers Martin Reimers CMA/IFI, University of Oslo CMA/IFI, University of Oslo September 24th 2004 September 24th 2004

Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Embed Size (px)

Citation preview

Page 1: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Subdivision surfacesSubdivision surfacesConstruction and analysisConstruction and analysis

Martin ReimersMartin Reimers

CMA/IFI, University of OsloCMA/IFI, University of Oslo

September 24th 2004September 24th 2004

Page 2: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Subdivision: conceptSubdivision: conceptPiecewise linear geometry with vertices PPiecewise linear geometry with vertices P00

Refine and reposition using subdivision ruleRefine and reposition using subdivision rule

PP00, P, P11, P, P22

Page 3: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Subdivision SurfacesSubdivision SurfacesThe same concept for surfaces:The same concept for surfaces:

Piecewise linear geometry refined: PPiecewise linear geometry refined: P00, P, P11, P, P22

PP0 0 P P11 P P2 2 P P11

Properties of PProperties of P11?? Continuous, smooth, fair…?Continuous, smooth, fair…?

Page 4: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

OverviewOverview

IntroductionIntroduction

Subdivision schemesSubdivision schemes

ConstructionConstruction

AnalysisAnalysis

Page 5: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spline curve subdivisionSpline curve subdivisionControl polygon P=PControl polygon P=P00

Cut corners recursively, get PCut corners recursively, get P11, P, P22

Subdivision rule: Subdivision rule: pp2k 2k =(3p=(3pk-1k-1+ p+ pkk)/4)/4 pp2k+12k+1=( p=( pk-1k-1+3p+3pkk)/4)/4

Subdivision matrix S:Subdivision matrix S:

Limit PLimit P11 is a quadratic spline (smooth curve) is a quadratic spline (smooth curve)

jk

jk

jk

jj

p

p

p

SPP

1

11

13

31

13

4

1

0kp

01kp

0

1kp

12kp

112 kp

Page 6: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spline curve subdivisionSpline curve subdivisionGeneralization: refine and average d-1 times Generalization: refine and average d-1 times PPjj converge to spline of degree d converge to spline of degree d

Linear operations in a subdivision matrix S s.t. Linear operations in a subdivision matrix S s.t.

PPj+1j+1=S=SPPjj

Cubic splines:Cubic splines:

Many curve subdivision methodsMany curve subdivision methodsNext: surfacesNext: surfaces

2/)(

8/)6(

2/)(

....

0440

0161

0044

......

8

1

1

11

1

1

11

kk

kkk

kk

k

k

kj

pp

ppp

pp

p

p

p

P

Page 7: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spline surface subdivisionSpline surface subdivisionPP00 – regular control mesh (grid) in 3D – regular control mesh (grid) in 3D – – e.g. points and quadrilateralse.g. points and quadrilaterals

Refine PRefine P00 by a certain subdivision rule by a certain subdivision ruleyields new mesh Pyields new mesh P11

Linear operations, collect in a matrix S Linear operations, collect in a matrix S

PPj+1j+1=S=SPPjj

Control mesh converge to spline bi-degree 2Control mesh converge to spline bi-degree 2

Generalize: d-1 averages gives bi-degree d Generalize: d-1 averages gives bi-degree d

16/316/9

16/1

Mask

16/3

Page 8: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Doo Sabin Subdivision Doo Sabin Subdivision (‘78) (‘78)

Generalization: General mesh Generalization: General mesh

N-sided facesN-sided faces

Any valence (Not only 4)Any valence (Not only 4)

Masks:Masks:

2

1

3

5

4

3

3

9

1

Still have Still have PPj+1j+1=S=SPPjj (linearity)(linearity)

Generalize bi-quadratic spline to arbitrary meshGeneralize bi-quadratic spline to arbitrary meshCC11 continuous (smooth) limit surface [Peters&Reif98] continuous (smooth) limit surface [Peters&Reif98]

Page 9: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Doo Sabin SubdivisionDoo Sabin Subdivision

ExampleExample

Page 10: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Catmull-Clark Subdivision Catmull-Clark Subdivision (‘78) (‘78)

Generalize bi-cubic spline to quad meshGeneralize bi-cubic spline to quad mesh

16

1

16

1

16

1

16

1

16

616

64

1

4

14

1

4

1

Edge maskFace mask

1

n

n

n

n

n

n

n

n

n

Vertex mask

n

As before: PPj+1j+1=S=SPPjj

Constants:3/2n =1/4n (others possible)

Page 11: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Catmull-Clark schemeCatmull-Clark schemeImplementation version

n

ivnf

1

1FACE

VERTEX

j

jj

jii fn

en

vn

nv

221

112

42121 ffvv

e

EDGE

Page 12: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Catmull-Clark schemeCatmull-Clark scheme

PPjj converge to a C converge to a C11 surface, C surface, C22 a.e [Peters&Reif98] a.e [Peters&Reif98]

Page 13: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Catmull-Clark, special rulesCatmull-Clark, special rules

Crease/bdy masks

Piecewise smooth surface

8

6

8

1

8

1

Page 14: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Loop’s scheme (‘87)Loop’s scheme (‘87)

EdgeEdge

VertexVertex

nn

n1

nn

nn

nn

nn

nn

22

cos4

1

8

3

8

5

nn

8

3

8

1

8

3

8

1

Page 15: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Loop’s scheme (‘87)Loop’s scheme (‘87)

EdgeEdge

VertexVertex

nn

n1

nn

nn

nn

nn

nn

22

cos234064

1

nn

8

3

8

1

8

3

8

1

Implementation version

Page 16: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Loop boundary maskLoop boundary mask

Use cubic B-spline refinement rulesUse cubic B-spline refinement rules

2

1

2

1

8

1

8

1

8

6

Edge Rule Vertex Rule

Page 17: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Loop’s schemeLoop’s scheme

Generalize 3-direction (quartic) box-splinesGeneralize 3-direction (quartic) box-splines

CC11 everywhere, not C everywhere, not C22 in irregular points in irregular points

Special masks for features (Hoppe et al)Special masks for features (Hoppe et al)

Alternative viewAlternative view

1.1. Refine linearlyRefine linearly

2.2. Smooth Smooth allall vertices by vertices by

( Laplacian smoothing )( Laplacian smoothing )

jin

jin

ji ppp )1(1

jip

jip

1jip

Page 18: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Loop exampleLoop example

Page 19: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spline based schemesSpline based schemes

All schemes up to nowAll schemes up to now

Affine invarianceAffine invariance

Convex hull propertyConvex hull property

Polynomials locally Polynomials locally

Splines in regular regionsSplines in regular regions

Approximates the control mesh (like splines)Approximates the control mesh (like splines)

Page 20: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Butterfly scheme Butterfly scheme (‘90) (‘90)

[Dyn,Levin,Gregory][Dyn,Levin,Gregory]

InterpolatingInterpolating

TrianglesTriangles

Not polynomialsNot polynomials

No convex hull propertyNo convex hull property

Not CNot C11 for n=3 or n>7 for n=3 or n>7

Modified scheme [zorin] is CModified scheme [zorin] is C11 but not C but not C22

16

1

16

1

16

1

16

1

2

1

2

1

8

1

8

1

Edge mask

Page 21: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

ExamplesExamples

Famous schemesFamous schemes

Page 22: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Subdivision rules/schemesSubdivision rules/schemesMany categories, ways to refine mesh etc.Many categories, ways to refine mesh etc.

Mesh types: tris, quads, hex…, combinationsMesh types: tris, quads, hex…, combinationsInterpolating/ApproximatingInterpolating/Approximating(Non)Uniform(Non)Uniform(Non)Stationary(Non)Stationary(Non)Linear(Non)Linear

””Subdivision zoo”Subdivision zoo”Midpoint scheme [Peters&Reif]Midpoint scheme [Peters&Reif]√√3 scheme [Kobbelt]3 scheme [Kobbelt]””Refine&average” [Stam/Warren et al]Refine&average” [Stam/Warren et al]4-8 subdivision [Velho&Zorin]4-8 subdivision [Velho&Zorin]Tri/Quad schemesTri/Quad schemes……many moremany more

Rules constructed to obtain objective:Rules constructed to obtain objective:Mimic splines, interpolation, smoothness/fairness, features,…Mimic splines, interpolation, smoothness/fairness, features,…

Page 23: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Surface subdivisionSurface subdivisionIs this a toy?Is this a toy?

Pros:Pros:Many of the pros of splinesMany of the pros of splinesFlexibility, wrt. topology/meshFlexibility, wrt. topology/meshSpline surfaces without gaps and seams!Spline surfaces without gaps and seams!Simple to implementSimple to implementSimple/intuitive to manipulateSimple/intuitive to manipulate

Cons:Cons:No global closed form (but locally)No global closed form (but locally)Evaluation not straight forward (but…)Evaluation not straight forward (but…)CCkk , k>1 is hard , k>1 is hardArtefacts (ripples etc.)Artefacts (ripples etc.)CC cannot make convex surface if n>5 CC cannot make convex surface if n>5 [Peters&Reif04][Peters&Reif04]

Geri’s Game (Pixar studios)

Splines Toy Story 1

Page 24: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

NEXT: ANALYSISNEXT: ANALYSISConsider primal spline schemes (e.g. Loop, C-C)Consider primal spline schemes (e.g. Loop, C-C)

LinearLinearAffine invariantAffine invariantConvex hull propertyConvex hull propertyStationaryStationarySymmetricSymmetricSmooth in regular regionsSmooth in regular regionsHave vertex correspondencyHave vertex correspondency

Start with control mesh PStart with control mesh P00 with vertices in with vertices in RR33

Subdivision yields finer meshes PSubdivision yields finer meshes P11,P,P22,,

What properties does limit surface PWhat properties does limit surface P11 have? have?

Study Study Limit points and normals / tangent planesLimit points and normals / tangent planesCC11 smoothness smoothness( Curvature, C( Curvature, C2 2 ))

Page 25: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Regular regionsRegular regionsIf mesh is regular, limit surface PIf mesh is regular, limit surface P11 is known (spline) is known (spline)

Analyze Analyze irregularirregular regions regions

Subdivision Subdivision Preserves valence Preserves valence Insert new regular verticesInsert new regular vertices

)) regular regions grow and regular regions grow and irregular regions shrinkirregular regions shrink

Limit surface def on the green Limit surface def on the green rings are Crings are C22 quartic splines over quartic splines overtriangles of Ptriangles of Pjj

Each subdivision adds a spline ring to the neighbourhood of Each subdivision adds a spline ring to the neighbourhood of an irregular pointan irregular point

Loop schemeLoop scheme

Page 26: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

The local subdivision matrixThe local subdivision matrixStudy irregular vertex p and neighbourood PStudy irregular vertex p and neighbourood P00

Stationary scheme: subdivision matrix S s.t. Stationary scheme: subdivision matrix S s.t. PPj+1j+1=S P=S Pjj

map neighbourhood to neighbourhhoodmap neighbourhood to neighbourhhood

S determines limit surface around p S determines limit surface around p

Assume S is non-defective S=QAssume S is non-defective S=QQQ-1-1

PPjj= S= S PPj-1j-1 =S =Sj j PP00 = Q = QjjQQ-1 -1 PP00

Spectral properties of S are fundamental!!!Spectral properties of S are fundamental!!!

p

Page 27: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spectral analysisSpectral analysisS = QS = QQQ-1-1

Q = (Q = (qq00,,qq11,,qqLL) eigenvectors ) eigenvectors = diag(= diag(00,,11,,,,LL) eigenvalues, |) eigenvalues, |00||¸̧||11||¸̧¸̧||LL||

S often block symmetric with circulant blocksS often block symmetric with circulant blocks )) Can find Q and Can find Q and with Fourier techniques with Fourier techniques

Dominant eigenpair: Dominant eigenpair: 00=1>|=1>|11| and | and qq00=(1,=(1,,1) (Affine invariance),1) (Affine invariance)Controls convergenceControls convergence

Subdominant eigenpairs: Subdominant eigenpairs: :=:=11¸̧22¸̧Controls tangent plane continuity Controls tangent plane continuity Want 1> Want 1> 11==22>|>|33||

Sub-subdominant eigenpairs: Sub-subdominant eigenpairs: :=:=33¸̧4 4 ¸̧Controls curvatureControls curvatureWant Want 2 2 ¸̧ | |||

Page 28: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Limit points Limit points

Have SHave Sjj = Q = QjjQQ-1-1

Eigen expansion: PEigen expansion: P00== qqii aai i aaii22 RR33

PPjj = = iijj qqii aaii

Since Since 00=1>|=1>|ii| and | and qq00 = (1, = (1,,1),1)

PPjj!! ( (aa0,0,aa00,,))TT as j as j !! 11

Limit point: Limit point: pp11= = aa00==ll00PP00

Left eigenvector Left eigenvector ll00 can be determined from a n+1 matrix can be determined from a n+1 matrix

Also: Control mesh converge to continuous surfaceAlso: Control mesh converge to continuous surface

Page 29: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Spline ringsSpline ringsLimit surface PLimit surface P11 is union of limit point and spline rings is union of limit point and spline rings xxjj: : xxjj::nn !! P P11 ½½ RRPP11 == xxjj((nn) ) [[ pp11

Where Where nn = {1, = {1,,n},n}££L (quad based scheme)L (quad based scheme)

Limit surface can be parameterized over squaresLimit surface can be parameterized over squares

Basis functions BBasis functions B11,,,B,BNN::nn!! RR s.t. s.t. B Bii =1 and =1 and

xxjj = = B Bii p piijj==BB P Pjj

Define eigenfunctions Define eigenfunctions ii::nn!! R R

ii:=B:=B

ii qq

ii

xxjj = = P Pj = j = iijj ii aaii

Note that Note that 00´́1 since 1 since qq00=(1,1,=(1,1,))

L

xj(n)

Xj+1(n)

Page 30: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Tangent plane Tangent plane Each spline Each spline xxjj ring is C ring is C11

Assume: 1>Assume: 1>11==22>>33 and and qq11,,qq22 lin.indep. lin.indep.Also that Also that aa11,,aa22 lin.indep lin.indep

xxjj = a = a00 + + j j 1 1 aa11++ j j 22 aa22+ + jj

DDuu x xjj = = j j (D(Duu 1 1 aa11++ DDuu 22 aa22+ +

DDvv x xjj = = j j (D(Dvv 1 1 aa11++ DDvv 22 aa22+ +

Normal is well defined and continuous if Normal is well defined and continuous if

Normal(Normal(xxjj)) = D= Duu x xjj ££ D Dvv x xjj /||D /||Duu x xjj ££ D Dvv x xjj|| || !! aa11££aa2 2 /||/||aa11££aa22||||

Tangent vectors Tangent vectors aa1,1, aa22 found using left eigenvectors of S found using left eigenvectors of S

a1

a2

N

021

21

vv

uu

DD

DD

Page 31: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Smoothness – CSmoothness – C11

)) tangent plane cont. if det D ( tangent plane cont. if det D (,,)) 0 0

Analysis only relevant if generic data: det (Analysis only relevant if generic data: det (aa1 ,1 ,aa22) ) 0 0

Want CWant C11, more than tangent plane cont. , more than tangent plane cont.

PP11 is C is C11 if it is C if it is C11 fcn. over the Tangent Plane fcn. over the Tangent Plane

xxjj= = aa00 + + jj ( (11 aa11+ + 22 aa22)+o()+o(jj))

””ring ring xxjj converge uniformly to tangent plane” converge uniformly to tangent plane”

Big question[Reif]: is limit Big question[Reif]: is limit xxjj injective? injective?

Yes if Yes if 11 ee11+ + 22 ee2 2 =(=(1 1 ,, 2)2) is injectiveis injective

a1

a2

a1

a0

Page 32: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Characteristic mapCharacteristic map

[Reif95] Defined as [Reif95] Defined as ::=(=(11,,22): ): nn!! RR22

(i,u,v)=(i,u,v)=BB(i,u,v)((i,u,v)(qq11,q,q22))

TheoremTheorem [Reif95]: [Reif95]:PP11 is a Cis a C11 surface for surface for genericgeneric initial data if initial data if

:=:=11==22>|>|33| with | with qq11,,qq22 lin. independent lin. independent

is regular and injectiveis regular and injective

Conditions means Conditions means has a cont. Inverse has a cont. Inverse(can be used to parameterize P(can be used to parameterize P11))

Major point: Major point: PP11 is a graph over TP near p is a graph over TP near p11, thus C, thus C11 regular regular

Not injectiveNot injective

Image:Image:nn))

Page 33: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Verifying CVerifying C1 1 regularityregularity

[Peters&Reif98] Showed C[Peters&Reif98] Showed C11 of DS & CC of DS & CC[Umlauf] Showed C[Umlauf] Showed C11 for Loop for Loop

Check conditions: 1=Check conditions: 1=00>>11==2 2 >|>|33| |

Check regularity and injectivity of Check regularity and injectivity of Rotationally symmetric Rotationally symmetric )) study segments study segmentsRegular: Use Bezier form to show that Regular: Use Bezier form to show that uu ££ v v 0 0Injectivity: show that boundary is simpleInjectivity: show that boundary is simple

Generalizations/simplificationsGeneralizations/simplificationsZorin, Umlauf,…Zorin, Umlauf,…

Page 34: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Continuous Curvature – CContinuous Curvature – C22

MUCHMUCH harder to get harder to get

Holy grail: Holy grail: CC22, local, stationary, , local, stationary, 0 ,low polynomial degree 0 ,low polynomial degreeLarge support?Large support?

Not stationary? Not stationary?

0 in irregular points[Umlauf&Prautzsch]0 in irregular points[Umlauf&Prautzsch]

High degree?High degree?[Prautzsch/Reif]: polynomial scheme must have d[Prautzsch/Reif]: polynomial scheme must have d¸̧ 2k+2 for C 2k+2 for Ckk Thus CThus C22 requires degree 6 in regular regions requires degree 6 in regular regions

Neccessary condition for bounded curvature : |Neccessary condition for bounded curvature : |||2 2 ¸̧ | |33||

Has been used to find good schemes (CC/DS)Has been used to find good schemes (CC/DS)

Page 35: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

Scheme manipulationScheme manipulation

Take a scheme S Take a scheme S

Spectral analysis: find S=Q Spectral analysis: find S=Q Q Q-1-1

Manipulate Manipulate Set e.g. |Set e.g. |33||·· | |||22

New eigenvalues New eigenvalues 22

New scheme SNew scheme S22=Q =Q 22 Q Q-1-1 with better properties with better properties

e.g. bounded curvaturee.g. bounded curvature

Page 36: Subdivision surfaces Construction and analysis Martin Reimers CMA/IFI, University of Oslo September 24th 2004

ConclusionConclusion

Subdivision is very usefull in some applicationsSubdivision is very usefull in some applications

Better methods needed for high end CADBetter methods needed for high end CAD

Construction: generalize splines, tune spectrum Construction: generalize splines, tune spectrum

Analysis of linear schemes based on linear algebraAnalysis of linear schemes based on linear algebra

Nonlinear/Nonstationary: Not much is known??, harder!Nonlinear/Nonstationary: Not much is known??, harder!