Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 14: Review / Subdivision Ravi...

33
Advanced Computer Graphics Advanced Computer Graphics (Spring 2005) (Spring 2005) COMS 4162, Lecture 14: Review / Subdivision Ravi Ramamoorthi http://www.cs.columbia.edu/~cs4162 courtesy of Szymon Rusinkiewicz with material from Denis Zorin, Pet

Transcript of Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 14: Review / Subdivision Ravi...

Advanced Computer Graphics Advanced Computer Graphics (Spring 2005) (Spring 2005)

COMS 4162, Lecture 14: Review / Subdivision Ravi Ramamoorthi

http://www.cs.columbia.edu/~cs4162

Slides courtesy of Szymon Rusinkiewicz with material from Denis Zorin, Peter Schroder

To DoTo Do

Questions of any kind?

Discuss this first (main point of lecture)

Comments? Interesting assignment since fairly new topics Suggestions for future iterations of course?

SubdivisionSubdivision

Very hot topic in computer graphics today

Brief survey lecture, quickly discuss ideas

Detailed study quite sophisticated

Advantages Simple (only need subdivision rule) Local (only look at nearby vertices) Arbitrary topology (since only local) No seams (unlike joining spline patches)

Video: Geri’s Game (Pixar website)Video: Geri’s Game (Pixar website)

Subdivision SurfacesSubdivision Surfaces

Coarse mesh & subdivision rule Smooth surface = limit of sequence of refinements

[Zorin & Schröder][Zorin & Schröder]

Key QuestionsKey Questions

How to refine mesh?

Where to place new vertices? Provable properties about limit surface

[Zorin & Schröder][Zorin & Schröder]

Loop Subdivision SchemeLoop Subdivision Scheme

How refine mesh? Refine each triangle into 4 triangles by

splitting each edge and connecting new vertices

[Zorin & Schröder][Zorin & Schröder]

Loop Subdivision SchemeLoop Subdivision Scheme

Where to place new vertices? Choose locations for new vertices as weighted average of

original vertices in local neighborhood

[Zorin & Schröder][Zorin & Schröder]

Loop Subdivision SchemeLoop Subdivision Scheme

Where to place new vertices? Rules for extraordinary vertices and boundaries:

[Zorin & Schröder][Zorin & Schröder]

Loop Subdivision SchemeLoop Subdivision Scheme

Choose by analyzing continuity of limit surface

Original Loop

Warren

))cos(( 2241

83

851

nn ))cos(( 22

41

83

851

nn

3

3

163

83

n

nn

3

3

163

83

n

nn

Butterfly SubdivisionButterfly Subdivision

Interpolating subdivision: larger neighborhood

11//2211//22

-1-1//1616

-1-1//1616

-1-1//1616

-1-1//1616

11//88

11//88

Modified Butterfly SubdivisionModified Butterfly Subdivision

Need special weights near extraordinary vertices For n = 3, weights are 5/12, -1/12, -1/12

For n = 4, weights are 3/8, 0, -1/8, 0 For n 5, weights are

Weight of extraordinary vertex = 1 - other weights

1..0,4

cos2

12cos

4

11

nj

n

j

n

j

n

1..0,

4cos

2

12cos

4

11

nj

n

j

n

j

n

A Variety of Subdivision SchemesA Variety of Subdivision Schemes

Triangles vs. Quads

Interpolating vs. approximating

[Zorin & Schröder][Zorin & Schröder]

More Exotic MethodsMore Exotic Methods

Kobbelt’s subdivision:

More Exotic MethodsMore Exotic Methods

Kobbelt’s subdivision:

Number of faces triples per iteration:gives finer control over polygon count

Subdivision SchemesSubdivision Schemes

[Zorin & Schröder][Zorin & Schröder]

Subdivision SchemesSubdivision Schemes

[Zorin & Schröder][Zorin & Schröder]

Analyzing Subdivision SchemesAnalyzing Subdivision Schemes

Limit surface has provable smoothness properties

[Zorin & Schröder][Zorin & Schröder]

Analyzing Subdivision SchemesAnalyzing Subdivision Schemes

Start with curves: 4-point interpolating scheme

-1-1//1616-1-1//1616

99//161699//1616

(old points left where they are)(old points left where they are)

4-Point Scheme4-Point Scheme

What is the support?

vv00vv-2-2 vv-1-1 vv11 vv22

Step Step ii::

vv00vv-2-2 vv-1-1 vv11 vv22

Step Step i+1i+1::

So, 5 new points depend on 5 old pointsSo, 5 new points depend on 5 old points

Subdivision MatrixSubdivision Matrix

How are vertices in neighborhood refined?(with vertex renumbering like in last slide)

)(2

)(1

)(0

)(1

)(2

161

169

169

161

161

169

169

161

)1(2

)1(1

)1(0

)1(1

)1(2

01000

0

00100

0

00010

i

i

i

i

i

i

i

i

i

i

v

v

v

v

v

v

v

v

v

v

)(2

)(1

)(0

)(1

)(2

161

169

169

161

161

169

169

161

)1(2

)1(1

)1(0

)1(1

)1(2

01000

0

00100

0

00010

i

i

i

i

i

i

i

i

i

i

v

v

v

v

v

v

v

v

v

v

Subdivision MatrixSubdivision Matrix

How are vertices in neighborhood refined?(with vertex renumbering like in last slide)

)()1( ii VSV

)()1( ii VSV

)0()( VSV

nn )0()( VSV

nn After After nn rounds: rounds:

Convergence CriterionConvergence Criterion

Expand in eigenvectors of S:

)0()( VSV

nn )0()( VSV

nn

4

0

)(

4

0

)0(

4

0

ii

nii

n

iii

iii

a

a

eV

eV

eS

4

0

)(

4

0

)0(

4

0

ii

nii

n

iii

iii

a

a

eV

eV

eS

Criterion Criterion II: : ||ii| | 11Criterion Criterion II: : ||ii| | 11

Convergence CriterionConvergence Criterion

What if all eigenvalues of S are < 1? All points converge to 0 with repeated subdivision

Criterion Criterion IIII: : 0 0 = = 11Criterion Criterion IIII: : 0 0 = = 11

Translation InvarianceTranslation Invariance

For any translation t, want:

11S

1VS1V

S

tt

tv

tv

tv

tv

tv

tv

tv

tv

tv

tv

ii

i

i

i

i

i

i

i

i

i

i

)()1(

)(2

)(1

)(0

)(1

)(2

)1(2

)1(1

)1(0

)1(1

)1(2

11S

1VS1V

S

tt

tv

tv

tv

tv

tv

tv

tv

tv

tv

tv

ii

i

i

i

i

i

i

i

i

i

i

)()1(

)(2

)(1

)(0

)(1

)(2

)1(2

)1(1

)1(0

)1(1

)1(2

Criterion Criterion IIIIII: : ee0 0 = = 1, all other 1, all other ||ii| < | < 11Criterion Criterion IIIIII: : ee0 0 = = 1, all other 1, all other ||ii| < | < 11

Smoothness CriterionSmoothness Criterion

Plug back in:

Dominated by largest i

Case 1: |1| > |2|

Group of 5 points gets shorter All points approach multiples of e1 on a straight line Smooth!

4

100

)(

ii

nii

n aa eeV

4

100

)(

ii

nii

n aa eeV

( )0 0 1 1 1 ( )n na a small V e e

( )

0 0 1 1 1 ( )n na a small V e e

Smoothness CriterionSmoothness Criterion

Case 2: |1| = |2| Points can be anywhere in space spanned by e1, e2

No longer have smoothness guarantee

Criterion Criterion IVIV: Smooth iff : Smooth iff 0 0 = = 11 > | > |11| > || > |ii||Criterion Criterion IVIV: Smooth iff : Smooth iff 0 0 = = 11 > | > |11| > || > |ii||

Continuity and SmoothnessContinuity and Smoothness

So, what about 4-point scheme? Eigenvalues = 1, 1/2 , 1/4 , 1/4 , 1/8

e0 = 1 Stable Translation invariant Smooth

2-Point Scheme2-Point Scheme

In contrast, consider 2-point interpolating scheme

Support = 3 Subdivision matrix =

11//2211//22

21

21

21

21

0

010

0

21

21

21

21

0

010

0

Continuity of 2-Point SchemeContinuity of 2-Point Scheme

Eigenvalues = 1, 1/2 , 1/2

e0 = 1

Stable

Translation invariant

Smooth X Not smooth; in fact, this is piecewise linear

For Surfaces…For Surfaces…

Similar analysis: determine support, construct subdivision matrix, find eigenstuff Caveat 1: separate analysis for each vertex valence Caveat 2: consider more than 1 subdominant eigenvalue

Points lie in subspace spanned by e1 and e2

If |1||2|, neighborhood stretched when subdivided,but remains 2-manifold

Reif’s smoothness condition: Reif’s smoothness condition: 0 0 = = 11 > | > |11| | | |22| > || > |ii||Reif’s smoothness condition: Reif’s smoothness condition: 0 0 = = 11 > | > |11| | | |22| > || > |ii||

Fun with Subdivision MethodsFun with Subdivision Methods

Behavior of surfaces depends on eigenvalues

(recall that symmetric matrices have real eigenvalues)

[Zorin][Zorin]

ComplexComplex DegenerateDegenerateRealReal

SummarySummary

Advantages: Simple method for describing

complex, smooth surfaces Relatively easy to implement Arbitrary topology Local support Guaranteed continuity Multiresolution

Difficulties: Intuitive specification Parameterization Intersections

[Pixar][Pixar]