introduction to computer graphics modeling 2
play

Introduction to Computer Graphics Modeling (2) April 23, 2020 - PowerPoint PPT Presentation

Introduction to Computer Graphics Modeling (2) April 23, 2020 Kenshi Takayama Subdivision surfaces First, well look at its theoretical basis: B-Spline curves Basis 2 Example: 2D polyline represented as function X-coord Y Look


  1. Introduction to Computer Graphics – Modeling (2) – April 23, 2020 Kenshi Takayama

  2. Subdivision surfaces First, we’ll look at its theoretical basis: B-Spline curves Basis 2

  3. Example: 2D polyline represented as function X-coord Y Look at X-coord function (-2.2, 3.2) t=6 (-1.2, 2.0) 2 (-0.7, 1.1) 1 0 1 2 3 4 5 6 X Parameter t (-0.3, -0.3) -1 (-1.4, -1.3) (1.4, -1.6) -2 t=0 (-0.4, -3.0) 3

  4. Representing polyline using linear basis X-coord 1.4 × -0.4 × -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 4

  5. de Boor’s n-th order basis 𝐶 ! (𝑢) Linear 1 • Recursively defined: 𝑢 • 𝐶 " 𝑢 = $1, 0 ≤ 𝑢 < 1 0, otherwise 𝐶 " (𝑢) Quadratic • 𝐶 # 𝑢 = $ # 𝐶 #%& 𝑢 + #'&%$ 3/4 𝐶 #%& (𝑢 − 1) # 1/2 𝑢 • Properties: 𝐶 # (𝑢) Cubic • n-th order piecewise polynomial $ 1 = 1/2 𝐶 # 2/3 • Zero outside [0, n+1] (local support) • C n-1 continuous 𝑢 1/6 1 2 3 4 5

  6. Using quadratic basis è quadratic B-spline 1.4 × -0.4 × -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 6

  7. Using cubic basis è cubic B-spline 1.4 × -0.4 × -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 7

  8. Important property of basis: partition-of-unity • X-coord of B-spline: 𝑦 𝑢 = ∑ ! 𝑦 ! 𝐶 " 𝑢 − 𝑗 • Consider moving all control points 𝑦 ! by the same amount 𝑑 : • 𝑦 𝑢 = ∑ 0 𝑦 0 + 𝑑 𝐶 # 𝑢 − 𝑗 = ∑ 0 𝑦 0 𝐶 # 𝑢 − 𝑗 + 𝑑 ∑ 0 𝐶 # 𝑢 − 𝑗 1 • Partition-of-unity ensures that the entire curve is also moved by 𝑑 − 2𝑢 − 1 ! + 4 𝑢 ! 𝑢 − 1 ! 2/3 Quadratic basis 2 6 2 1/2 1/2 1/2 t t t 1 1/2 1 1 8

  9. Cubic B-spline vs. Cubic Catmull-Rom spline Representation Piecewise cubic Piecewise cubic Given coordinate value at each knot 𝑢 = 𝑢 ( , compute derivative at each knot Defined as Linear combination of cubic bases Hermite interpolation for each interval No Yes Passes through CPs? Continuity across C 2 -continuous C 1 -continuous intervals 9

  10. From B-spline to subdivision 10

  11. Another important property of basis function • Can be decomposed into weighted sum of the same basis functions with halved support Quadratic = × 3/4 × 3/4 × 1/4 × 1/4 0 0.5 1 1.5 2 2.5 3 11

  12. Decomposing quadratic B-spline 1.4 × -0.4 × -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 12

  13. Decomposing quadratic B-spline 3/4 1/4 1.4 × 3 4 1.4 + 1 4 −0.4 3/4 1/4 -0.4 × 4 1.4 + 3 1 4 −0.4 -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 13

  14. Decomposing quadratic B-spline 1 4 1.4 3 4 1.4 3 4 1.4 + 1 4 −0.4 4 1.4 + 3 1 4 −0.4 3 4 −0.4 + 1 4 −1.4 1 4 −0.4 + 3 4 −1.4 3 4 −1.4 + 1 4 −0.3 1 4 −1.4 + 3 4 −0.3 3 4 −0.3 + 1 4 −0.7 1 4 −0.3 + 3 4 −0.7 3 4 −0.7 + 1 4 −1.2 4 −0.7 + 3 1 4 −1.2 4 −1.2 + 1 3 4 −2.2 4 −1.2 + 3 1 4 −2.2 3 4 −2.2 1 4 −2.2 14

  15. Generating quadratic curves via subdivision Stencil A 3/4 1/4 Stencil B 1/4 3/4 3/4 1/4 3/4 1/4 Split each vertex into 2 new vertices • (= For each edge, generate 2 new vertices) 15

  16. Generating quadratic surfaces via subdivision Bi-quadratic basis: 𝐶 "," 𝑡, 𝑢 = 𝐶 " 𝑡 𝐶 " (𝑢) 3/16 1/16 1/16 3/16 3/16 9/16 Stencil 3/16 9/16 1/4 3/4 1/4 ⊗ 3/4 Split each vertex into 4 new vertices • (= For each face, generate 4 new vertices) 16

  17. Subdividing a torus 17

  18. For the case of cubic B-spline Cubic basis = × 3/4 × 1/2 × 1/2 × 1/8 × 1/8 0 0.5 1 1.5 2 2.5 3 3.5 4 18

  19. Decomposing cubic B-spline 1.4 × -0.4 × -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 19

  20. Decomposing cubic B-spline 1/2 1/8 1.4 × 3/4 1/2 -0.4 × 1/8 -1.4 × -0.3 × -0.7 × -1.2 × -2.2 × 20

  21. Decomposing cubic B-spline 1 8 1.4 1 2 1.4 3 4 1.4 + 1 8 −0.4 1 2 1.4 + 1 2 −0.4 1 8 1.4 + 3 4 −0.4 + 1 8 −1.4 2 −0.4 + 1 1 2 −1.4 1 8 −0.4 + 3 4 −1.4 + 1 8 −0.3 2 −1.4 + 1 1 2 −0.3 1 8 −1.4 + 3 4 −0.3 + 1 8 −0.7 2 −0.3 + 1 1 2 −0.7 1 8 −0.3 + 3 4 −0.7 + 1 8 −1.2 1 2 −0.7 + 1 2 −1.2 1 8 −0.7 + 3 4 −1.2 + 1 8 −2.2 1 2 −1.2 + 1 2 −2.2 8 −1.2 + 3 1 4 −2.2 1 2 −2.2 1 8 −2.2 21

  22. Generating cubic curves via subdivision Stencil A 1/2 1/2 Stencil B 1/8 1/8 1/8 3/4 1/8 1/2 1/2 3/4 For each edge, generate a new vertex at its midpoint • • Move each vertex to weighted average of its neighbors 22

  23. Generating cubic surfaces via subdivision Bi-cubic basis: 𝐶 #,# 𝑡, 𝑢 = 𝐶 # 𝑡 𝐶 # (𝑢) “face point” stencil 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/4 1/2 1/2 1/2 ⊗ 1/2 For each face, generate a new vertex at its barycenter • 23

  24. Generating cubic surfaces via subdivision Bi-cubic basis: 𝐶 #,# 𝑡, 𝑢 = 𝐶 # 𝑡 𝐶 # (𝑢) “edge point” stencil 1/16 3/8 1/16 3/8 1/16 1/16 1/16 1/16 3/8 3/8 1/16 1/16 1/2 1/8 3/4 1/8 ⊗ 1/2 For each edge, generate a new vertex at weighted average of its neighbors • 24

  25. Generating cubic surfaces via subdivision Bi-cubic basis: 𝐶 #,# 𝑡, 𝑢 = 𝐶 # 𝑡 𝐶 # (𝑢) “vertex point” stencil 1/64 3/32 1/64 3/32 1/64 1/64 9/16 9/16 3/32 3/32 3/32 3/32 3/32 1/64 1/64 1/64 1/8 1/64 3/32 1/8 3/4 1/8 3/4 ⊗ 1/8 Move each vertex to weighted average of its neighbors • 25

  26. Subdividing a torus 26

  27. Generalizing subdivision scheme 27

  28. Assumption in the aforementioned formulation • “Clean” quadrilateral decomposition of the region • “Clean” vertex: # of neighboring faces (valence) is 4 • If valence is not 4 è singularity • Generally impossible to obtain except special cases (torus) • Strength of subdivision schemes: applicable to singularities • Generalize stencils through geometric interpretations 28

  29. Generalizing quadratic stencil (Doo-Sabin) 𝑄 = 1 1/16 3/16 16 9 𝐵 + 3 𝐶 + 3 𝐷 + 𝐸 C D Barycenter Midpoint Midpoint 𝐵 + 𝐶 + 𝐷 + 𝐸 + 𝐵 + 𝐶 + 𝐵 + 𝐷 + 𝐵 4 2 2 = P 4 B A 3/16 9/16 For each polygon’s each vertex, generate a new vertex è Applicable to general polygon mesh at the average of the polygon’s barycenter, its adjacent edges’ midpoints, and itself 29

  30. Examples of Doo-Sabin 30

  31. Examples of Doo-Sabin 31

  32. Generalizing cubic stencils (Catmull-Clark) 1/4 1/4 𝑄 = 𝐵 & + 𝐵 7 + 𝐵 8 + 𝐵 9 A 4 A 3 4 P A 1 A 2 For each polygon, generate a new vertex at its barycenter 1/4 1/4 è Applicable to general polygon mesh 32

  33. Generalizing cubic stencils (Catmull-Clark) 1/16 1/16 B 1 B 2 𝑄 = 3 + 1 8 𝐵 & + 𝐵 7 16 𝐶 & + 𝐶 7 + 𝐶 8 + 𝐶 9 Barycenter Barycenter 𝐵 & + 𝐵 7 + 𝐶 & + 𝐶 7 + 𝐵 & + 𝐵 7 + 𝐶 8 + 𝐶 9 Midpoint + 𝐵 & + 𝐵 7 4 4 A 1 A 2 3/8 P 3/8 2 2 = 2 For each edge, generate a new vertex at the average of the barycenters of its adjacent polygons and its midpoint B 3 B 4 1/16 1/16 è Applicable to general polygon mesh 33

  34. Generalizing cubic stencils (Catmull-Clark) 1/64 3/32 1/64 𝑄 = 9 16 𝐵 + 3 32 𝐶 ! + 𝐶 " + 𝐶 # + 𝐶 $ + 1 C 2 B 2 C 1 64 𝐷 ! + 𝐷 " + 𝐷 # + 𝐷 $ Barycenter Barycenter Barycenter Barycenter 𝑅 𝐵 + 𝐶 " + 𝐷 " + 𝐶 ! + 𝐵 + 𝐶 ! + 𝐷 ! + 𝐶 # + 𝐵 + 𝐶 # + 𝐷 # + 𝐶 $ + 𝐵 + 𝐶 $ + 𝐷 $ + 𝐶 " = 1 4 4 4 4 4 4 3/32 3/32 P Midpoint Midpoint Midpoint Midpoint + 𝐵 + 𝐶 # 𝐵 + 𝐶 ! + 𝐵 + 𝐶 " + 𝐵 + 𝐶 $ B 3 A B 1 𝑆 + 2 2 2 2 2 9/16 4 4 + 1 When A’s valence is n, 4 𝐵 𝑄 = 1 𝑜 𝑅 + 2 𝑜 𝑆 + 𝑜 − 3 𝐵 𝑜 C 3 B 4 C 4 è Applicable to general polygon mesh 1/64 3/32 1/64 34

  35. Comparison = cubic surface = quadratic surface 35

  36. Subdivision scheme for triangle meshes (Loop) • Based on B-spline basis defined on triangular lattice When valence isn’t 6 è derived from complicated analysis (see Loop’s paper) • C 2 -continuous cubic surface except at singularities 36

  37. Comparing Catmull-Clark & Loop Catmull-Clark Loop Catmull-Clark • Catmull-Clark is de facto standard in CG industry • Quad meshes can naturally represent two principal curvature directions 37

  38. Other subdivision schemes • four-point method − 1/16 • Passes through CPs (interpolating) − 1/16 • çè approximating • Cannot be represented as polynomials 9/16 9/16 • C 1 -continous • Surface version: butterfly method • Many more variants • Kobbelt’s method 3 -method • • etc... 38

  39. Geri’s Game (Pixar, 1997) • First film using subdivision surfaces • Previously (Toy Story), tedious modeling work using B-splines https://www.youtube.com/watch?v=9IYRC7g2ICg Subdivision surfaces in character animation [DeRose,Kass,Truong,SIGGRAPH98] 39

  40. Controlling smoothness • Can represent sharp edges by altering subdivision rules sharpness=0 sharpness=1 sharpness=2 sharpness=3 sharpness= ∞ Subdivision surfaces in character animation [DeRose,Kass,Truong,SIGGRAPH98] 40

  41. Controlling smoothness • Can represent sharp edges by altering subdivision rules Subdivision surfaces in character animation [DeRose,Kass,Truong,SIGGRAPH98] 41

Recommend


More recommend