Assignment 3: PathTracer

Yanghao Cheng

Part 1: Mirror and Glass Materials

Part 2: Microfacet Material

Implimenting mricrofacet BRDF including Normal Distribution Function (NDF) and the Fresnel Term (F). NDF defines how the micro-surface normals are distributed, and F captures the property of a conductor and its refrectance. Lastly, I impliment importance sampling that samples in-bound radiance (wi). Generally, a microfacet material reflects light at micro scale and diffuse light at macro scale. The proportion is controlled by its parameter, α, microfacet surface with higher α is rougher and will be more diffusing. An comparason is below.

Change of α

α=0.005
α=0.05
α=0.25
α=0.5

Importance Sampling Reduces Noise

Uniform Sampling with 64 sample per pixel
Importance Sampling with 64 sample per pixel

Showing Titinium Sphere

No difference? Well, blame the spec
Okay, the one on the left is Titinium
Aluminium, Silver, Titinium, Silver

Part 3: Environment Light

Part 4: Depth of Field

The beauty of ray tracing is being easy to simulate optometry phenomenon. To create depth of field, I take into account thin lens raidus, instead of a pin-hold camera. The change is simple, instead of shooting a ray from the center of the camera, it generates a ray from a random spot on the thin lens disk. The ray travels toward a point on the focal plane where the ray originated from the center will intersect. Effectively, as more rays are sampled, the depth of field effect will be resembled. Some of the beautiful results will be shown below.

Change of Focal Length

Focal Lenth = 0.67
Focal Lenth = 0.77
Focal Lenth = 0.87
Focal Lenth = 0.97

Change of Apature Radius

Pin-hole Camera
Radius = 0.5
Radius = 1.0
Radius = 1.5
https://cs184.eecs.berkeley.edu/sp20/article/29/assignment-3-2-pathtracer