CS 488 Project
Raytracer extensions — Jim Zhang, 2017 Dec 4
Objective 1: Adaptive anti-aliasing
After an initial rendering pass, edges are detected and supersampled.
Scene: Potato, cabbage, and carrot.
![](objective1-1.jpg)
Before anti-aliasing
![](objective1-2.jpg)
Detected edges
![](objective1-3.jpg)
After anti-aliasing
![](objective1-1-detail.jpg)
Before anti-aliasing (detail)
![](objective1-3-detail.jpg)
After anti-aliasing (detail)
Objective 2: Soft shadows
Light sources can encompass an area. Shadow rays are cast to a random point within the area.
Scene: Sphere, gem, and cube in a Cornell box.
![](objective2-1.jpg)
Point light, hard shadows
![](objective2-2.jpg)
Area light, soft shadows
Objective 3: Glossy reflections
Reflected rays are perturbed by a random amount depending on the material's roughness.
Scene: Final scene from A4.
![](objective3-1.jpg)
Sharp reflections
![](objective3-2.jpg)
Glossy reflections
Objective 4: Multithreading
Multiple threads render the image in parallel. Timing results were obtained by rendering my final scene from A4 at 512×512 with glossy side mirrors, using the 56-core machine ubuntu1604-002. Speedup is slightly sublinear with the number of threads.
![](objective4.jpg)
Objective 5: Depth of field
A focal length and aperture radius can be specified. The scene is rendered multiple times with the eye location perturbed across the circular aperture.
Scene: Copper, silver, and gold balls.
![](objective5-1.jpg)
Focused on copper ball. Aperture radius 0.2.
![](objective5-2.jpg)
Focused on silver ball. Aperture radius 0.2.
![](objective5-3.jpg)
Focused on gold ball. Aperture radius 0.2.
![](objective5-4.jpg)
Focused on gold ball. Aperture radius 1.0.
Objective 6: Refraction
Objects can be transparent. Transparent objects can have a refractive index. Light is bent with Snell's law.
Scene: Sphere, gem, and cube.
![](objective6-1.jpg)
Refractive index 1.00.
![](objective6-2.jpg)
Refractive index 1.33.
![](objective6-3.jpg)
Refractive index 3.50.
![](objective6-4.jpg)
Refractive index 0.70.
Objective 7: Normal mapping
Surface normals are perturbed based on a normal texture, u,v coordinates, and tangent vectors along u and v.
Scene: Rough potato, sphere, and cube over a normal-mapped moon.
![](objective7-1.jpg)
Light coming from the left.
![](objective7-2.jpg)
Light coming from overhead.
![](objective7-3.jpg)
Light coming from the right.
Objective 8: Texture mapping
An object's diffuse color is looked up on a texture using u,v coordinates.
Scene: Cutting board with potato, cabbage, and carrot.
![](objective8-1.jpg)
Without textures.
![](objective8-2.jpg)
With textures.
Objective 9: Phong shading
Mesh normals are interpolated from vertex normals using Barycentric coordinates.
Scene: Wine glass and potato.
![](objective9-1.jpg)
Phong shading off.
![](objective9-2.jpg)
Phong shading on.
Objective 10: Final scene
Final scene with Alice Nakiri's culinary masterpiece.
![](objective10-1.jpg)
Final scene. (HD 4096×4096)
![](objective10-2.jpg)
Comparison to reference image.
![](objective10-1-detail1.jpg)
Final scene straw detail.
![](objective10-1-detail2.jpg)
Final scene dish detail.
![](objective10-3.jpg)
3D modeling in Blender.