Starting from:
$30

$24

Assignment 3 Ray-tracing Solution Overview

Write a ray tracer, demonstrate its operation by generating several scenes, and provide a description (see Notes, Point 1). (Quality of the code, the description, and complexity of the generated scenes are factors affecting the mark.)




Basic features




The basic version of your ray-tracer should support:



object types: spheres, triangles;



Phong lighting model;
shadows;
reflections (recursive).



Input format: In the basic version of the program you can specify the scene and the viewing parameters in the ray-tracer code.



Output format: The resulting image can be output to the screen (and captured using a standard utility) or to a file and displayed using a standard image viewer. In any case, the user should be able to specify the desired width and height of the resulting image through the command line or an input file.



Advanced features




If you have implemented all basic features, you may choose one or more options from the list below. Each of this features is worth a bonus of up to 10 % of the total assignment mark (= 1.25 of the total class mark).




Support refractions (recursive);



Extend supported object types to polygon meshes with interpolated normal vectors;
Support textured surfaces. The textures may be read from a file and/or be procedural;
Read viewing parameters and scene description from a file (e.g., in the .obj format, cf. Assignment 2);
Support antialiasing through supersampling;
Support extended (area) light sources;
Support rendering with the depth of field;
Create an OpenGL previewer of the scene (this option can only be chosen only if Option 4 has been implemented as well).









1
Notes




Due to the relatively slow speed of ray-tracing, submit at least three images produced by your ray-tracer together with the ray-tracer code, data files (if used) and documentation (a README file). The README file should include an outline of your program and a description of the features demonstrated in each image you submit.



It is up to you to decide on an output file format. One possibility is to use an existing library for bitmap format such as .png, .bmp, .pcx or .ppm to save the output, then view it using a standard viewer. Another alternative is to display the result in OpenGL and capture the screen to be saved on disk.



All your source code must be written in C/C++. Your source code must compile on the lab machines in MS 239 without any special modifications. Your source code must be clear and well commented.



You are allowed to reuse source code that: (a) has been provided by your CPSC 453 TA for use in the course, (b) has been written by you for another assignment, or (c) you have received permission to use from your TA prior to handing-in your assignment.



Other sources are not acceptable for reusing. You are not allowed to share your code. Any instances of code reuse by you for this assignment must be explicitly mentioned within the README.pdf file.










































































































2

More products