 Download Download Presentation Introduction to Subdivision surfaces

# Introduction to Subdivision surfaces

Download Presentation ## Introduction to Subdivision surfaces

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Introduction toSubdivision surfaces Martin Reimers CMA, University of Oslo

2. Overview • Basic ideas, curves • Subdivision Surfaces • Analysis

3. Subdivision concept Polygon V=V0 Subdivision rule Vj! Vj+1 • Refine Vj • Reposition vertices Get V1,V2,

4. Spline curve subdivision Get Pj+1 from Pj by ”corner cutting”: (Chaikins algorithm ’74) v2k=(3vk-1+ vk)/4 v2k+1 =( vk-1+3vk)/4 Subdivision matrix M: V1 is a quadratic spline (smooth curve)

5. Spline curve subdivision Average twice v2k=(vk-1+ 6vk+vk+1)/ 8 v2k+1=(vk+vk+1)/2 Subdivision matrix M s.t. V1 is a cubic spline Lane&Riesefeldt: Average d-1 times to get degree d Many other schemes, e.g. interpolating 4-pt scheme

6. Subdivision Surfaces Same concept: Refine piecewise linear geometry V0 V1 V2 V1 Properties of limit surface V1? Continuous, smooth, fair…?

7. Applications: modeling

8. Applications: animation

9. Applications: games Half-life 2 (Released Nov 2004)

10. Mask Spline surface subdivision V0 – regular control mesh (grid) in 3D Generalize univariate subdivision rule: • Refine • Reposition Still linear rules, subdivision matrix Vj+1=MVj Vj converge to bi-quadratic spline Generalize: d-1 averages gives bi-degree d

11. 3 3/16 9/16 4 2 1 3/16 1/16 0 Doo-Sabin scheme (‘78) Generalization: arbitrary mesh • n-sided faces • Any valence (Not only 4) Masks: Still have Vj+1=MVj(linearity)

12. Doo Sabin Subdivision • Generalize bi-quadratic spline to arbitrary mesh • Smooth C1 limit surface [DS,Peters&Reif98]

13. Catmull-Clark Subdivision (‘78) Generalize bi-cubic splines limit is C2 exept in irregular points, [Peters&Reif98] Vertex mask Face mask Edge mask Constants: =3/2n2=1/4n2 (others possible) As before: Vj+1=M Vj

14. Catmull-Clark scheme Implementation version FACE EDGE VERTEX

15. Catmull-Clark, special rules Crease/bdy masks Piecewise smooth surface

16. Loop’s scheme (‘87) Edge Vertex

17. Loop’s scheme (‘87) Implementation version Edge Vertex

18. Loop, special rules Bdy/crease: cubic spline rules Vertex Rule Edge Rule Other rules / effects possible (e.g. piecewise smooth)

19. Loop’s scheme • Generalize 3-direction (quartic) box-splines • C2 almost everywhere, C1 in irregular points • Can be seen as a refine and average scheme

20. Famous schemes

21. Subdivision schemes Many schemes, ways to refine mesh etc. • Mesh types: tris, quads, hex…, combinations • Interpolating/Approximating • (Non)Uniform • (Non)Stationary • (Non)Linear ”Subdivision zoo” • Midpoint scheme [Peters&Reif] • √3 scheme [Kobbelt] • ”Refine&average” [Stam/Warren et al] • 4-8 subdivision [Velho&Zorin] • Tri/Quad schemes • Interpolating curves • …many more

22. Pros and cons Splines in Toy Story 1 Pros: • Many of the pros of splines • Flexible wrt. topology/mesh • No gaps or seams! • Features are ”easy” • Simple to implement • Efficient to visualize • Simple/intuitive to manipulate Cons: • No global closed form (but locally) • Evaluation not straight forward (but…) • Ck , k>1 is hard • Artefacts (ripples etc.) • CC cannot make convex surface if n>5 [Peters&Reif04] Geri’s Game (Pixar studios)

23. N a2 a1 Limit surface analysis Consider Loop scheme • Linear • Affine invariant • Convex hull property • Stationary • Symmetric • Smooth in regular regions Study properties of V1 = limj !1Vj • Limit points and normals • G1 (tangent plane) continuity • C1 continuity • Ck continuity, k=2,… a0

24. Parametric representation Limit surface is parametric over Vj s : Vj!R3 p 2 Vj is mapped to s(v) 2 V1 V1 is a spline in regular regions i.e. has a polynomial representation Regular regions join smoothly What about irregular points/regions? Polynomial patch on regular region

25. Irregular points Surrounded by regular rings (eventually): Subdivision • Preserves valence • Adds regular vertices So • regular region grows • irregular region shrinks • Refinement adds a (regular) spline ring around IP • All points but IP is in regular region eventually • Rings join smoothly

26. Spline rings Study irregular vertex v and neighbourhood Pj What does P1 look like around v? Regular spline ring depends only on Pj xj:n!R3, n = {1,,n}£L, j=0,1,… xj = Bi pij=B Pj Smooth ”basis” functions B1,,BN Bi : n!R 0 · Bi· 1,  Bi =1, Limit points are convex comb. of Pj L v

27. The local subdivision matrix Square matrix S such that for all j Pj+1=S Pj=Sj P0 S determines limit surface locally S is non-defective, S=QQ-1 Q = (q0,q1,qL) eigenvectors  = diag(0,1,) |0|¸|1|¸… Eigen-expansion Pj= QjQ-1 P0 =ijqiai , ai2R3 Spectral properties of S are fundamental!!! v

28. Eigenfunctions Recall xj =  Bi pij=B Pj =B Sj P0 =B Q j Q-1 P0 Define eigenfunctions BQ = (0,,N) i : n!R i:= Bqi Eigen-expansion: xj = ijiai

29. Limit surface Limit surface P1 =  xj (n) xj = i=1N ijiai , j=0,1,2, Can show (Loop’s and others) • 0 =1 >  = 1=2> 3 • q1,q2 linearly independent • q0=(1,1,,1) • 0´1 since  Bi =1 Thus xj =a0+j (1 a1 + 2 a2 )+ o(j) !a0 a0 = l0 P0 where l0 is left eigenvector of a n+1 system In fact: • Pj converge to s(v)=a0 • The limit surface is continuous in v

30. N a2 a1 Tangent plane Each spline ring xj is C1 and hence G1 xj = a0 + j (1 a1+2a2 )+ o(lj) Differentiate Du xj = j (Du1 a1+Du2a2+ o(1) ) Dv xj = j (Dv1 a1+Dv2a2+ o(1) ) Normal(xj)= Du xj£ Dv xj /||Du xj£ Dv xj|| !a1£a2 /||a1£a2|| Limit normal is well defined and continuous if and a1£a2  0 Then Limit surface is G1 for generic initial data Tangent vectors a1, a2 found using left eigenvectors of small system a0

31. a2 a1 a0 C1 regularity V1 is C1 if it is C1 fcn. over the Tangent Plane (TP) xj= a0 + j (1a1+ 2a2)+o(j) , ai2R3 ”rings xj converge uniformly to tangent plane” TP component scaled by  j+1 (1a1+ 2a2 )=  (j (1a1+ 2a2 )) So TP parameterized by similar rings a0 + j (1a1+ 2a2), j=0,1, Param. is injective if 1a1+ 2a2 is Then the limit surface is C1 around a0

32. (n) Characteristic map  Defined as :=(1,2): n!R2 =B (q1,q2) Theorem[Reif95]: P1is C1 for generic initial data if • 1>:=1=2>|3| with q1,q2 lin. independent •  is regular and injective Conditions means  has a cont. Inverse, P1 is a graph over TP near IP, thus C1 regular  can be used to parameterize P1 Many schemes are C1 (DS, CC, Loop, Midpoint…) [Peters&Reif,Umlauf,…] Not injective n  Injective (n)

33. Spectral analysis S often block circulant)find Q and  with Fourier techniques Dominant eigenpair: 0, q0 Controls continuity, convergence 0=1>|1| and q0=(1,,1) (Affine invariance) Subdominant eigenpairs: :=1¸2¸ Controls tangent plane continuity Want 1>  := 1=2>|3| and q1,q2 lin. indep. Sub-subdominant eigenpairs: :=3¸4 ¸ Controls curvature Want 2 ¸ ||

34. Continuous Curvature – C2 MUCH harder to get Holy grail: C2 , local, stationary,  0, low degree • Large support / High degree ? [Prautzsch/Reif]: pol. scheme must have d¸ 2k+2 for Ck Thus degree ¸ 6 for C2 • Non-stationary? • = 0 in irregular points [Prautzsch&Umlauf] Neccessary condition for bounded curvature : ||2 ¸ |3| Has been used to construct/improve schemes [Prautzsch&Umlauf]

35. Scheme manipulation Recall S=Q  Q-1 Manipulate : Set e.g. |3|· ||2 New eigenvalues in 2 New scheme S2=Q2Q-1 with better properties e.g. bounded curvature, C2 Note: May destroy other properties, e.g. symmetry

36. Conclusion • Subdivision very useful in computer graphics • Better methods needed for high end CAD • Analysis of linear schemes based on linear algebra • Limit points and tangent vectors easy to find • Nonlinear/Nonstationary: Not much is known??, harder!