Reading Recommended: ! Stollnitz, DeRose, and Salesin. Wavelets for Computer Graphics: Theory and Applications, 1996, section 6.1-6.3, 10.2, A.5. Note: there is an error in Stollnitz, et al., section Subdivision curves and surfaces A.5. Equation A.3 should read: MV = V Λ cse457-19-subdivision 1 cse457-19-subdivision 2 Subdivision curves Chaikin’s algorithm Idea: Chakin introduced the following “corner-cutting” scheme in 1974: ! repeatedly refine the control polygon ! Start with a piecewise linear curve → → → 1 2 3 L P P P ! Insert new vertices at the midpoints (the splitting step ) ! curve is the limit of an infinite process ! Average each vertex with the “next” = lim i Q P (clockwise) neighbor (the averaging step ) → ∞ i ! Go to the splitting step Average cse457-19-subdivision 3 cse457-19-subdivision 4
Averaging masks Lane-Riesenfeld algorithm (1980) The limit curve is a quadratic B-spline! Use averaging masks from Pascal’s triangle: n n n 1 Instead of averaging with the next neighbor, we = r , , L , n 2 0 1 n can generalize by applying an averaging mask during the averaging step: = K r ( , r , , , r r K ) Gives B-splines of degree n +1. − 1 0 1 In the case of Chaikin’s algorithm: n=0: r = n=1: n=2: cse457-19-subdivision 5 cse457-19-subdivision 6 Subdivide ad infinitum? Local subdivision matrix After each split-average step, we are closer to the Consider the cubic B-spline subdivision mask: limit curve . 1 1 2 ( ) 1 4 How many steps until we reach the final (limit) Now consider what happens during splitting and position? averaging: Can we push a vertex to its limit position without infinite subdivision? Yes! We can write equations that relate points at one subdivision level to points at the previous: ( ) 1 1 * = 0 + 0 Q Q Q L L C 2 ( ) 1 1 * = 0 + 0 Q Q Q R C R 2 ( ) ( ) ( ) 1 1 1 1 = 0 + 1 * + 0* = 0 + 0 = 0 + 0 Q Q 2 Q Q 2 Q 2 Q 4 Q 4 Q L L L C L C L C 4 4 8 ( ) ( ) 1 1 1 = 1 * + 0 + 1 * = 0 + 0 + 0 Q Q 2 Q Q Q 6 Q Q C L C R L C R 4 8 ( ) ( ) ( ) 1 1 1 1 = 0 + 1 * + 0 = 0 + 0 = 0 + 0 Q Q 2 Q Q 2 Q 2 Q 4 Q 4 Q R C R R C R C R 4 4 8 cse457-19-subdivision 7
Local subdivision matrix Recipe for subdivision curves We can write this as a recurrence relation in Each subdivision scheme has its own evaluation matrix form: mask , determined by eigenanalysis of the subdivision and averaging rules. − j j 1 Q Q 4 4 0 L L 1 1 − j = j 1 Q 6 1 Q After subdividing and averaging a few times to get a C C 8 0 − j j 1 fine enough mesh, we can push each vertex in the 4 4 Q Q R R mesh to its limit position by applying the evaluation − j = j 1 Q S Q mask. Where the Q ’s are (for convenience) row vectors For Lane-Riesenfeld cubic B-spline subdivision, the and S is the local subdivision matrix . evaluation mask is: 1 1 4 ( ) 1 6 Expanding this relation we get Now we can cook up a simple procedure for creating subdivision curves: = − = − = − = = j j 1 j 2 j 3 j 0 L Q SQ SSQ SSSQ S Q ! Subdivide (split+average) the control polygon and so the limit position for Q 0 is a few times. Use the averaging mask. ! Push the resulting points to the limit positions. ∞ = j 0 Use the evaluation mask. Q lim S Q → ∞ j cse457-19-subdivision 9 cse457-19-subdivision 10 DLG interpolating scheme (1987) Building complex models Slight modification to subdivision algorithm: We can extend the idea of subdivision from curves to surfaces… ! splitting step introduces midpoints ! averaging step only changes midpoints For DLG (Dyn-Levin-Gregory), the averaging mask is: 1 ( 2,5,10,5, 2) r = − − 16 Since we are only changing the midpoints, the points after the averaging step do not move. cse457-19-subdivision 11 cse457-19-subdivision 12
Subdivision surfaces Triangular subdivision Chaikin’s use of subdivision for curves inspired There are a variety of ways to subdivide a similar techniques for subdivision surfaces. poylgon mesh. Iteratively refine a control polyhedron (or A common choice for triangle meshes is 4:1 control mesh ) to produce the limit surface subdivision – each triangular face is split into four subfaces: σ = lim j M → ∞ j using splitting and averaging steps. L ∞ 0 1 2 L M M M M cse457-19-subdivision 13 cse457-19-subdivision 14 Loop's evaluation and tangent Loop's subdivision scheme masks Once again we can use masks for the averaging As with subdivision curves, we can split and average step: a number of times and then push the points to their limit positions. α + + + L ( ) n Q Q Q ← 1 n Q α + ( ) n n ε + + + L ( ) n Q Q Q ∞ = 1 n Q ε + ( ) n n where ∞ = τ + τ + + τ T ( ) n Q ( ) n Q L ( ) n Q − β + π 2 1 1 1 2 2 n n n ( 1 ( n )) 5 ( 3 2 cos( 2 / n )) α = β = − ( n ) ( n ) ∞ = τ + τ + + τ T ( ) n Q ( ) n Q L ( ) n Q β ( n ) 4 32 − n n 2 1 1 2 n 1 These values, due to Charles Loop, are carefully where chosen to ensure smoothness – namely, tangent 3n ε τ π (n)= (n)= cos (2 i/n) plane or normal continuity. β i (n) Note: tangent plane continuity is also know as G 1 How do we compute the normal? Why would we continuity for surfaces. want to? cse457-19-subdivision 16
Recipe for subdivision surfaces Catmull-Clark subdivision 4:1 subdivision of triangles is sometimes called a face As with subdivision curves, we can now describe scheme for subdivision, as each face begets more a recipe for creating and rendering subdivision faces. surfaces: An alternative face scheme starts with arbitrary polygon ! Subdivide (split+average) the control meshes and inserts vertices along edges and at face polyhedron a few times to get a reasonably centroids: fine mesh. Use the averaging mask. ! Compute two tangent vectors using the tangent masks. ! Compute the normal from the tangent vectors. ! Push the points to their limit positions. Use the evaluation mask. ! Render! Catmull-Clark subdivision : Note: after the first subdivision, all polygons are quadilaterals in this scheme. cse457-19-subdivision 17 cse457-19-subdivision 18 Adding creases Creases In some cases, we want a particular feature such Here’s an example using Catmull-Clark surfaces as a crease to be preserved. (based on subdividing quadrilateral meshes): For subdivision surfaces, we can just modify the subdivision mask: This gives rise to G 0 continuous surfaces (i.e., having positional but not tangent plane continuity) cse457-19-subdivision 19 cse457-19-subdivision 20
Summary What to take home: ! The meanings of all the boldfaced terms. ! How to perform the splitting and averaging steps on subdivision curves. ! How to perform mesh splitting steps for subdivision surfaces, especially Loop. ! How to construct and render subdivision surfaces from their averaging masks, evaluation masks, and tangent masks. cse457-19-subdivision 21
Recommend
More recommend