幻灯片 1 - Zhejiang University

Download Report

Transcript 幻灯片 1 - Zhejiang University

Parameterization of Catmull-Clark
Subdivision Surfaces
CAI Hongjie | Nov 19, 2008
Catmull-Clark Subdivision Surface
parameterization
Motivations
• Future GPU pipeline
Vertex
Processing

Patch
Assembly
tessellation
Tessellation
Pixel
Processing
Motivations
• Displacement Mapping
Adaptive tessellation is needed to produce micropolygons
Papers List
• J. Stam. 1998
Exact Evaluation of Catmull-Clark Subdivision
Surfaces at Arbitrary Parameter Values
• C. Loop, S. Schaefer. 2008
Approximate Catmull-Clark Subdivision Surfaces
with Bicubic Patches
• H. Biermann, A. Levin, D. Zorin. 2000
Piecewise Smooth Subdivision Surfaces with
Normal Control
Origin of Catmull-Clark Surface
• E. Catmull & J. Clark. 1978
Recursively Generated B-spline Surface on
Arbitrary Topological Meshes
• D. Doo. 1978
A Subdivision Algorithm for Smoothing down
Irregularly Shaped Polyhedrons
• D. Doo & M. Sabin. 1978
Analysis of the Behavior of Recursive Division
Surfaces Near Extraordinary Points
Knot Insertions of Uniform Bicubic B-Spline
u5
u4
u3
4
u4
u5
u6
u6
u7
4
P (u, v)   Pij Ni ,4 (u) N j ,4 (v), ui  v j  1,
i 1 j 1
u  [u4 , u5 ]  [0,1], v  [v4 , v5 ]  [0,1].
5
v7
v6
v5
v4
5
P (u, v)   Pij Ni ,4 (u) N j ,4 (v), ui  v j  0.5,
i 1 j 1
u  [u4 , u6 ]  [0,1], v [ v4 , v6 ]  [0,1].
 1

3
1 3 2

( N1,4 (t ), N 2,4 (t ), N 3,4 (t ), N 4,4 (t ))  (t , t , t ,1) 
 3
6

 1
t  [t4 , t5 ]  [0,1]
v3
3
3
6
3
0
3
4
1
1

0
0

0
v6
v5
v4
Generating Control Points
P42
P41
P51
P55
P31
P32
P21
P11
P33
Face Point
P34
Edge Point
Vertex Point
P22
P21
P22
P11
P44
P43
P23
P24
P21
P12
P13
P14
Masks for New Points
Face Point:
 P21
1/ 4 1/ 4 
P11  
   P
1/
4
1/
4


 11
P22 
P12 
Edge Point:
 P21
1/16 3/ 8 1/16 
P12  
   P
1/16
3/
8
1/16


 11
Vertex Point:
 P31
1/ 64 3 / 32 1/ 64 
P22  3 / 32 9 /16 3 / 32    P21


 P11
1/ 64 3 / 32 1/ 64 
Vertex Point of valence n:
cn b
bn
cn
n
cn
an
bn
bn
P22
P12
P23 
P13 
P32
P22
P12
P33 
P23 
P13 
7
an  1 
4n
3
bn 
2n 2
1
cn 
4n 2
Continuity Around Extraordinary Point
P 0  (v, e1 , f1 ,..., en , f n )T
P
i 1
 SP , P  S P =T  TP
i
 an bn
d d

S f
f


 f
f
d  3 / 8,
m
m
0
-1
m
cn 
e e
e e 
f f
0 0


0 0
f f 
e  1/16, f  1/ 4
cn
  diag (1, 2 , 3 ,
bn
bn
f2 e
2
e3
0
f3
e4
v
en
, 2 n 1 ), i  1, i  2.
P   (v  , v  , , v  )T ,
1
v 
(n2 , 4,1, 4,1,
n(n  5)
, 4,1)  (v, e1, f1,
, en , f n ) T .
e1
fn
f1
Proceedings of SIGGRAPH 1998
Exact Evaluation of Catmull-Clark
Subdivision Surfaces at
Arbitrary Parameter Values
Jos Stam
Jos Stam
• Curriculum vitae

89-95
95-96
96-97
97-06

06-now Autodesk



University of Toronto
INRIA
VTT
Alias | Wavefront
• Awards

SIGGRAPH Computer Graphics Achievement Award

Academy Award for Technical Achievement (2005)

Academy Award for Technical Achievement (2008)
Neighborhood of Extraordinary Points
Mathematical Setting
C 0  (c0,1 , c0,2 ,..., c0, K )T , K  2 N  8,
C1  (c1,1 , c1,2 ,..., c1, K )T , C1  (C1T , c1, K 1 , c1, K  2 ,..., c1, K 9 )T
C1  AC0 , Cn  ACn1  AnC0 ; C1  AC0 , Cn  ACn1  AAn1C0 .
S
A
 S11
0 
,
S12 
S
A   S11
 S 21
0 
S12 
S 22 
Extended Subdivision Matrices
c
e

b

S11   e
e

b
e

b
a
b
0 0
0 0
e
d
d
0 0
0 0
c
b
a
b
c
0 0
0
0 d
d
e
0 0 d
d
e
0 0
c b
e d
b
0
c
0
0 0
0 0
0
0

0

0
S21  0

0
0

0
0

0
0
0
0
0
0
0
0
0
0
0
0
f
d
f
e
0
e
f
d
0
0
0
e
0
0
0
0
0
0
0
0
e
f
0
e
f
d
f
0
d
f
e
0
f
0
0
0
0
f
0
0
0
0
9
3
, b
16
32
1
3
c ,d 
64
8
1
1
e , f 
16
4
a

c b c

0 e e



0 c b


,
S

12

0 0 e

0 0 0



0 0 0

0 0 0
 7(2 N 1)

0 0
a
d
0 b c 0
0 0 0 0 
c 0 0 0

e 0 0 0
0 e e 0

0 c b c
0 0 e e 

f

e



0



0

, S22   0



e

0



0

0
 9(2 N 1)

f
d
f
e
0
e
f
d
0
0
0
e
f
e
0
0
0
0
0
0
0
e
0
0
0
f
0
0
0
0
f
0
0
0
0
0
d
f
e
0
0
e
f
d
f
0
0 
0

0
0

0
0

e
f 
Domain Branching
• Control Points
Bk ,n  Pk Cn , k  1,2,3.
• Branching Surfaces
sk ,n (u, v)  BkT,n b(u, v)  C nT PkT b(u, v)
(u, v)  [0,1]  [0,1].
b(u, v)  (b1 (u, v), b2 (u, v),
, b16 (u, v))T .
bi (u, v)  N (i 1)%4,4 (u ) N (i 1) / 4,4 (v), i  1,...,16.
• Branching Domain
1n  [
1
1
1
1
1
1
1
1
1
1
n
n
,
]

[0,
],


[
,
]

[
,
],


[0,
]

[
,
]
2
3
2n 2n 1
2n
2n 2n 1
2n 2n 1
2n
2n 2n 1
t1,n (u, v)  (2n u 1,2n v), t2,n (u, v)  (2n u 1,2n v 1), t3,n (u, v)  (2n u,2n v 1)
s(u, v) |n  sk ,n (tk ,n (u, v)), (u, v) [0,1] [0,1]
k
Eigen Analysis
• Branching surfaces
sk ,n (u, v)  BkT,nb(u, v)  CnT PkT b(u, v), k  1,2,3. n  1,2,...
• Eigen structure of subdivision surface
A  V V 1
Cn  AAn-1C0  AV n1V 1C0  AV n1Cˆ 0 ,
Cˆ 0  V 1C0  ( p1 , p2 ,..., p2 N 8 )T
s (u, v)  Cˆ T n1 ( P AV )T b(u, v)  Cˆ T n 1 x(u, v, k ),
k  1, 2,3. n  1, 2,...
k ,n
0
k
0
• Basis functions
s(u, v) |n 
k
2 N 8
 ( )
i 1
i
n 1
2 N 8
xi (t k ,n (u, v), k ) pi =  i (u, v) pi
i 1
basis functions i (u, v) |n  (i ) n 1 xi ( t k ,n (u, v), k ), i  1,..., 2 N  8.
k
i (u / 2, v / 2)  ii (u, v)
Illustrations of Basis Functions
• The last seven functions
(2 N  2 ,..., 2 N 8 )  (
1 3 3 1 3 1 3 1 3 2 1 3 1 3 1 2 3
u v , u , u v, u v , v , uv , u v )
36
6
6
2
6 6
2
Results
More Results
ACM Transactions on Graphics, 2008
Approximating Catmull-Clark
Subdivision Surfaces with
Bicubic Patches
Charles Loop & Scott Schaefer
Authors
• Charles Loop

University of Utah, Master, 1987
“Smooth Subdivision Surfaces based on Triangles”


University of Washington, PhD,1992
Microsoft Corporation
• Scott Schaefer



Rice University, Master, 2003
Rice University, PhD, 2006
Texas A&M University, C.S.
Assistant Professor
Drawbacks of Stam’s Method
• Can’t evaluate patches with more than one
extraordinary points
• One level subdivision is needed which increases
memory and transfer bandwidth
• Unfitted for animation
Geometry Patches
4
4
P (u, v)   Pij Ni ,4 (u) N j ,4 (v),
i 1 j 1
3
3
B(u, v)   bij Bi3 (u) Bi3 (v)
i 0 j 0
(u, v) [0,1]  [0,1]
P41
P31
P21
P11
P42
P32
P43
P33
P44
P34
b30
b20
b10
P22
P12
P23
P13
P24
P14
b00
b31
b32
b21
b22
b11
b12
b13
b02
b03
b01
b33
b23
Exchange of Basis functions
 1 3 3

3 6 3
1 3 2
( N1,4 (t ),..., N 4,4 (t ))  (t , t , t ,1)  
 3 0 3
6

1 4 1
4
1
1


0 1 3
0
 ( B0 (t ),..., B33 (t ))  
0
0 6


0
0
t  [0,1]
4 1 0

4 2 0
2 4 0

1 4 1
4
P (u, v)   Pij Ni ,4 (u ) N j ,4 (v)
i 1 j 1
1

1 0
3
3
 ( B0 (u ),..., B3 (u )) 
6 0

0
3
3
4
4
2
1
1
2
4
4
  bij Bi3 (u ) B 3j (v)  B(u, v)
i 0 j 0
0   P11
0   P21
0   P31

1   P41
P12
P22
P32
P42
P13
P23
P33
P43
P14  1
P24  1  4
 
P34  6 1
 
P44  0
0
4
2
0
0
2
4
0
0   B03 (v) 


1   B13 (v) 
4   B23 (v) 


1   B33 (v) 
Masks for Bicubic Uniform B-Spline
• Interior point:
• Edge point:
• Corner point:
1 2 1

9  4 2
2 1 
1 
  8 4 
18
 2 1 
1 4 1 
1 
  4 16 4 
36
1 4 1 
Generalized Masks
• Interior point:
• Edge point:
2 1
1

n  5  n 2
 2 1
1
  2n 4 
2n  10
 2 1 
• Corner point:
4
1

n(n  5)
1
4
1
4
n2
4
1
Tangent Patches
2
3
B(u, v) 2 3 2
3
  Bi (u ) B j (v)3(bi 1, j  bij )   Bi2 (u ) B3j (v)uij
u
i 0 j 0
i 0 j 0
3
2
B(u, v) 3 2 3
2
  Bi (u ) B j (v)3(bi , j 1  bij )   Bi3 (u ) B 2j (v)vij
v
i 0 j 0
i 0 j 0
As geometry patches can only meet with C0, so boundaries
of tangent patches must be modified
Masks for Tangent Patch Corners
e1
f0
f1
u00
e2
0
e0
fn-1
en-1
1
cos( / n)
ei  ( 
) cos(2 i / n),
2
n n 4  cos ( / n)
fi 
1
n 4  cos ( / n)
2
) cos((2 i   ) / n), i  0,1,..., n  1.
Tangent Patch Edges
Purpose: G1 smooth along
boundary curve u(t)
2
u(t )   Bi2 (t )ui 0
i 0
3
3
v(t )   B (t ) vi 0 , vˆ (t )   Bi3 (t ) vˆ i 0
i 0
3
i
i 0
((1  t )c0  tc 1 )u(t )  ( v(t )  vˆ (t )) / 2
ci  cos(2 / ni ), i  0,1.
v10  (2c0u10  c1u 00 ) / 3  x,
vˆ 10  (2c0u10  c1u 00 ) / 3  x,
x  3(b11  b10 ).
Results
More Results
Comparisons with other Methods
two subdivisions
PN Triangles: Valchos et al.2001
PCCM: Peters, J. 2000
More Comparisons
one subdivision
Proceedings of SIGGRAPH 2000
Piecewise Smooth Subdivision
Surfaces with Normal Control
Henning Biermann Adi Levin
New York University
Tel Aviv University
Denis Zorin
New York University
Problems of Previous Subdivision Rules
• No suitable C1 rules for boundary
• Folds may result on concave corners
Eigen analysis
P 0  (v , e1 , f1 ,..., en , f n )T , P i 1  SP i
Sxi  i xi , i  1,..., 2n  1.
f2 e
2
e3
f1
f3
1  1, xi  (1,1,...,1) ;
T
2  3 ; i  2  1, i  4.
e4
2 n 1
v
en
P   ai xi , ai  (ai ,1 , ai ,2 , ai ,3 ).
0
e1
fn
i 1
2 n 1
P  S P   im ai xi ,
m
m
0
i 1
P   a1 x1  (a1 , a1 ,..., a1 )T .
2 n 1
P  a1
m
j
P  a1
m
j

 ( x a  x a )   im xij ai
m
2
j
2 2
j
3 3
i 4
2 n 1
2m ( x2j a2  x3j a3 )   im xij ai
i 4
x2j a2  x3j a3
 j
, j  2,..., 2n  1.
j
x2 a2  x3 a3
Tagged Meshes
• Edge tags: edges are tagged as crease edges to
control the behavior of meshes
• Vertex tags



Crease vertex
Corner vertex
Dart vertex
• Sector tags


Convex sector
Concave sector
Subdivision Rules
• Masks for vertex points



Untagged and dart vertices: standard
Crease vertex: 1/8 —— 3/4 ——1/8
Corner vertex: interpolated
bn
bn
cn
bn
an
cn
bn
• Masks for face points: standard
an  1 
7
4n
3
2n 2
1
cn  2
4n
bn 
Subdivision Rules
• Masks for Edge point



Untagged edge: standard
Crease edge: midpoint
One end tagged edge:
1
16
1
16

3

4
1
16
1
16
3 1
8 4
 k  2 / k (dart);  / k (crease);
 ( k )   cos  k
  / k ( corner).

Flatness and Normal Modification
• Flatness modification for concave corners
P 0  (1  s) P 0  s(a1 x1  a2 x2  a3 x3 )
0  s  1, flatness parameter
• Normal modification
Pˆ 0  P 0  t ((a2  a2 ) x2  (a3  a3 ) x3 )
0  t  1.
ai  ai  (ai , N)N, N is a prescribed normal direction.
Results
Normal Interpolation
More Results
Thanks!