This preview shows page 1. Sign up to view the full content.
CS300
Project 4
Due: Nov 16
Synopsis
Implement bump mapping, integrating it with previous implementations of texture
mapping and Phong lighting and shading.
Instructions
The scene generated by the associated
scene.cpp
file will generate an object with
both a texture map and a bump map.
For each visible pixel, you are to do these
steps:
●
Use the object's bump map to compute a perturbation of its surface normal.
●
Use the object's texture map to compute a diffuse color.
●
Use Phong lighting/shading to compute the color for the pixel, using the
diffuse color and normal from the previous two steps, and the specular color
and shininess exponent from the object's attributes.
You will calculate the normal perturbation using
N
=
N
D
, where
●
D
=
f
v
P
u
– f
u
P
v
×
N
∥
N
∥
,
●
P
u
,
and
P
v
are calculated, as shown in class, by assuming the texture
coordinate function interpolates linearly across the polygon, and
●
f
u
,
and
f
v
are calculated, as shown in class, by taking the derivative of a
This is the end of the preview. Sign up
to
access the rest of the document.
This lab report was uploaded on 04/18/2008 for the course CS 300 taught by Professor Herron during the Fall '07 term at DigiPen Institute of Technology.
 Fall '07
 Herron

Click to edit the document details