1
Subdivision Surfaces
CAGD
Ofir Weber
Subdivision Surfaces CAGD Ofir Weber 1 Spline Surfaces Spline - - PowerPoint PPT Presentation
Subdivision Surfaces CAGD Ofir Weber 1 Spline Surfaces Spline Surfaces Why use them? Smooth Good for modeling - easy to control Compact (complex objects are represented by less numbers) Flexibility (different
1
Ofir Weber
2
Why use them?
Smooth Good for modeling - easy to control
Compact (complex objects are represented by less
numbers)
Flexibility (different tessellation-parameters produce
different level-of-details from the same surface)
3
Grid should be regular Resolution is not adaptive Problems along seams of patchwork Not well suited for animation – deformable models Topology is not arbitrary (Holes, trim curves) Less easy to add “features” such as crease.
4
5
6
In each iteration
Refine a control net (mesh) Increases the number of vertices / faces
The mesh vertices converges to a limit surface Each subdivision scheme has:
Rules to calculate the locations of new vertices. A method to generate the new net topology.
1 2
∞
7
”Subdivision Zoo”
Catmul Clark Doo Sabin Loop Butterfly – Nira Dyn …many more
Classification:
Mesh types: tris, quads,
hex…, combination
Face / vertex split Interpolating / Approximating Smoothness (Non)Linear …
8
where
3 2 3 2
1 1 U u u u V v v v ⎡ ⎤ = ⎣ ⎦ ⎡ ⎤ = ⎣ ⎦
t t
1 3 3 1 3 6 3 1 3 3 6 1 4 1 M − − ⎡ ⎤ ⎢ ⎥ − ⎢ ⎥ = ⎢ ⎥ − ⎢ ⎥ ⎣ ⎦
11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44
P P P P P P P P G P P P P P P P P ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ ⎢ ⎥ ⎣ ⎦
9
We will limit our discussion to one quadrant of the patch in which 0<u,v<½ , as it is identical to the others, due to symmetry. This is the sub-patch where We can now combine the two last expressions into: where:
1 1
( , )
t t t
S u v USMGM S V =
1 8 1 4 1 2 1 S ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦
) , (
1 1 v
u S
2 / , 2 /
1 1
v v u u = =
10
Notice that the new patch must still be a bicubic
B-spline surface and therefore must satisfy: Thus it must uphold: M is invertible so we can write it as: Where
1 1 1
( , )
t t
S u v UMG M V =
1 t t t
MG M SMGM S =
1 1 1 1 t t t t
− −
1 1
4 4 1 6 1 1 4 4 8 1 6 1 H M SM
−
⎡ ⎤ ⎢ ⎥ ⎢ ⎥ = = ⎢ ⎥ ⎢ ⎥ ⎣ ⎦
11
And for individual points noted as qij: Face point: Edge point: Vertex point:
( )
11 12 21 22 11 11 13 12 22 12 22 22
4 2 2 2 4 2 4 p p p p q q q p p q p Q R q + + + = + + ⎛ ⎞ ⎛ ⎞ + ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ = = + +
( ) ( ) ( ) ( ) ( )
11 13 31 33 22 12 22 21 22 32 22 23
4 1 4 2 2 2 2 q q q q Q p p p p p p p p R + + + = ⎡ ⎤ + + + + = + + + ⎢ ⎥ ⎣ ⎦
12
Face Point
1
1
m i i
f p m
=
=
Edge Point
1 2 1 2
Vertex Point
( 3) 2 p n Q R v n n n − = + +
2 2 1 1
1 1 2
n n i i i i
n v f e p n n n
= =
− = + +
13
After 1 iteration, Every new face is a rectangular. Extraordinary vertices are forever. Valence is retained. Ultimately, at the limit, the surface will be a standard bicubic B-spline
surface at every point except at these “extraordinary points”, and therefore at all but extraordinary points.
Catmull & Clark did not prove or guarantee continuity at the
extraordinary points but note that trials indicate this much.
Later on it was proven to be C1
) 2 (
C
14
Crease/body masks Piecewise smooth surface
8 6 8 1 8 1 2 1 2 1
15
Any topology – better use quad faces and vertices with
valence 4
Approximation Generalization of cubic B-Spline Face Split C2 everywhere. C1 on extraordinary vertices Linear
16
Extraordinary faces turns into extraordinary points
after the first iteration
After that, the number of extraordinary points stays
constant
The distance between extraordinary points remains,
more or less ,fixed, And the number of faces between them grows with every step
Hence, we can treat each extraordinary point as an
isolated phenomenon on a regular lattice
17
( ) ( )
1 1
/ 4 / 4 2 / 4
i i i i i i i i i i i i
q Q R R S r q q R S q R s S n n
+ −
= + + + = + + + ⎛ ⎞ = + + ⎜ ⎟ ⎝ ⎠
1 1 1 1 n n n n
q Q q Q r M R r R s S ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⋅ ⋅ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⋅ ⋅ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⋅ ⋅ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⋅ ⋅ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
18
1 2 3 4 1 2 3 4
1 1 1 1 4 4 4 4 1 1 1 1 4 4 4 4 1 1 1 1 4 4 4 4 1 1 1 1 4 4 4 4 1 1 6 1 1 6 16 16 16 16 16 16 1 1 1 6 1 6 16 16 16 16 16 16 1 1 1 6 1 6 16 16 16 16 16 16 1 1 1 1 6 6 16 16 16 16 16 16 1 1 1 1 64 64 64 64
q q q q r r r r s
⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ = ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠
1 2 3 4 1 2 3 4
3 3 3 3 9 32 32 32 32 16
Q Q Q Q R R R R S
⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ i
Matrix is large We want to
We want analytic
19
Analyze the eigenvalues and eigenvectors of M. M has cyclic symmetry - we can apply a Discrete
Fourier Transform to Q, R and S, and then separate the terms of different frequencies.
Define in a similar way.
/ 2 2 /
1
n ij n i
Q Q e j
π ω ω ω=
= = −
, , ,
i i i
S R q r
20
The equations can be rewritten as a set of equations for each
value of ω: In matrix form:
*
( (1 ) ) / 4 ((1 ) ) / 4 ( 2 ) / 4 q Q a R S r a q R S s q r s
ω ω ω ω ω ω ω ω ω ω
= + + + = + + + = + +
4 / 1 6 8 / 1 6 4 / 1 6 2 / 1 6 8 / 1 6 6 / 1 6 1 / 1 6 6 / 1 6 9 / 1 6 q Q r R s S ω ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = = ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
* *
4/16 4(1 ) /16 (1 ) /16 ((1 )(1 ) 4)/16 q a Q r a a a R
ω ω ω ω ω ω ω ω
ω + ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ = ≠ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ + + + + ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
2 / j n
ω π ω
21
Finding the eigenvalues is easy now The fact that the largest eigenvalue is 1 indicates that the surface
will converge to some limit surface as iterations proceed.
Since each row sums to one, is eigenvalue for (1, 1, .. , 1)
1 1 1 k i i i i i i m i i k k m i i i i i i
m i m m i
α α
α
= = =
= ⋅ ⋅ = ⋅ ⋅ = ⋅ ⋅ = ⋅ = ⋅ ⋅ = ⎛ ⎞ ⎜ ⎟ = ⋅ = ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠
m→∞
22
Define for the dominant eigenvalue at frequency ω The limit of the first derivative depends on the ratio If this ratio is less or equal than 1, the surface is slope
continuous.
For the second derivative, we examine the ratio
If this ratio is exactly 1, the curvature will converge to some finite nonzero value. Less than 1 means that there is a local flat point on the surface.
Based on this, Doo & Sabin improved the quadratic
scheme of Catmull & Clark to be C1 everywhere
They couldn’t find similar formula for the cubic scheme
ω
λ
1
2 1
23
Masks:
α0 α1 α2 α3 α4 9/16 3/16 3/16 1/16
,0
3 2cos 2 / 4 4
i i
i n n δ π α + = +
24
Which resulted in
which give discontinuity of exactly the second derivative under all circumstances.
1
1/ 4, 1/ 2, 1/ 4 1
ω
λ λ λ ω = = = >
25
Any topology – built for quad faces Approximation Vertex Split C1 everywhere, even on extraordinary vertices Generalization of quadratic B-Spline Linear
26
8 3
8 1 8 3
8 1
2
1 5 3 2 2 cos 8 8 8 n n π β ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎜ ⎟ = − + ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠
1 nβ − β β β β β β
27
1 2 1 2 1 8 3 4 1 8
Edge point Vertex point
The boundary is a cubic B-Spline curve The curve only depends on the control points on the
boundary
Good for connecting 2 meshes C0 for irregularities near boundary
28
Triangles – better use valence 6 Approximation Face Split C2 on regular meshes Only C1 on extraordinary points C0 for irregularities near boundary The scheme is based on three directional box Spline Linear
29
8 1 8 1 1 16 − 1 2 1 16 − 1 2 1 16 − 1 16 −
30
a a b b c c c c d d
w d w c w b w a : 16 1 : 2 8 1 : 2 1 : : Weights − − + −
Multiply each vertex by its weight and sum them up w is a control parameter – determines how closely the
shape conforms to the original mesh
31
⎭ ⎬ ⎫ ⎩ ⎨ ⎧ ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ + ≥ ⎭ ⎬ ⎫ ⎩ ⎨ ⎧ − = ⎭ ⎬ ⎫ ⎩ ⎨ ⎧ − − = N j N j N e v N e e e e v N e e e v N
j
π π 4 cos 2 1 2 cos 4 1 1 : , 4 3 : : 5 : , 8 1 : , : , 8 3 : , 4 3 : : 4 12 1 : , 12 1 : , 12 5 : , 4 3 : : 3 : Weights
3 2 1 2 1
v e0 e1 e2 e3 eN-1 eN-2 eN-3
Extraordinary Vertex New Edge vertex 1 ring neighborhood
32
Triangles – use any valence Interpolation Face Split C1 everywhere Not C2 even on regular meshes Linear
33
34
35
36
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 –
modeling
Hierarchical modeling with offsets Good for deformation – animation Built-in LOD for rendering
Cons:
Ck , k>1 is hard (not good for CAD) Evaluation not straight forward (but…) Artefacts (ripples etc.)
Geri’s Game (Pixar studios) Splines in Toy Story 1
37
Catmull and J Clark. Computer Aided Design, Vol. 10, No. 6, pp 350-355, November 1978.
Section 7.2.1, Section 13.4, Chapter 20.
Meshes with Arbitrary Topology. Computer Graphics Proceedings (SIGGRAPH 96) (1996), 189–192.
Surface Interpolation with Tension Control. ACM Trans. Gr. 9, 2 (April 1990), 160– 169.
University of Utah, Department of Mathematics, 1987.
38