Ambient Lighting
- Background light, unrealistic
- Does not depend on position/orientation of light, object or eye
- Only depends on object and light’s material property
- $k_a$ = ambient reflection coefficient, values ranging from 0 to 1 and one each for R, G, B
- $I_a$ = intensity of ambient light source, one each for R, G, B
- Ambient light reflected off object = $k_a * I_a$
Diffuse Lighting
- Point light source
- Lambertian (or diffuse) reflection for dull, matte surfaces
- Surface look equally bright from all directions
- Reflect light equally in all directions
- Lambert’s Law: amount of light reflected from a different unit area dA toward a viewer is proportional to the cosine of the angle between the incident light and the normal $\theta$
- $k_a$ = diffuse reflection coefficient, values from 0 to 1
- $I_p$ = intensity of point light source, values from 0 to 1
- Diffuse light reflected off object = $k_d * I_p * cos\theta = k_d * I_p * (N\cdot L)$
The lighting is based on
- Incident angle $\theta$
- $\theta$ < 90 ⇒ some light based on angle $\theta$
- $\theta$ = 0 ⇒ max light
- $\theta$ > 90 ⇒ self occlusion
- Directional light source
- A light at sufficient distance from object (like sun), so the light can be approximated at the same direction
- L remains the same for entire scene
- N remains the same for entire polygon
- L is constant everywhere, $N \cdot L$ is also a constant
- Attenuated light source
- Diffuse light reflected off object = $f_{att} k_dl_pcos\theta = f_{att} k_dl_p(N\cdot L)$
- $f_{att} = \frac{1}{d^2}$ or $f_{att} = \frac{1}{c_1 + c_2 + c_3d^2}$(so the denominator is not 0) and should not greater than 1