8 - Illumination (week 4) Flashcards
Light sources:
- Point lights ( e.g. a candle flame)
- Directed lights ( infinite distance e.g. the sun)
- Spot lights (e.g. torch)
- Distributed light sources (e.g. bar-type light)
What is attenuation of light
Intensity goes down with distance
1/d^2
Directed light has no attenuation
What 4 things can happen when a ray of light hits a surface?
-Absorption (no re-emission)
-Reflection (diffuse, specular)
-Refraction (where the light is refracted, potentially at a different angle, through another medium)
-Fluorescence (RARE)
Reflection types:
- Diffuse: reflections are distributed equally
- Specular :
perfect
where reflection is just in one direction
imperfect
where it is in multiple directions
some light is scattered away from the principal reflected direction
Global Illumination Modelling
Global illumination modelling considers all interactions of light in the scene – both directly from its source and indirect lighting.
Why do we not follow the rays of each light for global illumination modelling?
Way too complicated and computationally expensive. We just follow the ray of light until it hits the first object.
Local Illumination Modelling
considers the interaction of light between the object and the light sources in the scene;
The effect of light from other objects in the scene is ignored.
Diffuse Reflection: Lambert’s Cosine Law
Light intensity observed from an object’s surface that is diffusely reflecting is directly proportional to the cosine of the angle θ between the observer’s line of sight and the surface normal.
FORMULA:
I intensity of incident light
L direction to light
n surface normal
L = normalise(Plight - Ppoint)
I = Ik cos = Ik n . L
kd is the reflective property of the surface (diffuse parameter)
Specular Reflection variables:
I intensity = the specular reflected intensity
r ‘mirror’ direction
v viewing direction
L direction to light
d distance to the light
n surface normal
k is the specular reflection intensity parameter; its value depends on the material
Ω=omega
Note that r is the reflected direction, and can be calculated using n and L
phong model formula
I = Ik (r⋅v)^n = Ik (cosΩ)^n
if n is small it’s a dull surface if its larger it’s shiny
if its infinite its a mirror (perfect reflection)
What happens in the Phong model if the point light is at infinity vs at a given position?
I and L are constant
L = normalise(Plight - Ppoint)
Blinn Phong model
Simplified Phong model
Calculate vector H (halfway) vector between viewer and light source
If H = N, Is is maximum.
Is = Ik(N.H)^n
When is Blinn Phong most efficient:
- Both the viewers and the light source are far from the surface
- V and L are constant (so H is also constant).
Shading 3 types:
Flat,
Gouraud,
Phong
Flat shading:
a single intensity is calculated for each polygon.
The shade is determined by the polygon’s normal and colour at the “centre”.
FAST