



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Interactive Computer Graphics; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2009;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




We’ll look at a couple of examples today
We want to add surface texture to an object
This is
not
directly supported by OpenGL
original normal
from bump map
n
n
n
Displacement mapping
surface position
appropriate reflected direction in the cube map
Fairly easy to generate
But not totally accurate
which the images were taken
reflection vector
r
viewing direction
u
s t
r
Example: compute latitude/longitude angles and scale to [0,1]
image plane
reflected rays
in a texture map
s
t
) and emit as texture coordinate
Texture map serves as look-up table for our shading equation
color to shade given point
s t
s
t
max( ,(
(max( ,
n
a
a
d
d
s
s
k I
k I
k I
n L
r v
where
n
a
a
d
d
s
s
I s t
k I
sk I
t k I
s t
n L r v
s
n L
t
r v
d
d
k I
n L
n L
n v
where
d
d
s
I s t
k I
s
t
s t
n L n v
s
n L
t
n v
Add black rim around the
edge of the sphere map
(not shown)