Assignment 2: Due November 9, 2018 at 11:59:59 pm

Overview

The purpose of this assignment is to make use of the material taught in class and the practical exercises we have been doing in the labs.

Your task is to render a ray-traced scene where the scene is comprised of multiple objects and rays are cast and reflected by you. You must implement a simple Cornell box with at least 3 objects in the scene not including the box itself. There must be at least 2 point lights of differing colours. The scene must implement the entire illumination framework as discussed in class including Ambient, Diffuse, Specular materials and attenuation. The rays cast must have at least 4 levels of recursion and implement at least one reflection/refraction ray re-casting per recursion step.

Input/Output Specification

Your program can hard-code the objects in the scene if necessary and can be called as follows..

eg.

assignment2

Cornell Box

The Cornell box itself should have differing coloured walls. The left wall should be red, the right wall should be green and the middle walls should all be white, gray or beige. Each wall should have material properties defined for it.

Note the area light source shown in the sample Cornell box is unnecessary. Just the box, the point-lights and the objects are required.

Objects

In order to keep this assignment simple, you may implement only spherical objects if you wish. You are also permitted to implement oriented boxes, cones, cylinders or planes if you choose. You must be able to render the illumination framework for each object type you implement though.

Lights

The lights must be implemented with the illumination model as discussed in class including Ambient, Diffuse, Specular materials and attenuation for each ray/object collision for point light sources.

Grading rubric

The grading for this assignment is as follows:
5% - Your program compiles without errors or warnings.
5% - Your program brings up an OpenGL window with the specified characteristics.
15% - Illumination calculation for all lights and every object.
	2% - The ambient illumination component is implemented.
	4% - The diffuse illumination component is implemented.
	6% - The specular illumination component is implemented.
	3% - The attenuation component is implemented.
15% - Rendering the Cornell box.
	5% - The box renders its geometry is defined and rendered correctly.
	10% - The box's walls have at least 2 different materials applied to them.
15% - Rendering illuminated objects
	5% - Your program implements objects to put into the Cornell box.
	10% - The objects have unique material properties applied to them.
45% - Rendering ray-traced objects.
	5% - Rays are defined.  The initial set of rays are generated starting from the camera's position.
	10% - Rays are tested against each object in the scene (including the Cornell box) for the nearest intersection to its starting point.
	10% - Ray/Object collisions result in the object's material being applied to the illumination model (including subsequent collision detections for shadowing).
	15% - The minimum number of recursion steps are applied to complete the trace.
	5% - The result of all the collisions and illumination calculations are properly combined to produce the resulting pixel's colour.
All necessary code and data must be tar and zipped into a file with your full name or student number. eg. FirstLast.tar.gz or 123456789.tar.gz

Code Files

No code files beyond what is provided in the labs will be provided for this assignment.


Image borrowed from: http://graphics.stanford.edu/~henrik/images/pgbox.jpg