1
Texture Mapping
Texture Mapping
Lecture 13
CPSC 478/578
Spring 2005
NOTES
Assignment # 2
due Feb. 28 11:59pm
TA OFFICE HOURS THIS WEEK
MONDAY 79 pm, Friday 25
Quiz # 1
Feb. 23, 2005
Problems/short answer
Covers material up to the end of
lecture
Feb. 14, 2005
Feb. 14, 2005
Allowed 8.5x11 page of notes
±
Reading for this week: Text, Chapter 10
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
−
−
−
+
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
1
0
1
0
0
0
)
/(
2
)
/(
0
0
0
0
0
0
0
/
c
c
c
f
n
n
f
f
n
f
n
s
s
s
s
z
y
x
z
z
z
z
z
z
z
z
f
aspect
f
w
z
y
x
Revised Perspective Transformation
1
)
/(
2
)
/(
)
(
/
)
/
)(
/
(
=
−
+
−
+
−
=
−
=
−
=
s
c
far
near
near
far
far
near
near
far
s
c
c
s
c
c
s
w
z
z
z
z
z
z
z
z
z
z
z
fy
y
z
x
aspect
f
x
Planes remain planar:
0
'
'
'
'
0
=
+
+
+
=
+
+
+
d
z
c
y
b
x
a
d
cz
by
ax
s
s
s
c
c
c
Filling the Zbuffer
±
Because planes remain plane, we can
bilinearly interpolate z
s
at vertices
down and across scan lines
Z2
Z1
Z3
Z1+
Z3
Z3
Z2
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
2
Note
Interpolating depths is accurate
 because the depth coordinate was
adjusted by a division by zc, for constant
ys, change in z is a constant for
∆
x
Interpolating intensity and normals is an
approximation because they were not
divided by z
c
.
Why don’t we care: because linear
variation of intensity and normals was an
approximation in the first place.
'
/
)
'
'
'
(
c
d
y
b
x
a
zs
s
s
+
+
=
How do we compute shadows in
the pipeline?
Key insight:
o
Computing shadows is the same as
computing an image from the light source
1.Make a depth map of the points visible to the
light Use the same transformations,
clippings and projections as from the eye.
2. After computing depths from the real eye
point, unproject each point, and project into
into the light source depth buffer.
http://wwwsop.inria.fr/reves/personnel/Marc.Stamminger/psm/
View from light
Depth from light
Shadows in another
view
Precomputing phase
1.0 for each light source
1.1 make light point be center of projection
1.2 calculate transformation matrices
1.3 transform object using light point matrices
1.4 render object using zbuffer  lighting is skipped
1.5 save computed zbuffer (depth info)
Object rendering phase
2.0 make eye point be center of projection
3.0 recalculate transformation matrices
4.0 transform object using eye point matrices
5.0 render object using zbuffer
5.1 for every pixel visible from eye
5.1.1 transform world point corresponding to pixel to shadow
coordinates
5.1.2 for every light source
5.1.2.1 sample saved zbuffer for that light
5.1.2.2 if shadow coordinates < zbuffer value
5.1.2.2.1 pixel is in shadow
http://www.cs.wpi.edu/~matt/courses/cs563/talks/shadow/shadow.html
Shadow Buffer Algorithm
3D Rendering Pipeline
(for direct
illumination)
3D Primitives
Modeling
Transformation
Modeling
Transformation
Projection
Transformation
Transformation
Clipping
Clipping
Lighting
Image
Viewport
Transformation
Viewport
Transformation
Scan
Conversion
Scan
Conversion
2D Image Coordinates
3D Modeling Coordinates
3D World Coordinates
3D Camera Coordinates
2D Screen Coordinates
2D Screen Coordinates
Viewing
Transformation
Viewing
Transformation
3D World Coordinates
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '05
 HollyRushmeier
 Computer Graphics, Texture mapping, Bump mapping, Displacement mapping, texture coordinates, texture coordinate

Click to edit the document details