CS 5610/6610 – Spring 2016
Homework Assignment 3
Shader based Shadow Algorithms (100 points)
Expected start
date: February 26, 2016
Due: 11:59pm,
March 11, 2016
You will
write an OpenGL program which takes your last assignment and does the
following
- Eliminate the cubemapping.
- Replace the skybox with walls
around your room which are colored light blue. (hint: use back-face culling to see
into the room as in the 1st assignment)
- For the floor, use the plank texture (repeated) for a wood floor
which is mipmapped. (hint:
use gimp to change the format to something you know how to read. It’s OK to copy a reader from the
web.)
- Replace the sphere on the cube
with a cube supporting a teapot. No environment map needed. The teapot should be sized as to
cast a shadow on the floor. You can find some obj
files including a teapot at: http://groups.csail.mit.edu/graphics/classes/6.837/F03/models/
- You can use tatoo
removal on the cube since the cube’s parents did not like the tatoo. (You don’t have to texturemap
your face on the cube).
- Include a white point light
source (positional) using the OpenGL lighting model. The light should
be placed near the ceiling in the center of your room. You should be
able to move (translate) the light (X,Y,and Z) and control the light intensity
with either keyboard or GUI controls.
Use a small white sphere as a proxy for the light so you can
see it.
- You should include projective shadows
(select with a keyboard/gui control).
Projective shadows should show up on the walls and floor. The shadows
should be drawn so that they are blocking the direct light, but are
still lit by global ambient light and diffuse (not simply black
polygons). For example, you should be able to see the wood-plank floor
texture through the shadows. The objects in the room should cast
shadows on the floor and walls but not each other or themselves.
- You can include either shadow
maps or shadow volumes. The shadows should be drawn so that they are
blocking the direct light, but are still lit by ambient light plus
diffuse (not simply black polygons). For example, you should be able
to see the wood-plank floor texture through the shadows.
- For shadow maps the scene as
stated above will be the occluders. The objects in the room should cast
shadows on themselves, other objects, and the floor with shadow maps.
- For shadow volumes, place a
triangle (sized so that it casts a reasonable shadow) between the
light and the scene so that it is the occluder
casting shadows (for ease of silhouette edge computation). It can be
the only occluder for shadow volumes. Add
controls (keyboard or GUI) to translate and rotate the triangle.
Provide a keyboard or GUI controls to select the shadow option.
CS 6610:
- For CS 6610 students, , you should implement all of the above but also
shadow volumes and shadow maps. However, you should use a cube rather
than a triangle for the occluder in the
shadow volume method (you will have to determine silhouette edges
which are easy since you are using a point lightsource). Think of how you might easily
determine silhouette edges --- it may help to draw a square and see if
you can partition space such that you can determine the silhouette
vertices. Alternatively, you
can use the light position and the cube position to determine this
(remember, the cube occluder isn’t moving)
Output
The program
should draw its output to an OpenGL window of size 512x512 as in the
example program.
Your write up should be about 1 page
in length and describe any problems/issues you have had as well as what you
learned in this assignment. It should clearly document the program user
interface and any additional features or bugs that your program exhibits.
Grading
|
|
Section
|
Possible Points
|
CS5610:
|
|
Documentation
|
10
|
Light
and
movement
|
10
|
Scene
w/objects & floor
|
10
|
|
|
Projective
Shadows
|
|
some shadow
|
10
|
non-black
shadow
|
5
|
correct
|
20
|
|
|
Shadow
volume/map
|
|
some shadow
|
10
|
non-black
shadow
|
5
|
correct
|
20
|
Total
Points
|
100
|
|
|
CS
6610:
|
|
Documentation
|
10
|
Light
and
movement
|
10
|
Scene
w/objects & floor
|
10
|
|
|
Projective
Shadows
|
|
some shadow
|
5
|
non-black
shadow
|
5
|
correct
|
10
|
|
|
Shadow
volume
|
|
some shadow
|
5
|
Triangle
instead of a cube
|
10
|
correct
|
10
|
|
|
Shadow
map
|
|
some shadow
|
5
|
non-black
shadow
|
5
|
correct
|
15
|
Total
Points:
|
100
|
|
|