CSE 681 Lab3
 
Assigned: November 1, 2007
Due: November 14, 2007 11:59 PM
Lab overview: Enhance your ray tracer from Lab2 to include pixel supersampling, soft shadow, glossy reflection, and depth-of-field.
Objective: Upon finishing this lab, you will learn how to add stochastic rays to your ray tracer to implement additional effects.
Tasks:
1. Pixel Supersampling: implement jittered pixel supersampling on a 4x4 subpixel regular grid. You can simply average the subpixel ray color and then assign it to the final color of the pixel.
2. Soft shadows: Shoot shadow rays to a randomized, but limited area at the point light sources to simulate area lights and compute soft shadows. Define the area as a quadrilateral or a sphere centered at the light location. Experiment with different areas and numbers of rays to get good images.
3. Glossy reflection: Shoot random rays around the primary reflection direction to simulate glossy reflection. Experiment with different areas and  numbers of the reflection rays to get good images.
4. Depth of field: Jitter the camera positions as we described in class to create the depth of field effect. Eexperiment with different focal lengths so that you are able to create the best results.
5. With the new features, your ray tracer command line will become
   rt  <input.iv> <output.ppm> <xres> <yres> <shadow_flag> <reflection_flag> <refraction_on> <depth_of_field_on>
   The value of shadow_flag -  0: no shadow; 1: hard shadow;  2: software shadow
   The value of reflection_flag -  0: no reflection;  1: regular reflection;  2: glossy reflection
   The value of refraction_on - 0: refraction off;  1: refraction on
   The value of depth_of_field_on:  0: no depth of field;  value other than 0 will be taken as the focal length. In your readme file, you need to tell us what value to use as the focal length for each of the data files.
Lab submission
Submit your source code (.C and .h) and Makefile. Do not submit any executable files. Our grader will use the sample .iv files in the Data director of the sample_read_iv folder to test your program. If you have some nicer scene files that you want the grader to use, you can submit them too.
Submit a readme file specifying what are being submitted and how to compile and link your program.
Use the following command on stdsun to submit your lab3
> submit c681aa lab3 <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 c681aa lab3 lab3.c
          > submit c681aa lab3 readme
will result in ONLY 'readme' remaining in the lab3 submission
You should do the following:
          > submit c681aa lab3 lab3.c lab3.h .... readme
          or
          > submit c681aa lab3 lab3_dir
Where 'lab1_dir' is a directory containing all of  the  lab3 files to be submitted, or best of all (for both student and grader) is:
          > cd lab3_dir
          > submit c681aa lab3.
 
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:59pm 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 the labs. If you have problems with the grade you received on your lab, 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: 10/31/2007  Han-Wei Shen