PA 7 Ray Tracing
- PA7 Ray Tracing is due on Dec 04, 11:59pm
- Code: cs451-PA7.7z Δ
- This assignment will help you deepen the understanding of the following topics
- Ray generation from refraction and reflection
- Ray-sphere Intersection
- Soft shadows
- Basic Lighting (Diffusion, Specular, Ambient, directional light, point light, spot light, etc)
- What to submit
- Your code (with everything)
- You RT file (name it cs451_pa7.rt)
- Rendered images. Make sure that you name your images as follows
- 3 images with 1, 10, 100 rays per pixel with size 680 by 680
- name these images cs451_pa7_0001.jpg, cs451_pa7_0010.jpg, cs451_pa7_0100.jpg
- 3 images with 1, 10, 100 rays per pixel with size 680 by 680
- README.txt file in cs451-PA7 folder with the following information
- The OS and compiler that you compile your code
- How to build your program
- Tasks that you completed
- Tasks that you started but did not complete
- Tasks that you did not start
- What are the known bugs in your code?
- How to submit
- email me (jmlien@cs.gmu.edu) and your TA (ple13@masonlive.gmu.edu) a link to all source code, images and README.txt in a file named cs451_pa7_[your last name].zip
- Please do not send us the file directly
Tasks
- Task 1 (20%): Compute Intersection between ray and the spheres
- Task 2 (25%): Determine the reflection color
- Task 3 (25%): Determine the refraction color
- Task 4 (25%): create soft shadows
- Task 5 (5%): Create your own *.RT file.
Examples
In both examples, the following values are used in raytracer.cpp
#define MAX_RAY_DEPTH 10 #define SHADOW_SAMPLE_SIZE 20
The .rt files used for creating these examples: example 1, example 2
example 1
1 ray per pixel | |
10 rays per pixel | |
30 rays per pixel | |
30 rays per pixel with SHADOW_SAMPLE_SIZE=50 for smoother shadow | |
100 rays per pixel with SHADOW_SAMPLE_SIZE=50 |
example 2
1 ray per pixel | |
10 rays per pixel | |
30 rays per pixel | |
30 rays per pixel with SHADOW_SAMPLE_SIZE=50 for smoother shadow | |
100 rays per pixel with SHADOW_SAMPLE_SIZE=50 |