CSE681 Lab4
 
Assigned: November 16, 2007
Due: November 30, 2007 11:59 PM
Lab overview: Enhance your ray tracer from Lab3 to include box objects and solid texturing.
Objective: Upon finishing this lab, you will be able to render non-sphereical objects (boxes in this case) and also have better understanding of solid texture mapping.
Tasks:
1. Ray Box Intersection: implement a ray-box intersection routine for ray tracing boxes using SoCube. Inventor Cube objects can have different length, width, and height. You can assume there is no rotation so the box(es) will be axis aligned. This way, you can use the algorithm discussed in class to perform ray-box intersection tests in world space.
2. Solid Texturing: Apply a strip, checkerboard, or a variation of your own 3D solid texture to an object in the scene.    Remember that you need to use object space positions to compute the textures. Since Open Inventor does not support solid texturing, you can just hardwire solid textures to the objects you want textured in your scene. Modulate the illumination colors by the texture colors.  
3. For the above two tasks, simplify the command line by using
   rt  <input.iv> <output.ppm> <xres> <yres>
The image should contain solid texturing and also boxes.  You can use cubesphere.iv in the sample data directory. Modify the rotation parameters to the cube so that there is no rotation. Some more scene files that contain cubes will be released soon.
4. 1 bonus point: create some novel scenes that can make the best use of all the features you have implemented this quarter and generate nice images.  You need to submit the scene files and write in readme file the command line arguments how to render those scenes. We will have a best image competition. By doing this task and participating the competition, you will earn this credit if you have your own scene whether you win or not.
5. 2 bonus points: implementing environment cube mapped. Define your own environment maps. You need to explain in the readme file how to toggle this feature and where the environment maps are.
6. 1 bonus point: implement Perlin Noise in your ray tracer. Ken Perlin released his implementation on his web site (http://mrl.nyu.edu/~perlin). Feel free to incorporate his implementation, but it has to be integrated into your own ray tracer.
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 lab4
> submit c681aa lab4 <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 lab4 lab4.c
          > submit c681aa lab4 readme
will result in ONLY 'readme' remaining in the lab4 submission
You should do the following:
          > submit c681aa lab4 lab4.c lab4.h .... readme
          or
          > submit c681aa lab4 lab4_dir
Where 'lab4_dir' is a directory containing all of  the  lab4 files to be submitted, or best of all (for both student and grader) is:
          > cd lab4_dir
          > submit c681aa lab4.
 
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