Subdivision Surfaces and Mesh Data Structures
Subdivision Surfaces and Mesh Data Structures
Subdivision Surfaces and Mesh Data Structures
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Subdivision</strong> <strong>Surfaces</strong><br />
Jason Lawrence<br />
CS 4810: Graphics<br />
Acknowledgment: slides by Misha Kazhdan, Allison Klein, Tom Funkhouser,<br />
Adam Finkelstein <strong>and</strong> David Dobkin<br />
Monday, November 19, 12
<strong>Subdivision</strong><br />
• How do you make a smooth curve?<br />
Monday, November 19, 12<br />
We want to “smooth out” severe angles<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
<strong>Subdivision</strong><br />
• How do you make a smooth curve?<br />
Monday, November 19, 12<br />
We want to “smooth out” severe angles<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
<strong>Subdivision</strong><br />
• How do you make a smooth curve?<br />
Monday, November 19, 12<br />
We want to “smooth out” severe angles<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
<strong>Subdivision</strong> <strong>Surfaces</strong><br />
• Coarse mesh & subdivision rule<br />
oDefine smooth surface as limit of<br />
sequence of refinements<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Key Questions<br />
• How to subdivide the mesh?<br />
oAim for properties like smoothness<br />
• How to store the mesh?<br />
oAim for efficiency of implementing subdivision rules<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
General <strong>Subdivision</strong> Scheme<br />
• How to subdivide the mesh?<br />
Two parts:<br />
»Refinement:<br />
–Add new vertices <strong>and</strong> connect (topological)<br />
»Smoothing:<br />
–Move vertex positions (geometric)<br />
Monday, November 19, 12
Loop <strong>Subdivision</strong> Scheme<br />
• How to subdivide the mesh?<br />
Refinement:<br />
»Subdivide each triangle into 4 triangles by<br />
splitting each edge <strong>and</strong> connecting new vertices<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Loop <strong>Subdivision</strong> Scheme<br />
• How to subdivide the mesh:<br />
Refinement<br />
Smoothing:<br />
»Existing Vertices: Choose new location as weighted<br />
average of original vertex <strong>and</strong> its neighbors<br />
Monday, November 19, 12<br />
Existing vertex being moved<br />
from one level to the next<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Loop <strong>Subdivision</strong> Scheme<br />
• General rule for moving existing interior vertices:<br />
What about vertices that have more<br />
What about vertices that have more<br />
Or less than 6 neighboring faces?<br />
Or less than 6 neighboring faces?<br />
New_position = (1 - kβ)original_position + sum(β * each_original_vertex)<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Loop <strong>Subdivision</strong> Scheme<br />
• General rule for moving existing interior vertices:<br />
What about vertices that have more<br />
What about vertices that have more<br />
Or less than 6 neighboring faces?<br />
Or less than 6 neighboring faces?<br />
New_position 0≤ β ≤1/k: = (1 - kβ)original_position + sum(β * each_original_vertex)<br />
Monday, November 19, 12<br />
• As β increases, the contribution from adjacent<br />
vertices plays a more important role.<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Where do existing vertices move?<br />
• How to choose β?<br />
oAnalyze properties of limit surface<br />
oInterested in continuity of surface <strong>and</strong> smoothness<br />
oInvolves calculating eigenvalues of matrices<br />
Monday, November 19, 12<br />
» Original Loop<br />
» Warren
Loop <strong>Subdivision</strong> Scheme<br />
• How to subdivide the mesh:<br />
Refinement<br />
Smoothing:<br />
»Inserted Vertices: Choose location as weighted average<br />
of original vertices in local neighborhood<br />
Monday, November 19, 12<br />
New vertex being inserted<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Boundary Cases?<br />
• What about extraordinary vertices <strong>and</strong> boundary<br />
Monday, November 19, 12<br />
edges?:<br />
oExisting vertex adjacent to a missing triangle<br />
oNew vertex bordered by only one triangle<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Boundary Cases?<br />
• Rules for extraordinary vertices <strong>and</strong> boundaries:<br />
Monday, November 19, 12<br />
1/2 1/2 1/8 3/4 1/8<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Loop <strong>Subdivision</strong> Scheme<br />
Monday, November 19, 12<br />
Pixar
Loop <strong>Subdivision</strong> Scheme<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes<br />
Monday, November 19, 12<br />
Pixar
Loop <strong>Subdivision</strong> Scheme<br />
Monday, November 19, 12<br />
Geri’s Game, Pixar
<strong>Subdivision</strong> Schemes<br />
• There are different subdivision schemes<br />
oDifferent methods for refining topology<br />
oDifferent rules for positioning vertices<br />
»Interpolating versus approximating<br />
Monday, November 19, 12<br />
Zorin & Schroeder, SIGGRAPH 99 , Course Notes
<strong>Subdivision</strong> Schemes<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Key Questions<br />
• How to refine the mesh?<br />
oAim for properties like smoothness<br />
• How to store the mesh?<br />
oAim for efficiency for implementing subdivision rules<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12
<strong>Subdivision</strong> Smoothness<br />
To determine the smoothness of the subdivision:<br />
• Repeatedly apply the subdivision scheme<br />
• Look at the neighborhood in the limit.<br />
Monday, November 19, 12<br />
Computing infinitely many iterations is<br />
computationally prohibitive!!!<br />
…
<strong>Subdivision</strong> Matrix<br />
• Compute the new positions/vertices as a linear<br />
Monday, November 19, 12<br />
combination of previous ones.<br />
p 5<br />
p 4<br />
p 6<br />
p 0<br />
p 3<br />
p 1<br />
p 4’ p 3’<br />
p2 p5’ p0’ p 6’<br />
p 1’<br />
p 2’
<strong>Subdivision</strong> Matrix<br />
• Compute the new positions/vertices as a linear<br />
Monday, November 19, 12<br />
combination of previous ones.<br />
p 5<br />
p 4<br />
p 6<br />
p 0<br />
p 3<br />
p 1<br />
0<br />
B<br />
@<br />
p 0 0<br />
p 0 1<br />
p 0 2<br />
p 0 3<br />
p 0 4<br />
p 0 5<br />
p 0 6<br />
1<br />
C<br />
A<br />
= 1<br />
16<br />
0<br />
B<br />
@<br />
<strong>Subdivision</strong> Matrix<br />
p2 p5’ p0’ 10 1 1 1 1 1 1<br />
6 6 2 0 0 0 2<br />
6 2 6 2 0 0 0<br />
6 0 2 6 2 0 0<br />
6 0 0 2 6 2 0<br />
6 0 0 0 2 6 2<br />
6 2<br />
p4’ 0 0 2<br />
p3’ 2 6<br />
p 6’<br />
p 1’<br />
p 2’<br />
1 0<br />
C B<br />
C B<br />
C B<br />
C B<br />
C B<br />
C B<br />
C B<br />
C B<br />
A @<br />
p0<br />
p1<br />
p2<br />
p3<br />
p4<br />
p5<br />
p6<br />
1<br />
C<br />
A
<strong>Subdivision</strong> Matrix<br />
• Compute the new positions/vertices as a linear<br />
combination of previous ones.<br />
• To find the limit position of p 0, repeatedly apply the<br />
Monday, November 19, 12<br />
subdivision matrix.<br />
0<br />
B<br />
@<br />
p (n)<br />
0<br />
p (n)<br />
1<br />
p (n)<br />
2<br />
p (n)<br />
3<br />
p (n)<br />
4<br />
p (n)<br />
5<br />
p (n)<br />
6<br />
1<br />
C<br />
A<br />
= 1<br />
16<br />
0<br />
B<br />
@<br />
10 1 1 1 1 1 1<br />
6 6 2 0 0 0 2<br />
6 2 6 2 0 0 0<br />
6 0 2 6 2 0 0<br />
6 0 0 2 6 2 0<br />
6 0 0 0 2 6 2<br />
6 2 0 0 2 2 6<br />
1n<br />
0<br />
C<br />
A<br />
B<br />
@<br />
p0<br />
p1<br />
p2<br />
p3<br />
p4<br />
p5<br />
p6<br />
1<br />
C<br />
A
<strong>Subdivision</strong> Matrix<br />
• Compute the new positions/vertices as a linear<br />
combination of previous ones.<br />
• To find the limit position of p 0, repeatedly apply the<br />
subdivision matrix.<br />
0<br />
B<br />
@<br />
p (n)<br />
0<br />
p (n)<br />
1<br />
p (n)<br />
2<br />
p (n)<br />
1<br />
C<br />
A<br />
= 1<br />
16<br />
0<br />
B<br />
@<br />
10 1 1 1 1 1 1<br />
6 6 2 0 0 0 2<br />
6 2 6 2 0 0 0<br />
6 0 2 6 2 0 0<br />
6 0 0 2 6 2 0<br />
6 0 0 0 2 6 2<br />
6 2 0 0 2 2 6<br />
1n<br />
0<br />
If, after a change of basis we have M=A-1DA, where D is a<br />
diagonal matrix, then:<br />
3<br />
p (n)<br />
4<br />
p (n)<br />
5<br />
p (n)<br />
p3<br />
p4<br />
M p5<br />
p6<br />
6<br />
n =A-1DnA, Since D is diagonal, raising D to the n-th power just amounts to<br />
raising each of the diagonal entries of D to the n-th power.<br />
Monday, November 19, 12<br />
C<br />
A<br />
B<br />
@<br />
p0<br />
p1<br />
p2<br />
1<br />
C<br />
A
Key Questions<br />
• How to refine the mesh?<br />
oAim for properties like smoothness<br />
• How to store the mesh?<br />
oAim for efficiency for implementing subdivision rules<br />
Monday, November 19, 12<br />
Zorin & Schroeder<br />
SIGGRAPH 99<br />
Course Notes
Polygon <strong>Mesh</strong>es<br />
• <strong>Mesh</strong> Representations<br />
oIndependent faces<br />
oVertex <strong>and</strong> face tables<br />
oAdjacency lists<br />
oWinged-Edge<br />
Monday, November 19, 12
Independent Faces<br />
• Each face lists vertex coordinates<br />
Monday, November 19, 12
Independent Faces<br />
• Each face lists vertex coordinates<br />
ûRedundant vertices<br />
ûNo topology information<br />
Monday, November 19, 12
Vertex <strong>and</strong> Face Tables<br />
• Each face lists vertex references<br />
Monday, November 19, 12
Vertex <strong>and</strong> Face Tables<br />
• Each face lists vertex references<br />
üShared vertices<br />
Monday, November 19, 12
Vertex <strong>and</strong> Face Tables<br />
• Each face lists vertex references<br />
üShared vertices<br />
ûStill no topology information<br />
Monday, November 19, 12
Adjacency Lists<br />
• Store all vertex, edge, <strong>and</strong> face adjacencies<br />
Monday, November 19, 12
Adjacency Lists<br />
• Store all vertex, edge, <strong>and</strong> face adjacencies<br />
üEfficient topology traversal<br />
Monday, November 19, 12
Adjacency Lists<br />
• Store all vertex, edge, <strong>and</strong> face adjacencies<br />
üEfficient topology traversal<br />
ûExtra storage<br />
ûVariable size arrays<br />
Monday, November 19, 12
Partial Adjacency Lists<br />
• Can we store only some adjacency relationships<br />
<strong>and</strong> derive others?<br />
?<br />
Monday, November 19, 12<br />
2<br />
?<br />
?<br />
?<br />
3<br />
3<br />
2<br />
3
Winged Edge<br />
• Adjacency encoded in edges<br />
oAll adjacencies in O(1) time<br />
oLittle extra storage (fixed records)<br />
oArbitrary polygons<br />
Monday, November 19, 12
Winged Edge<br />
• Example:<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7
Winged Edge<br />
• Example: Find CCW edges adjacent to v 2.<br />
Monday, November 19, 12<br />
e 1<br />
e 2<br />
e 3<br />
e 4<br />
e 5<br />
e 6<br />
e 7