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.
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