-
Notifications
You must be signed in to change notification settings - Fork 7
Hw1 Ray Tracing
In this assignment you will write a simple ray tracer. The core requirement is to write a ray tracer that minimally ray traces a sphere from a fixed point of view. To improve your grade you can add rendering features such as mirror reflections, shadows, anti-aliasing, etc. A list of possible improvements is provided below. Other enhancements are possible and will be considered, but it is best to consult the TA/instructor first!!
The program compiles and renders (see example):
- one sphere,
- the floor of your scene (i.e. ray-plane intersection)
- with a given surface material (i.e. Phong shading model)
- illuminated by a single light source
- and from a fixed point of view
- Cast the object's shadows in the scene
In the demo session, demonstrate how to change rendering parameters (e.g. light position, color, material parameters). note: no user-interface is required, during the demo simply modify the sources and re-compile/run.
Modeling
- Create a Cornell Box scene (i.e. ray-quad intersection) (no need to have an area light) (5%)
- Add ability to trace a triangle mesh (i.e. ray-triangle intersection and *.obj file format) (15%)
Rendering
- Develop a reflective material for the sphere (10%)
- Develop a refractive material for the sphere (5%)
- Ability to add a texture to your geometry (5%: 2% checkerboard +3% from image)
- Implement alternative lights types (e.g. area light) (10%)
- Cast more rays to anti-alias the image (5%)
Acceleration
- write a multi-threaded ray tracer (OpenMP) and analyze the performances w.r.t. number of threads. (1%)
- develop acceleration data structures to ray-trace your scene (15%)
Software Engineering
- code quality (e.g. organization, Object Oriented programming) (1%)
- use of git repository (i.e. frequent commits with quality log messages) (1%)
- software documentation (comments) (1%)
How to compile on the lab machines
- Debugging: especially with many effects enabled in the ray-tracer, generating each image takes a long time, and to debug with just printf (or cout << ) is very difficult.
- SE: when they start to write many effect its difficult to organize all codes properly in an object-oriented style. Many people had a very long main() function, and after they make some changes into their own code its impossible to remember where and what was that change.
- Reflections: this seems to be the most difficult part to debug.
- QtCreator: specification of /usr/local/bin/cmake
- Recursive: note on clamping [0,255]
©Department of Computer Science, University of Victoria, 2015.