Advanced Computer Graphics (Spring 03) CS 83, Lecture 7: Subdivision Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs83/sp3 Slides courtesy of Szymon Rusinkiewicz, James O Brien with material from Denis Zorin, Peter Schroder Subdivision Very hot topic in computer graphics today Brief survey lecture, quickly discuss ideas Detailed study quite sophisticated See some of materials from class webpage 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 (outside link) Outline Basic Subdivision Schemes Analysis of Continuity Exact and Efficient Evaluation (Stam 8) Subdivision Surfaces Coarse mesh & subdivision rule Smooth surface = limit of sequence of refinements How to refine mesh? Key Questions Where to place new vertices? Provable properties about limit surface
Loop Subdivision Scheme How refine mesh? Refine each triangle into triangles by splitting each edge and connecting new vertices Loop Subdivision Scheme Where to place new vertices? Choose locations for new vertices as weighted average of original vertices in local neighborhood Loop Subdivision Scheme Where to place new vertices? Rules for extraordinary vertices and boundaries: Loop Subdivision Scheme Choose β by analyzing continuity of limit surface Original Loop β = ( 5 ( 3 + cos π n 8 8 n ) ) Warren 3 n > 3 8n β = 3 n = 3 6 Butterfly Subdivision Interpolating subdivision: larger neighborhood / 8 - - / / 6 6 Modified Butterfly Subdivision Need special weights near extraordinary vertices For n = 3, weights are 5 /, - /, - / For n =, weights are 3/8, 0, -/8, 0 For n 5, weights are π j + cos n n + cos π j n, j = 0..n / / Weight of extraordinary vertex = - Σ other weights - / 6 / 8 - / 6
A Variety of Subdivision Schemes Triangles vs. Quads Interpolating vs. approximating More Exotic Methods Kobbelt s subdivision: More Exotic Methods Subdivision Schemes Kobbelt s subdivision: Number of faces triples per iteration: gives finer control over polygon count Subdivision Schemes Outline Basic Subdivision Schemes Analysis of Continuity Exact and Efficient Evaluation (Stam 8) 3
Analyzing Subdivision Schemes Limit surface has provable smoothness properties Analyzing Subdivision Schemes Start with curves: -point interpolating scheme / 6 / 6 - / 6 - / 6 (old points left where they are) What is the support? -Point Scheme Subdivision Matrix How are vertices in neighborhood refined? (with vertex renumbering like in last slide) Step i: Step i+: v - v - v 0 v v v - v - v 0 v v So, 5 new points depend on 5 old points (i+) v (i+) v v 0 (i+) v (i+) v (i+) = 0 0 0 0 6 6 6 6 0 0 0 0 0 0 6 6 6 6 0 0 0 0 v v v 0 v v Subdivision Matrix How are vertices in neighborhood refined? (with vertex renumbering like in last slide) Convergence Criterion V (n) = S n V (0) Expand in eigenvectors of S: After n rounds: V (i+) = S V V (n) = S n V (0) S = i=0 V (0) = V (n) = λ i e i i=0 i=0 a i e i a i λ i n e i Criterion I: λ i
Convergence Criterion What if all eigenvalues of S are <? All points converge to 0 with repeated subdivision Criterion II: λ 0 = Translation Invariance For any translation t, want: v (i+) + t v + t v (i+) + t v + t v (i+) 0 + t = S v 0 + t v (i+) + t v + t v (i+) + t v + t V (i+) + t = S V + t S = ( ) Criterion III: e 0 =, all other λ i < Plug back in: Smoothness Criterion V (n) = a 0 e 0 + Dominated by largest λ i a i λ i n e i Case : λ > λ V (n) = a 0 e 0 + a λ n e + (small) Group of 5 points gets shorter All points approach multiples of e è on a straight line Smooth! i= Smoothness Criterion Case : λ = λ Points can be anywhere in space spanned by e, e No longer have smoothness guarantee Criterion IV: Smooth iff λ 0 = > λ > λ i Continuity and Smoothness So, what about -point scheme? Eigenvalues =, /, /, /, / 8 e 0 = Stable ü Translation invariant ü Smooth ü -Point Scheme In contrast, consider -point interpolating scheme / / Support = 3 Subdivision matrix = 0 0 0 0 5
Continuity of -Point Scheme For Surfaces Eigenvalues =, /, / e 0 = Stable ü Translation invariant ü Smooth X Not smooth; in fact, this is piecewise linear Similar analysis: determine support, construct subdivision matrix, find eigenstuff Caveat : separate analysis for each vertex valence Caveat : consider more than subdominant eigenvalue Reif s smoothness condition: λ 0 = > λ λ > λ i Points lie in subspace spanned by e and e If λ λ, neighborhood stretched when subdivided, but remains -manifold Fun with Subdivision Methods Behavior of surfaces depends on eigenvalues Outline Basic Subdivision Schemes Analysis of Continuity Exact and Efficient Evaluation (Stam 8) Real Complex Degenerate (recall that symmetric matrices have real eigenvalues) [Zorin] Slides courtesy James O Brien from CS, Fall 00 Practical Evaluation Problems with Uniform Subdivision Exponential growth of control mesh Need several subdivisions before error is small Ok if you are drawing and forgetting, otherwise (Exact) Evaluation at arbitrary points Tangent and other derivative evaluation needed Isolated Extraordinary Points After + subdivisions, isolated extraordinary points where irregular valence Regular region is usually easy For example, Catmull Clark can treat as B-Splines Paper by Jos Stam SIGGRAPH 8 efficient method Exact evaluation (essentially take out subdivision ) Smoothness analysis methods used to evaluate 6
Isolated Extraordinary Points Subdivision Matrix Subdivision Matrix Eigen Space Comments Curvature Plots Computing Eigen-Vectors is tricky See Jos paper for details He includes solutions for valence up to 500 All eigenvalues are (abs) less than one Except for lead value which is exactly one Well defined limit behavior Exact evaluation allows pushing to limit surface See Stam 8 for details 7
Summary 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] 8