Graphics & Visualization
Chapter 8
Subdivision for Graphics and Visualization
Graphics & Visualization: Principles & Algorithms Chapter 8
Subdivision for Graphics and Visualization Graphics & - - PowerPoint PPT Presentation
Graphics & Visualization Chapter 8 Subdivision for Graphics and Visualization Graphics & Visualization: Principles & Algorithms Chapter 8 Introduction Tensor product B-spline surfaces restrict the
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
Were initiated by two papers in 1978
Provide simple techniques to generate a smooth surface from a given
polygonal mesh (polyhedron)
Have the ability to handle meshes of arbitrary topology Complex shapes can be obtained / retained / edited at various levels of the
refinement process.
Graphics & Visualization: Principles & Algorithms Chapter 8
a set of scalars ( mi )1≤ i ≤ n can be applied to a set of n vertices vi to generate a new vertex w
For a closed polyhedron all vertices are interior vertices Correspond to a point on the limit surface with an epsilon neighborhood
homeomorphic to a closed disk
For an open polyhedron, a set of vertices fall on the boundary Are the vertices that make up the skirt of the polyhedron An edge linking 2 boundary vertices is always shared by one face of the
polyhedron
1 1 n i i n i i
m m
= =
= ∑
i
v w
Graphics & Visualization: Principles & Algorithms Chapter 8
The number of edges incident on it An interior vertex is at least 3-valent A boundary vertex could be 2-valent
Depends on the subdivision scheme For surfaces based on tensor products, ordinary vertex is : 4-valent if it is an interior vertex 3-valent if it is a boundary vertex Ordinary face is a face with 4 ordinary vertices For triangular meshes ordinary vertex is usually 6-valent
Graphics & Visualization: Principles & Algorithms Chapter 8
A 1-ring for an interior vertex vi is the set if vertices (vj), where vivj is an
edge incident to vi
When all vertices are ordinary vertices
If the configuration contains at least one extraordinary vertex or one
extraordinary face
Given two masks (mi )1≤ i ≤ r and (nj )1 ≤ j ≤ p , the tensor product of these two
masks is another mask of r × p elements (mi × nj )1 ≤ i ≤ r, 1 ≤ j ≤ p
Graphics & Visualization: Principles & Algorithms Chapter 8
Quadratic subdivision (Chaikin) Cubic subdivision Four-point subdivision
The initial control-polygon vertices are The vertices of its refined polygon are The level of refinement is j So
j i
i i
= v v
i
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each edge connecting two vertices and , compute two new vertices using the masks (1,3), and (3,1) as follows: 2. Construct a new polygon as follows: (a) For each vertex , connect its two new vertices and forming a V-edge (corresponding to a vertex) of the new control polygon. (b) For each edge , connect its two new vertices forming an E-edge (corresponding to an edge) of the new control polygon.
j i
1 j i−
j i
1 1 2 1 1 2 1
3 1 3 1 4 4 4 4
j j j j j j i i i i i i + + − − +
= + = + v v v v v v
j i
1 2 2 j i + −
1 2 1 j i + −
j i
1 1 2 1 2
j j i i + + −
Graphics & Visualization: Principles & Algorithms Chapter 8
Black disks: the original vertices Hollow disks: the refined vertices
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each vertex , compute a new vertex , called V-vertex, using the mask (1,6,1) as follows: 2. For each edge , compute a new vertex, called E-vertex, using the mask (1,1) as follows: 3. Construct a new refined polygon by connecting the E- and V-vertices generated as above.
j i
1 2 j i +
1 j j i i −
1 1 1 2
6 8
j j j j i i i i + − +
+ + = v v v v
1 1 2 1
j j j i i i + − −
Graphics & Visualization: Principles & Algorithms Chapter 8
Black disks: original vertices Hollow disks: refined vertices
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each vertex vi , denote the new corresponding vertex , called V-vertex: 2. For each edge , compute a new E-vertex using the mask (−1,9,9,−1) as follows: 3. Construct a refined control polygon by connecting each V-vertex to its neighboring E-vertices.
1 2 j i +
1 j j i i −
1 2 j j i i + =
1 2 1 1 2 1
9 9 16
j j j j j i i i i i + − − + −
− + + − = v v v v v
Graphics & Visualization: Principles & Algorithms Chapter 8
Black disks: original vertices Hollow disks: refined vertices
Graphics & Visualization: Principles & Algorithms Chapter 8
These surfaces have rectangular topology
Quadratic Tensor Product Subdivision Cubic Tensor Product Subdivision Arbitrary topology subdivision surfaces
Graphics & Visualization: Principles & Algorithms Chapter 8
The surface is parameterized by
2 parameters s & t
Along s-direction, generate 2 vertices
(1,3) & (3,1)
Along t-direction, generate 2 vertices
using the same masks
A, B, C, D in that order
rotation of this mask.
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
To generate a V-vertex corresponding to
each old vertex
To generate a E-vertex corresponding to
each edge vertex
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
P0 : initial mesh of arbitrary topology, called a polyhedron R : set of rules, called a refinement procedure
A set of vertices, edges and faces in 3D space The faces don’t have to be planar
is applied to the polyhedron P0 to generate another polyhedron P1 P1 in turn is taken as an input to the refinement procedure to generate another
polyhedron P2
If R satisfies some conditions then the sequence of polyhedra P0, P1,…,Pi, …
will converge to a smooth surface.
Graphics & Visualization: Principles & Algorithms Chapter 8
3
j i
j i
j i
Graphics & Visualization: Principles & Algorithms Chapter 8
j i
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each n-sided face , compute n refined vertices as a linear combination of the vertices of that face: with: 2. Construct a refined polygon Pi+1 as follows: (a) For each n-sided face , generate a new face (called F-face) from its refined vertices. (b) For each edge , generate a new face (called an E-face) from the refined vertices of that edge on the faces common to it. (c) For each vertex , generate a new face (called V-face) from the refined vertices of that vertex on the faces sharing it.
1 j i +
j i
1 1 n j j i ik k k
α
+ =
= ∑ v v
5 4 3 2cos(2 ( ))/ for 4
ii ik
n i k n k i n α π α + = + − = ≠
j i
j i
j i
Graphics & Visualization: Principles & Algorithms Chapter 8
1.
2.
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each face
(called F-vertex) as the centroid of that face. 2. For each edge
vertex (called E-vertex) as a linear combination of , and their four adjacent vertices on the two faces shared by that edge.
j i
1 j i
+
1 j j j i i i+
= e v v
1 j i
1
j j i i+
Graphics & Visualization: Principles & Algorithms Chapter 8
3. For each vertex
(called V-vertex) as a linear combination of , the E-vertices of the edges sharing it, and the F-vertices of the faces sharing it. where
j i
1 j i +
j i
1 1 1 n n j j j j i n k n k n i k k
+ = =
2
1 2
n n n
n n n α β γ = = − =
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1 i
2 1 1 1 1 1
4 ( 5)
n n i j j j j i
n e f n n
= = ∞
+ + = +
v v v v
1 j
1 j
f v
1 i
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each edge , do the following: (a) Let t1 and t2 be the two triangles sharing that edge. (b) Let c1 and c2 be the vertices of that edge and c3 and c4 be the other two vertices of t1 and t2. (c) Generate an E-vertex using the mask as follows:
j i
e
1 j i
1 1 3 2 4
j i
Graphics & Visualization: Principles & Algorithms Chapter 8
2. For each n-valent vertex , do the following: (a) Let c1,c2, ··· , cn be the vertices of the 1-ring around (b) Generate a V-vertex using a linear combination of the vertex and its 1-ring vertices as follows: where
j i
v
j i
v
j i
v
1 1
(1 )
n j j i n i n k k
nα α
+ =
= − +
v v c
1 j i +
v
3 2
3 16 1 5 3 1 2 cos 3 8 8 4
n
for n n n α π α = ⎛ ⎞ ⎛ ⎞ = − + > ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠
Graphics & Visualization: Principles & Algorithms Chapter 8
3. Generate a refined polyhedron Pj+1 as follows:
edges to form a triangle of Pj+1.
the E-vertices of all edges incident to it. As such, n triangles are added to the refined polyhedron Pj+1.
Graphics & Visualization: Principles & Algorithms Chapter 8
i
1
3 8 ( 1) 8 3 8 3 8
n n n i i j j n n
n n n α α α α
∞ =
+ − = + + +
v v v
j
i
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each vertex , let its V-vertex be the same as the original vertex, 2. For each edge : (a) If both vertices of that edge are 6-valent, then do the following:
and t6 be the triangles sharing an edge with t2
vertices of the above triangles as follows : where
j i
v
1 j j i i + =
j i
e
8 1 1 k j i k k
e α
+ =
=∑ v c
1 1,3,6,7 2 2,8 8 4,5
k k k
for k for k for k α α α = − = = = = =
Graphics & Visualization: Principles & Algorithms Chapter 8
(b) Else, if one of the vertices of the edge is n-valent, where n ≠ 6, (an extraordinary vertex say ), then :
vertices as follows: where the depend on the valence n :
j i
v
j i
v
1 1 n j i k k k
− + =
k
α
1 2 2 1 3
1 1 2 1 4 cos cos 5 4 2 5 1 , 3 12 12 3 1 , , 4 8 8
k
k k for n n n n for n for n π π α α α α α α α α ⎛ ⎞ = + + > ⎜ ⎟ ⎝ ⎠ = = = − = = = − = = =
Graphics & Visualization: Principles & Algorithms Chapter 8
(c) Else:
vertex as extraordinary vertex
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each edge , compute its E-vertex as the midpoint of that edge. 2. Construct a new polyhedron as follows: (a) For each face , construct an F-face by connecting the E-vertices of its edges. (b) For each vertex , construct a V-face by connecting the E-vertices of the edges incident to it.
j i
j i
j i
Graphics & Visualization: Principles & Algorithms Chapter 8
(a) On each n-sided face , generate n vertices as linear combinations of the old vertices : where r = (k − j + n) mod n and the coefficients αr are given by:
j i
v
1 j i +
v
j i
f
1 1 n j j i r k k
+ =
n j r j
− =
Graphics & Visualization: Principles & Algorithms Chapter 8
Graphics & Visualization: Principles & Algorithms Chapter 8
1. For each face , generate an F-vertex as the centroid of that face. 2. For each n-valent vertex , do the following: (a) Let (bk) be the 1-ring vertices around (b) Generate a V-vertex : where 3. Construct a new polyhedron as follows: (a) For each old edge, connect the F-vertices (centroid) of the two faces common to that edge. (b) For each old face, connect its F-vertex to the V-vertices of its corresponding vertices.
j i
v
1 j i +
v
j i
j i
v
1 1
n j j n i n i k k
+ =
1 2 4 2cos 9
n
n π α ⎛ ⎞ ⎛ ⎞ = − ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠
Graphics & Visualization: Principles & Algorithms Chapter 8
Subdivision surfaces with sharp features are a necessity in modeling and
animation
Interpolates some or all of its vertices E.g. the butterfly, the
schemes
Approximates an initial given polygon E.g. Catmull-Clark, Doo-Sabin, midpoint, Loop schemes
43
3
Graphics & Visualization: Principles & Algorithms Chapter 8
Is the vertex at which we want to reduce the smoothness Is labeled according to the number of tagged sharp edges incident to it If #tagged edges > 2 then is a dart vertex If #tagged edges = 2 then is a crease vertex Otherwise is a corner vertex
44 i
v
Graphics & Visualization: Principles & Algorithms Chapter 8
45
Mask for a crease vertex Mask for a dart vertex Mask for E-vertex incident to any sharp vertex An example of Catmull-Clark subdivision surface with a dart
Graphics & Visualization: Principles & Algorithms Chapter 8
Work nicely for closed polyhedra Lack control of the boundary curves of the limit surfaces generated from
A limit surface from an open polyhedron shrinks to its interior It is hard to control its boundary curves
46
Graphics & Visualization: Principles & Algorithms Chapter 8
Modify the boundary faces to have some specific structure So that a limit surface has its boundary curves controlled by the boundary
vertices of the initial configuration
These vertices form the boundary control polygon of the surface E.g. consider a Doo-Sabin surface: All boundary surfaces are 3-valent Modify the boundary faces: extend every edge vivj by reflecting its interior
vj symmetrically about vi
47
Graphics & Visualization: Principles & Algorithms Chapter 8
N-reflected faces Used for more complicated boundary situations Advantage: maintains the same subdivision coefficients, so:
1. Not specialized analysis of the limit surface 2. Two subdivision surfaces can be joined with the smoothness across their boundary curves
48
Graphics & Visualization: Principles & Algorithms Chapter 8
Modify the subdivision coefficients along the boundary Refine the boundary control polygon by using a curve subdivision algorithm E.g. In the Catmull-Clark scheme, follow the steps:
Similar algorithm exists for the Doo-Sabin scheme
49
Graphics & Visualization: Principles & Algorithms Chapter 8
A centroid of a face is a limit point on the surface Associate every tagged vertex vk with a centroid of a certain face Compute the matrix M of the linear system with the following algorithm:
50 k ∞
w
Graphics & Visualization: Principles & Algorithms Chapter 8
The superscript indicates that the vertices belong to the 1st subdivision.
51
1 1
i i n ≤ ≤
1 1
n k i i
=
Graphics & Visualization: Principles & Algorithms Chapter 8
52
1 i
w
1 1 m i ri r r
α
=
=∑ w w
1 1
1 ( )
n m k ri r i r
n α
= =
=
v w
1
ri
nα
Graphics & Visualization: Principles & Algorithms Chapter 8
53
1 1 2 2 3 3
· · · ·
n n
⎛ ⎞ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ = ⋅ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ v w v w v w M v w
Graphics & Visualization: Principles & Algorithms Chapter 8
54
A Doo-Sabin surface A Catmull-Clark surface Both surfaces interpolate the four top vertices of a cube
Graphics & Visualization: Principles & Algorithms Chapter 8
Use a similar algorithm Associate every vertex to be interpolated with the limit of its V-vertex A limit vertex is given in terms of vertices of the 1st refinement Replace each of these by their combinations of the vertices wk Each vertex will correspond to a row of the matrix needed to solve the
underlying linear system
The matrix M is a square matrix We have 1 equation for every unknown vertex A solution exists as long as M is not singular
55
Graphics & Visualization: Principles & Algorithms Chapter 8
i. Treat the cp as a boundary of 2 subdivision surfaces Each surface will have to undergo the procedure of boundary modification ii. Modify the subdivision coefficients, so that: Each refinement of the polyhedron will refine the tagged control polygon to generate the desired curve
56
Graphics & Visualization: Principles & Algorithms Chapter 8
57
1 1
i i i − +
Graphics & Visualization: Principles & Algorithms Chapter 8
adjacent quads
intersect at the centroid of q.
then an n-reflected face could be used as the shared face between the two corresponding complexes.
58
Graphics & Visualization: Principles & Algorithms Chapter 8
A polygonal complex can be defined by 2 adjacent rows of faces It converges to its corresponding cubic B-spline curve The control vertices of this curve are also computed from the vertices of the
shared edges between the faces of the complex
construct a polygonal complex for each of these curves connect these complexes into
limit surface interpolates these curves.
59
Graphics & Visualization: Principles & Algorithms Chapter 8
60
A Doo-Sabin surface interpolating a crease A Catmull-Clark surface interpolating a C1 continuous curve