B-Spline and Subdivision pSurfaces
Mirela Ben‐Chen
Images from: 3drender.com & sunflow.sourceforge.net
TodayToday
• B‐Spline surfacesB Spline surfaces– NURBS surfaces
• Subdivision surfaces– TheoryTheory– Zoo
• Recent trends– Non linear subdivision
2
Non linear subdivision– T‐Splines
Images from: 3drender.com , sunflow.sourceforge.net , www.tsplines.com
2
Reminder: Bezier & B‐Spline CurvesReminder: Bezier & B Spline Curves
Bezier CurveBezier Curve
Cubic curve, 4 control points:
Applet (Curves)
A l (B i f i )3
Applet (Basis functions)3
Reminder: Bezier & B‐Spline CurvesReminder: Bezier & B Spline Curves
B‐Spline CurveSp e Cu e
Decouple number of control points from degree ofDecouple number of control points from degree of curve
“Glue” a few degree p Bezier curves, with continuity conditions
Applet (Curve)
44
Reminder: Bezier & B‐Spline CurvesReminder: Bezier & B Spline Curves
B‐Spline Curvep
Building blocks: P2 P5
P6
n + 1 control points PiKnot vector U = { u0 , u1 , … , um }The degree p
P0
P1
P3 P4
6
P7
The degree pm, n, p satisfy m = n + p - 1
5
Applet (Basis functions)5
Reminder: Bezier SurfacesReminder: Bezier Surfaces
Bezier surface ‐ tensor product surface of BezierBezier surface tensor product surface of Bezier curves
Control points of one curve move along a set of Bezier curves
Applet
6
Applet
6
B‐Spline SurfacesB Spline Surfaces
A collection of Bezier patches with continuityA collection of Bezier patches, with continuity conditions
Decoupling the degree and the number of l icontrol points
77
B‐Spline SurfacesB Spline Surfaces
B‐Spline surface ‐ tensor product Sp e su face te so p oductsurface of B‐Spline curves
Building blocks:Control net, m + 1 rows, n + 1 columns: Pij, , ij
Knot vectors U = { u0 , u1 , … , uh }, V = { v0 , v1 , … , vk }Th d d f th d di ti
8
The degrees p and q for the u and v directions
8
Basis Functions
Cubic × Quadratic basis functions:
Basis Functions
Cubic × Quadratic basis functions:
99
Boundary Knots
In each direction the B‐spline curve can be
Boundary Knots
In each direction, the B spline curve can be closed, clamped or open
10
Closed Clamped Open
10
PropertiesProperties
• Non negativityNon negativity
• Partition of unity• Partition of unity
• Affine invariance
1111
PropertiesProperties
• If n = p m = q U = { 0 0 1 1}If n p, m q, U { 0,…,0,1,…,1} and V = {0,…,0,1,…,1} then
and S(u,v) is a Bezier surface
• S(u,v) is Cp-k continuous in the u( , )direction at a u knot of multiplicity k, and similar for v direction
12
,
12
PropertiesProperties
• Compact supportCompact support
• Local modification scheme– Moving Pij affects the surface only in the rectangle
1313
PropertiesProperties
• Local definitionLocal definition – In any rectangle the only non‐zero basis functions arebasis functions are
• Strong convex hull property– If then S(u,v) is in the convex hull of the control points Pij and
1414
Reminder: NURBS CurvesReminder: NURBS Curves
• B‐spline curves cannot represent exactlyB spline curves cannot represent exactly circles and ellipses
• Generalize to rational polynomials
p = 2 p = 3 p = 5 p = 10
p y
1515
Reminder: NURBS CurvesReminder: NURBS Curves
A weight per control point allows to change theA weight per control point allows to change the influence of a point on the curve, without moving the pointmoving the point
1616
NURBS SurfacesNURBS Surfaces
Add a weight for every control point of a B‐Add a weight for every control point of a Bspline surface, and normalize
Is not a tensor product patch
1717
NURBS Surface ExampleNURBS Surface Example
Control net NURBS Surface
18wij( ) = 10, wij( ) = 1
18
NURBS SurfacesNURBS Surfaces
1919
Problems with NURBSProblems with NURBS
• A single NURBS patch is either a topologicalA single NURBS patch is either a topological disk, a tube or a torus
• Must use many NURBS patches to modelpatches to model complex geometry
• When deforming a surface made of NURBS patches, cracks arise at the seams
20
patches, cracks arise at the seams
20
SubdivisionSubdivision “Subdivision defines a smooth curve or surface as the limit of a sequence of successive refinements”
2121
Subdivision RulesSubdivision Rules
• How the connectivity changesHow the connectivity changes
• How the geometry changesg y g– Old points
– New points
22
New points
22
Design Goals for Subd RulesDesign Goals for Subd Rules
• Efficiency
• Compact support
• Local definition Same properties NURBS have, but will work for
• Affine invariance any topology
• Simplicity
• Smoothness
23
Smoothness
23
An Example – Loop SchemeAn Example Loop Scheme
• Connectivity
1/8 β β
• Geometry3/8 3/8
1 kββ
β
β
1/8
1-kβ
β
• Analysis?– Does it converge?– Is the limit surface smooth?
24
– Any problems at extraordinary (valence != 6) vertices?
24
Parameterization of Subd SurfacesParameterization of Subd Surfaces
• B‐spline curves and surfaces are parameterizedp p
• To analyze subd schemes, we need a similar parameterization
• Which domain to use? A planar rectangle cannot workwork
• Solution: Use initial control mesh as the domain
2525
Parameterization of Subd SurfacesParameterization of Subd Surfaces
• Apply subd rules to initial mesh withoutApply subd rules to initial mesh, without updating the geometry
• Use resulting polyhedron h d ias the domain
2626
DefinitionsDefinitionsf j (|K|)
K The domain polyhedron
v A vertex of K|K| The surface of K as a subset of R3
pj (v) The control point corresponding to v after j subd steps
pj (v)to v after j subd steps
f j (|K|) The subdivided mesh after j subd steps, as a piecewise linear function on |K|
v
| |K
2727
ConvergenceConvergence
• The subd surfaces are a sequence of linearThe subd surfaces are a sequence of linear maps ‐ f i :|K|→ R3
• The subd scheme converges uniformly to a li i f i f if f ll 0limit function f if for all ε > 0, there exists n0 > 0, s.t. for all n > n0
2828
Smoothness of Surfaces1C1 continuity
A surface f :|K|→ R3 is C1 continuous if for every point f | | y px ∈ |K| there exists a regular parameterizationπ : D → f(Ux), over a unit disk D in the plane, where U is the neighborhood in |K| of xUx is the neighborhood in |K| of x.
A regular parameterization π is one that is continuously differentiable, one‐to‐one, and has a Jacobi matrix of , ,maximum rank.
29
Smoothness of SurfacesTangent Plane Continuity
A surface f :|K|→ R3 is tangent plane continuoustangent plane continuous at x ∈ |K| if and only if surface normals aresurface normals are defined in a neighborhood around x, and there exists a limit of normals at x
Tangent plane continuous
30
Tangent plane continuous, but not C1 continuous
Subdivision PropertiesSubdivision Properties
• How can we prove properties of a subdivisionHow can we prove properties of a subdivision scheme?
• Express the subdivision as a local matrix ioperation
• Prove properties (convergence, continuity, affine invariance, etc.) using eigen‐analysis.
31
, ) g g y
Subdivision Matrix
1/8
3/8 3/8
β
β
β
βSubdivision Matrix
• Look at the local neighborhood of an extraordinary
1/8
1-kββ β
β
vertex v
• Let Uj be the set of• Let Uj be the set of vertices in the 2‐ring neighborhood of v after jLoop subdivision stepsLoop subdivision steps
Step j Step j + 1
• Let pi j be the corresponding control points
W j+1 i l j
32
• We can compute pi j+1 using only pi
j
32
Subdivision MatrixSubdivision Matrix
• An extraordinary vertex of degree k hasAn extraordinary vertex of degree k has vertices in its 2‐ring neighborhood
k+3 k+2
2
2k+2
k+4 k+1
3
4
2
10
2k+3 2k+1
k 3k
33
• S depends on k 2k
Subdivision MatrixSubdivision Matrix
• Assume S has a full set of eigenvectors {ϕi} withAssume S has a full set of eigenvectors {ϕi} with corresponding real eigenvalues {λi}, arranged in non‐increasing order
• We can express p0 in terms of the eigenvectors of S:p p g
• Where:
34
Subdivision MatrixSubdivision Matrix
• Now we can express p j using only ai and theNow we can express p using only ai and the eigenvalues and eigenvectors of S:
35
• We used the fact:
Subdivision PropertiesSubdivision Properties
• Convergence:We need |λ | ≤ 1 for all i (andConvergence:We need |λi| ≤ 1 for all i (and only one eigenvalue can be exactly 1)
• Affine invariance: If for all A,B:
For affine invariance we need
→ λ = 136
→ λ0 = 1
Subdivision PropertiesSubdivision Properties
• Limit position:p
|λ |Since |λi| < 1 for all i > 0, we have:
In the limit the 2‐neighborhood of v is mapped to the same position: a0
We can compute the limit positions without recursively applying the subdivision
37
recursively applying the subdivision
Subdivision PropertiesSubdivision Properties
• Limit tangent plane:Limit tangent plane:
Since scheme is translation invariant, fix a0 = 0Assume λ = λ1 = λ2 > λ3Assume λ λ1 λ2 > λ3
For large enough j, the 2‐neighborhood of v is mapped to linear combinations of a and amapped to linear combinations of a1 and a2
a1 and a2 span the tangent plane of the limit surface
38
1 2 p g pat v
Piecewise Smooth SurfacesPiecewise Smooth Surfaces
• So far only considered closed smooth surfacesSo far, only considered closed smooth surfaces
• Surfaces have boundaries and creases
bdi i i h h ld h l f ll• A subdivision scheme should have rules for all the following cases:
39
InteriorSmooth boundary
Convex boundary
Concaveboundary
Crease
Subdivision ZooSubdivision Zoo
• Can be classified according to:Primal (face split)
Triangular meshes Quad Meshes
Approximating Loop(C2) Catmull‐Clark(C2)Approximating Loop(C ) Catmull Clark(C )
Interpolating Mod. Butterfly (C1) Kobbelt (C1)
• Many more
Dual (vertex split)
Doo‐Sabin, Midedge(C1)
40
• Many more... Biquartic (C2)
TerminologyTerminology
• Regular verticesRegular vertices– Tri meshes
• In the interior ‐ degree 6In the interior ‐ degree 6
• On the boundary – degree 4
– Quad meshesQuad meshes• In the interior ‐ degree 4
• On the boundary – degree 3
• Extraordinary vertices – all the rest
41
y
41
TerminologyTerminology
• Odd vertices – new vertices at current subdivision level
• Even vertices – vertices inherited from previous level
• Face vertices – odd vertices inserted in a face
• Edge vertices – odd vertices inserted on an edge
4242
Boundaries and CreasesBoundaries and Creases
• Special subdivision rules will be given for each Spec a subd s o u es be g e o eacscheme for the boundary vertices
• The boundary curve of the limit surface:– Should not depend on interior control vertices
• In case two surfaces will be merged along the boundary
– Should be C1 or C2
• Use boundary rules for edges tagged as creases
4343
Loop SchemeLoop Scheme
• Possible choices for βPossible choices for β– Original (by Loop):
– Or (by Warren):
Odd vertices Even vertices
4444
Loop SchemeLoop Scheme
• Limits for interior vertex v(using control points from any subd level j )– Position
– Tangents
Wh j f i {0 k 1} h i i hb f hWhere vi j for i = {0,..,k – 1} are the one ring neighbors of the
vertex v at subd level j, and pi j are the corresponding control
points
4545
Modified Butterfly SchemeModified Butterfly Scheme
• Interpolating schemeInterpolating scheme– Even vertices don’t move
Butterfly(not C1)(not C )
Modified ButterflyModified Butterfly
4646
Catmull‐Clark Quad SchemeCatmull Clark Quad Scheme
4747Can be modified to work on general polygons
Kobbelt SchemeKobbelt SchemeMain observation ‐ to compute a face control point:
• compute all edge control points
• compute face control points using the edge rule applied to edge control p f p g g pp gpoints on same level
4848
Scheme ComparisonScheme Comparison
• Subdividing a cube– Loop result is assymetric, because cube was triangulated first
– Both Loop and Catmull‐Clark are better then Butterfly (C2Both Loop and Catmull Clark are better then Butterfly (Cvs. C1 )
– Interpolation vs. smoothness
4949
Scheme ComparisonScheme Comparison
• Subdividing a tetrahedronSubdividing a tetrahedron– Same insights
Severe shrinking for approximating schemes– Severe shrinking for approximating schemes
5050
Scheme ComparisonScheme Comparison
• Spot the difference?• For smooth meshes with uniform triangle size, different
schemes provide very similar results• Beware of interpolating schemes for control polygons with• Beware of interpolating schemes for control polygons with
sharp features
5151
So Who Wins?So Who Wins?
• Loop and Catmull‐Clark best when interpolation is not required
• Loop best for triangular meshesC t ll Cl k b t f d h• Catmull‐Clark best for quad meshes– Don’t triangulate and then use Catmull‐Clark
5252
The Dark Side of Subd SurfacesThe Dark Side of Subd Surfaces
• Problems with curvature continuityProblems with curvature continuity– Requires either very large support, or forces 0 curvature at extraordinary verticescurvature at extraordinary vertices
– Generates ripples near vertices of large degree
5353
The Dark Side of Subd SurfacesThe Dark Side of Subd Surfaces
• Decreased smoothnessDecreased smoothness with degree– For large degrees, third g g ,eigenvalue approaches second and first eigenvalueseigenvalues
– Generates creases
• Can fix by modifying scheme
54
– Creates more ripples54
Beyond Subdivision SurfacesBeyond Subdivision Surfaces
• Non‐linear subdivision [Schaefer et al 2008]Non linear subdivision [Schaefer et al. 2008]Idea: replace arithmetic mean with other function
de Casteljau withde Casteljau with
de Casteljau with j
5555
Beyond Subdivision SurfacesBeyond Subdivision Surfaces
• T‐Splines [Sederberg et al 2003]T Splines [Sederberg et al. 2003]– Allows control points to be T‐junctions
Can use less control points– Can use less control points
– Can model different topologies with single surface
NURBS T‐Splines
5656NURBS T‐Splines
Beyond Subdivision SurfacesBeyond Subdivision Surfaces
• How do you subdivide a teapot?How do you subdivide a teapot?
5757
Images, Applets and Ideas From:Images, Applets and Ideas From:• http://www.vis.uni‐stuttgart.de/~kraus/LiveGraphics3D/cagd/
• http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/
• http://ibiblio.org/e‐notes/Splines/Intro.htm
• http://3drender.com
• http://sunflow.sourceforge.netp // g
• http://www.tsplines.com
• http://www.cs.utah.edu/gdc/projects/alpha1/help/man/html/model_repo/model_teapot/model_teapot.html
• http://en wikipedia org/wiki/Non uniform rational B spline• http://en.wikipedia.org/wiki/Non‐uniform_rational_B‐spline
• http://slipperypixels.com/
• http://www.mathworks.com/matlabcentral/fileexchange/24942
• http://graphics.stanford.edu/~dzorin/multires/butterfly/index.html
• “Subdivision for Modeling and Animation” SIGGRAPH00 Course Notes
• “Nonlinear Subdivision Through Nonlinear Averaging”, Schaefer et al., 2008• The NURBS book, by Piegl & Tiller
5858
Top Related