CS488 - Introduction to Computer Graphics - Lecture 19
Comments and Questions
Review
- Illumination
- Ambient illumination
- Notes terminology
- l - the ray from the light osurce to the surface
- n - the normal to the surface
- v - the direction to the eye
- r - the specular reflection direction
- Lin, Lout
Lambertian Surfaces
How much light leaves the surface?
This material is described with diagrams here.
We are only interested in the light leaving the surface in a particular
direction. Why?
The light divides into two parts at the surface
- part is reflected: `surface reflectance'
- part enters the surface: `body reflectance'
The simplest model of body reflectance is Lambert's cosine law. Surfaces
with body reflectance following Lambert's cosine law are called
Lambertian.
What makes a Lambertian surface Lambertian?
- Half-sphere within the body, centred at the bit of surface
- Half-sphere above the body, bottom at the surface
- Draw a little cylinder passing through the centre.
- Whatever goes in the bottom comes out the top
- modified by the angular size of the hole
- cosine factor
What goes into the eye
- Same geometry as illumination, only backward
- Cosine factors cancel one another
Important point
- The ubiquitous cosine terms (l.n, v.n, etc.) occur whenever we
translate between areas on a plane and areas on a sphere.
What colour is the light?
Highlights
Part of the light didn't enter the body of the surface, but was
reflected
- Called `surface reflection'
- Where does it go to?
Suppose the surface is smooth
- It is reflected, called `spectular'
- which means out = in - 2 * (in.normal) normal
- what is the colour?
- does it enter the eye?
Suppose we roughen the surface just a little
- The light spreads a little, centred on the specular direction.
- Amount entering the eye depends on the angle between the eye ray and
the specular direction
And if we roughen the surface a lot
- The light goes out all over the place
- This is called a matte surface
Here is the hack
- Named Phong shading after Phong Bui-Tuong
- Let the specular term be ( r.v )^p
- small p - matte
- large p - highly specular
How is the incoming light divided between ambient, surface and body
reflection?
- Depends on the surface
- L(\lambda) = Ia * ka(\lambda) + Id * (l.n) * kd(\lambda) + Is * ( r.v
)^p * ks
- Implicit v.n / v.n in the second term
- Missing 1 / v.n in the third term
Return to: