CS 636 - Advanced Rendering Techniques

Assignment 2

Add point lights with color to your ray tracer.

Add surface color, shading parameters and normals to your modeling primitives (sphere and triangle mesh).

Add Phong shading to your ray tracer, with light attenuation.

Generate an image that contains at least two spheres, two triangle meshes and two lights, one of which is white. It can also contain more geometry and colored lights.

One of the triangle meshes should not be a box. If you include a box, its triangles may be flat-shaded, otherwise smooth-shade your objects.
This will involve interpolating normals over the mesh during the shading process.

You should not use pure colors, i.e. ones with 0 color channels.

Use significantly different values for all the shading parameters for each of your objects.

Make sure that a tight, white specular highlight can be seen on one of your spheres and one of your triangle meshes. These objects should have a non-white diffuse color.

Initially create a high-resolution image (at least 1024x1024), and then use the pixel averaging algorithm from class to create an "anti-aliased" smaller image.

Post both of your images (in TIFF or PNG format) in their native resolution (i.e. don't set their size in html) on a web site with the associated computation time.

Upload your software to Bb Learn.

List information about your scene, e.g. what models used and their locations.
Also post the shape and shading parameter values that you used for your geometric primitives (various colors and specular exponent).
There should be at least four different sets of these.
Also include the position and color of your light(s).

E-mail the URL of the web site to david AT cs DOT drexel DOT edu and upload your software before the deadline.
Tell me which files contain the code for calculating normals on your spheres and polygon meshes (the ones associated with mesh vertices and the interpolated ones used during shading), Phong shading and supersampling.
Direct me to the exact functions and lines in the files.

You can find SMF triangle mesh models here.

Here are two images of the bound-bunny_200.smf model.

The first is flat-shaded, where I am using a single plane normal over each triangle. The second image uses interpolated normals.

The streaks in the bunny's ears in the second image are an artifact of the low triangle resolution and interpolating the normals.

In these images I've used a right-handed coordinate system with Y up, Z to the left and X coming out of the screen.

I read in bound-bunny_200.smf without applying any transformations.

The camera location is at [2,0,0].

The camera view direction is [-1,0,0].

The camera view up vector is [0,1,0]

The horizontal camera view angle is 44 degrees.

Image resolution is [512,512]

Surface color is [1.0, 1.0, 1.0], k_d = 0.7, k_s = 0.3, specular exponent = 30, and the ambient light is [0.2, 0.2, 0.2].

Here are two good examples from previous students.

Last modified on May 3, 2020.