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.
Before anti-aliasing
Detected edges
After anti-aliasing
Before anti-aliasing (detail)
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.
Point light, hard shadows
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.
Sharp reflections
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.
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.
Focused on copper ball. Aperture radius 0.2.
Focused on silver ball. Aperture radius 0.2.
Focused on gold ball. Aperture radius 0.2.
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.
Refractive index 1.00.
Refractive index 1.33.
Refractive index 3.50.
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.
Light coming from the left.
Light coming from overhead.
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.
Without textures.
With textures.
Objective 9: Phong shading
Mesh normals are interpolated from vertex normals using Barycentric coordinates.
Scene: Wine glass and potato.
Phong shading off.
Phong shading on.
Objective 10: Final scene
Final scene with Alice Nakiri's culinary masterpiece.
Final scene. (HD 4096×4096)
Comparison to reference image.
Final scene straw detail.
Final scene dish detail.
3D modeling in Blender.