 | [TOC] Chapter 13: Light Transport I: Surface Reflection |  |
Light transport describes how light interacts with surfaces and other materials to produce an image. One crucial aspect of light transport is surface reflection, which involves how light bounces off a surface and reaches the camera (or observer). This process involves sampling reflection functions, direct lighting, solving the light transport equation, and methods like path tracing to approximate the interaction of light with a scene.
Let's elaborate on the key topics and provide examples with JavaScript code snippets.
 | Sampling Reflection Functions |  |
When light hits a surface, it can reflect in different ways based on the material properties. The Bidirectional Scattering Distribution Function (BSDF) is used to describe how light is reflected or transmitted at a surface. To compute the lighting at a point, we need to sample the reflection function, which means we generate a direction for light to travel after it interacts with the surface.
BRDF (Bidirectional Reflectance Distribution Function)
A BRDF is a type of BSDF that only deals with light reflection. It describes the ratio of reflected radiance \(L_r\) to the incoming irradiance \(E\), given the incoming and outgoing directions \( \omega_i \) and \( \omega_o \):
\[
f_r(\omega_i, \omega_o) = \frac{dL_r(\omega_o)}{dE(\omega_i)}
\]
This function gives the probability of light being reflected in a given direction.
Example: Sampling a Cosine-Weighted Lambertian BRDF
For diffuse surfaces (Lambertian reflection), we can sample the BRDF using cosine-weighted sampling:
|