Lesson 10
Illuminiation and
shading
Content
1. Overview
2. Illumination
3. Shading
1.
Overview
How lights can be seen?
■ The eye works like a camera
■ Lots of photo sensors at the back of the eye
■ Sensing the amount of light coming from
different directions
■ Similar to CMOS and CCDs
Information will be sent
to brain for processing
What colour is this
dress?
Object’s colour
■ What Affects the Color of a Point on the
Object?
□ position of the sample point
□ position of the light
□ color and intensity of the light
□ camera vector
□ normal vector of the surface at the vertex
□ physical characteristics of the object
(reflectance model, color)
Colour’s illusion
Lighting and shading
■ Lighting
□ How to compute the color of objects according to
the position of the light, normal vector and camera
position
■ Shading
□ Different methods to compute the color of the
entire surface
2.
Lighting
Factors affecting lighting
Light source
Surface properties
Light source
■ Light’s properties
□ Spectrum of light source (i.e. light colour)
□ Geometry properties
▫ Position
▫ Direction
▫ Shape
□ Decline in intensity
Surface properties
■ Surface properties
□ Spectrum (i.e. surface’s colour)
□ Geometry properties
▫ Position
▫ Direction
▫ Microscope structure
Lighting
■ Assuming we have a polygon and a point of view
in 3D space, we can specify a pixel correspondingly.
■ The task in lighting is that we have to specify the
colour of that pixel
■ If we want to make the scene look *right*, we
have to simulate the lighting process on the surfaces
inside the scene
Lighting models
■ Two types of lighting models
□ Empirical: Use simple formulas to create similar
observable result
□ Physics simulation: The lighting formulas will be
based on physics formulas in lighting
■ In most cases, experimental models will be used
in interactive computer graphics applications.
■ In modern computer graphics applications,
some physic simulation models have been more
frequently used.
Phong lighting model
■ By Bui Tuong Phong (Utah University) is a
lighting model which is a combination of both
experimental and physics simulation
■ Is the sum of 3 illumination terms
□ Ambient : 'background' illumination
□ Diffuse : non-shiny illumination and shadows
□ Specular : bright, shiny reflections
Ambient light
Ambient light
■ Light from the environment
■ Light reflected or scattered from other objects
■ Coming uniformly from all directions and then
reflected equally to all directions
■ A precise simulation of such effects requires a
lot of computation
➢Use a simple “trick” called ambient light
Ambient light
■ Simple approximation to complex 'real-world‘
process
➢Result: globally uniform color for object
Ambient light
■ For each lighting process, the ambient light
reflected from object surface only depends on
□ Surface’s properties
□ Intensity of the ambient light source (is a constant
with every point on object surface)
E.g. a sphere
Ambient light
I = ka Ia
□ I = resulting intensity
□ Ia = light intensity
□ ka = reflectance
E.g. a sphere