Document 7168435
Download
Report
Transcript Document 7168435
Surfaces
Chiew-Lan Tai
Reading
Required
Hills Section 11.11
Hearn & Baker, sections 8.11, 8.13
Recommended
Sections 2.1.4, 3.4-3.5, 3D Computer
Graphics, Watt
Surfaces
2
Mathematical surface
representations
Explicit
z = f(x,y) (a.k.a. “height field”)
What if the surface isn’t a function?
Implicit
g(x,y,z) = 0
x2 + y2 + z2 = 1
Parametric
S(u,v) = (x(u,v), y(u,v), z(u,v))
x(u,v) = r cos 2v sinu
y(u,v) = r sin 2v sinu
z(u,v) = r cos u
0≤u≤1, 0≤v≤1
Surfaces
3
Tensor product Bézier surfaces
Given a grid of control point Vij, forming a control net, construct
a surface S(u,v) by:
Surfaces
Each row in u-direction is control points of a curve Vi(u).
V0(u), …, Vn(u) at a specific u are the control points of a curve
parameterized by v (i.e. S(u,.v))
4
Tensor product Bezier surfaces, cont.
Let’s walk through the steps:
Which control points are interpolated by the surface? Only the 4 corner
Surfaces
points
5
Tensor product Bezier surfaces,
cont.
Writing it out explicitly:
Linear Bezier surface:
S (u, v) (1 v)[(1 u )V00 uV01 ]
v[(1 u )V10 uV11 ]
Quadratic Bezier surface?
Surfaces
6
Matrix form
For the case of cubic Bezier surface:
Surfaces
7
Tensor product B-spline surfaces
Like spline curves, we can piece together a sequence of Bezier
surfaces to make a spline surface. If we enforce C2 continuity
and local control, we get B-spline curves:
Surfaces
8
Tensor product B-spline surfaces
u
Surfaces
Use each row of B control points in u to generate Bezier control points in u.
Treat each row of Bezier control points in v direction as B-spline control points to
generate Bezier control points in v direction.
9
Tangent plane and surface normal
S
S
Surfaces
10
Partial Derivatives
S (u, v) [v 3
u
S (u, v) [3 v 2
v
Surfaces
v2
v
3u 2
2u
T
1]M BezierV M Bezier
1
0
u 3
2
u
T
2v 1 0]M BezierV M Bezier
u
1
11
Surface normal
Surfaces
S
S
S
S
12
Other construction methods
Surfaces
13
Rotational surfaces
(surface of revolution)
Rotate a 2D profile curve about an axis
Surfaces
14
Constructing surfaces of revolution
Given a curve C(u) in the yz-plane:
y
Profile curve, C(u)
z
x
Let Ry() be a rotation about the y-axis
Find: A surface S(u,v) obtained by applying Ry() on C(u)
S(u,v) = Ry(v) [0, Cy(u), Cz(u), 1]t
Surfaces
15
y
Surface of revolution
Profile curve on yz plane:
C(u) = ( 0, Cy(u), Cz(u) )
x
z
The surface S(u,v) obtained by rotating C(u) about
the y-axis is
S(u,v) = ( -Cz(u) sin(v), Cy(u), Cz(u) cos(v))
Surfaces
16
General sweep surface
Given a planar profile curve C(u) and a
general space curve T(v) as the trajectory,
sweep C(u) along the trajectory
How to orient C(u) as it moves along T(v)?
Surfaces
17
Orientating C(u)
Define a local coordinate frame at any point along the trajectory
The Frenet frame (t,n,b) is the natural choice
As we move along T(v), the Frenet frame (t,b,n) varies smoothly
(inflection points where curvature goes to zero needs special
treatment)
Surfaces
18
Sweep Surfaces
Orient the profile curve C(u) using the Frenet frame
of the trajectory T(v):
Put C(u) in the normal plane.
Place Oc at T(v).
Align xc of C(u) with b.
Align yc of C(u) with n.
Sweep surface
S(u,v) = T(v) + n(v)Cx(u) + b(v) Cy(u)
Surfaces
19
Variations
Several variations are possible:
Surfaces
Scale C(u) as it moves, possibly using length of T(v) as a
scale factor.
Morph C(u) into some other curve C’(u) as it moves along
T(v)
20
Summary
What to take home:
How to construct tensor product Bezier surfaces
How to construct tensor product B-spline surfaces
How to construct surfaces of revolution
How to construct sweep surfaces from a profile and a
trajectory curve with a Frenet frame
Surfaces
21
Subdivision Surfaces
What’s wrong with B-spline/NURBS surfaces?
Surfaces
22
Subdivision curves
Idea:
repeatedly refine the control polygon
P 0 P1 P 2
C lim P i
i
curve is the limit of an infinite process.
Surfaces
23
Subdivision curves
Surfaces
24
Chaikin’s algorithm
In 1974, Chaikin introduced the following “corner-
cutting” scheme:
Start with a piecewise linear curve
Repeat
Insert new vertices at the midpoints (the splitting
step)
Average two neighboring vertices (the average
step)
Averaging mask
(0.5, 0.5)
With this averaging mask, in the limit,
the resulting curve is a quadratic Bspline curve.
Surfaces
25
Local subdivision mask
Subdivision mask: ¼ (1, 2, 1)
Splitting and averaging:
Applying the step recursively, each vertex converges to a specific
point
With this mask, in the limit, the resulting curve is a cubic B-spline
curve.
Surfaces
26
General subdivision process
After each split-average step, we are closer to the limit
surface.
Can we push a vertex to its limit position without infinite
subdivision? Yes!
We can determine the final position of a vertex by
applying the evaluation mask. The evaluation mask for
cubic B-spline is 1/6 (1,4, 1)
Surfaces
27
DLG interpolating scheme (1987)
Algorithm:
splitting step introduces midpoints, and averaging step
only changes these midpoints
Dyn-Levin-Gregory scheme:
Surfaces
28
Building Complex Models
This simple idea can be extended to build
subdivision surfaces.
Surfaces
29
Subdivision surfaces
Iteratively refine a control polyhedron (or control mesh) to
produce the limit surface using splitting and averaging step:
There are two types of splitting schemes:
Surfaces
vertex schemes
face schemes
30
Vertex schemes
A vertex surrounded by n faces is split into n
subvertices, one for each face:
Doo-Sabin subdivision:
Surfaces
31
Face schemes
Each quadrilateral face is split into four subfaces:
Catmull-Clark subdivision:
Surfaces
32
Face scheme, cont.
Each triangular face is split into four subfaces:
Loop subdivision:
Surfaces
33
Averaging step
Averaging masks:
(n)Q Q1 Qn
Q
( n) n
Surfaces
34
Adding creases
Sometimes, a particular feature such as a crease should be
preserved.
we just modify the subdivision mask.
This gives rise to G0 continuous surfaces.
Surfaces
35
Creases
Here’s an example using Catmull-Clark
surfaces:
Surfaces
36
Spatial Object
Deformation
Object Deformation
Many objects are not rigid
jello, mud, gases, liquids
In animation, to give characterization to rigid
objects
stretch and squash
Two main classes of techniques
Surfaces
Geometric-based
Physically-based
38
Geometric Deformations
Deform the object’s geometry directly
control point / vertex manipulation
Deform the object’s geometry indirectly
Warp the space in which the object is
embedded (Spatial Deformation)
Main techniques
Surfaces
Nonlinear Deformation (Barr)
Free Form Deformation (FFD)
Curve-based Deformation
39
Spatial Deformation: General framework
Warps the space that the
mesh is embedded in
User inputs pairs of features
to guide the deformations
point pairs
local coordinate frames
continuous curves
Surfaces
40
Spatial Deformation: General framework
User inputs pairs of
features to guide the
deformations
Surfaces
discrete point pairs
local coordinate frames
Continuous curves
41
Spatial Deformation: General framework
Spatial deformation defines a mapping on the
space that surrounds the model
It can be performed on any models that use
point-based data
Deformation is propagated along the space
Surfaces
pixels in images
control points in spline surfaces
Vertices in mesh
point cloud data
May not be what the user expects
42
Freeform Deformation (FFD)
[Sederberg and Parry 1986]
Surfaces
43
Freeform Deformation (FFD)
[Sederberg and Parry 1986]
Define a volume using
parallelepiped lattice
Lattice defines a coordinate
system (S,T,U)
Modify the lattice points
Deformation of a point in the
space depends on its (s,t,u)
coordinates
Surfaces
44
Freeform Deformation (FFD)
The lattice defines a Bezier volume:
P( s, t , u ) p ijk Bi ( s ) B j (t ) Bk (u )
ijk
For each object point v,
determine its lattice
coordinates (s, t, u)
Alter the lattice points p ijk
New position of v is evaluated
as P(s,t,u)
Surfaces
45
Freeform Deformation (FFD)
[Sederberg and Parry 1986]
Surfaces
46
Freeform Deformation (FFD)
[Sederberg and Parry 1986]
Surfaces
47
Axial Deformation [Lazarus 1994]
Surfaces
48
Axial Deformation [Lazarus 1994]
Source curve R(u)
target curve T(u)
P
P’
y’(u)
Y(u)
R(u)
x(u)
s(u ) (P R (u )) x(u)
t (u ) (P R (u )) y(u)
Surfaces
T(u)
x’(u)
P' T(u) s(u) x' (u) t (u) y' (u)
49
Wires”
[Singh and Fiume 1998]
Defined curves “bound” on the surface
User deforms the mesh by editing the curves
The original and modified curves are feature pairs
Includes local rotation and scaling controls
Provide smooth composite deformation for multiple
curve features
Surfaces
50
Rendering Techniques
leading to geometry illusions
Texture Mapping
Add surface texture, or colour to a computer-
generated graphic or 3D model
Surfaces
texture map is applied (mapped) to the
surface of a shape
It is a rendering technique
52
Bump Mapping (normal mapping)
A perturbation to the surface normal at each pixel of
the object being rendered
look up in a height map and apply before the
illumination calculation is done
Normal map is the most commonly used technique
It is a rendering technique
w/o bump mapping
Surfaces
Bump map
With bump mapping,
same geometry but
rendered with
detailed normals
53
Displacement mapping
An alternative technique in contrast
to bump mapping
using a texture- or height map to
displace the actual geometric
position
Surfaces
Displacements are often along the
local surface normal
Can be modeling OR rendering
technique
54
Displacement mapping
Displacement maps
Surfaces
Displaced Surfaces
55
Alpha Mapping
Specify transparency level at each pixel of the object
being rendered
Surfaces
It is a rendering technique
56