781 Lab2
781 Lab2
CSE 781 lab2
Due: February 15 (Sunday) 11:59 pm.
Add the following features to your OpenGL ply model renderer from lab1:
(7 pts) Implement planar shadows with the following features;
(a) Use the floor you created from lab 1 as a shadow receiver
(b) Add a simple object that has at least one non axis-aligned face as an additional shadow receiver.
(c) Use opengl polygon offset to resolve z-fighting
(d) Use opengl stencil buffer to clip the shadow polygons that fall outside the shadow receivers.
(e) Allow the user to move the light source.
(f) The shadows should be updated when either the light source or the ply object moves.
(g) Use key ‘p’ to toggle planar shadows
Implement one of the following two algorithms - shadow maps or shadow volumes.
(8 pts) Implement the shadow map algorithm using OpenGL. In class we have discussed the main idea of shadow maps. Now you need to find additional information about how OpenGL supports shadow maps (For example, from Section 17.4.3 in the textbook). With shadow maps, your ply model will be able to cast shadows onto arbitrary objects. Remember you should update shadows as light or object moves.
Use key ‘m’ to toggle shadow maps.
Or
(8 pts) Implement shadow volumes. To simplify the task of computing shadow volume faces, you can use simple geometry (triangle, quad, etc) as the shadow casters. Implement the z-fail algorithm. Also, allow the user to toggle the display of the shadow volume faces in wireframe mode.
Use the key ‘v’ to toggle the shadow volume feature in your program.
Lab submission
Just like your lab 1, submit the source code (.C and .h), and/or Makefile (if you have any). Do not submit any executable files.
Submit a readme file specifying what you will have submitted and how to compile and link your program.
Use the following command from stdsun to submit your lab2
> submit c781aa lab2 <names of all your files>
Notes about the submit program
The 'submit' program submits all of the files at once, not one at a time, previous submissions for a given lab are completely removed. Or put another way; each time the submit command is issued for a given lab, ALL of the previously submitted files are clobbered.
That means that
> submit c781aa lab2 lab2.c
> submit c781aa lab2 readme
will result in ONLY 'readme' remaining in the lab2 submission
You should do the following:
> submit c781aa lab2 lab2.c lab2.h .... readme
or
> submit c781aa lab2 lab2_dir
Where 'lab1_dir' is a directory containing all of the lab2 files to be submitted, or best of all (for both student and grader) is:
> cd lab2_dir
> submit c7811aa lab2 .
Submit will immediately print submission information to the submitter. Use 'man submit' if you have any other questions.
Late Penalty
You should submit your lab on time. We are on a quarter schedule, which is pretty tight. Being late for one lab could affect the time left for you to complete subsequent labs. All labs are due at 11:59 pm. of the specified due data, and there is a 10% penalty each day for up to 50%. After that, you get zero.
Grading Criteria
Grading of the labs will be based on the following:
• 90%: Correctness and adherence to assignment specification.
• 10%: Readability, structure of code, use of comments, adherence to lab procedures (submitting, naming conventions, etc.)
The grader will grade all labs. If you have problems with the grade you received on your lab, please see the grader first. If you can't resolve the dispute with the grader, then see me. However, in order to maintain consistent grading for everyone in the class, I am not very inclined to alter grades that are assigned by the grader.
Don't copy labs. Discussion of lab assignments is allowed and encouraged. However, you need to complete the lab all by yourself. Labs which are too similar will be handed over to the Committee on Academic Misconduct and handled by them.
Last updated: 1/31/2010 Han-Wei Shen