Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 26
Department of Applied Mathematics
and Computational Sciences
University of Cantabria UC-CAGD Group
COMPUTER-AIDED GEOMETRIC DESIGN AND COMPUTER GRAPHICS :
ILLUMINATION MODELS
Web pages: www.chankeypathak.com
Illumination Models
Light energy falling on a surface can be:
heat
Absorbed Reflected Transmitted
They make an object visible
reflected light
absorbed light (heat)
transmitted light
The amount of energy absorbed, transmitted or deflected depends on the wavelength (w.l.) of the light.
If
then, the object
all the incident light energy is absorbed
is invisible
nearly all the incident light energy is absorbed
appears black
only a small fraction is absorbed
appears white
the incident light energy is nearly equally reduced for all w.l
appears gray
the incident light energy is selectively reduced for all w.l
appears colored
Illumination Models Rogers, D.F. Procedural Elements for Computer Graphics, McGraw-Hill, 2nd. Edition, 1998 The character of the light reflected or transmitted...
depends on:
Composition of the light source Direction of the light source Geometry of the light source
and can be:
Diffuse: light that has penetrated below the surface of the object, been absorbed and then reemitted
Scattered equally in all directions
Observers position is unimportant
The surface orientation
The surface properties of the object
Especular: light does not penetrate below the surface
It is not scattered
Character of light reamins unchanged
Light is independent of surfaces color
Illumination Models
Each point may have several sources of illumination:
direct illumination
indirect illumination
light arrives straight from the light light arrives after interacting with sources
the rest of the scene
According to how they handle these sources, algorithms can be grouped into:
global illumination algorithms
local illumination algorithms
Both kinds of sources are considered Only direct lights are taken into account
Illumination Models
Some useful definitions:
Normal vector
L
to light source
N
u
L - light source direction
N - Normal vector u angle of
incidence
N is the surface normal
L is the direction to light source
Vectors N and L are unit vectors
uis the angle of incidence
Illumination Models
Illumination model 1: Ambient light
Ambient light
Uniform from all directions Ko measures reflectivity of surface for diffuse light (values in the range: 0-1)
I = Ko Io amt
bient light
Ambient reflection coefficient K o = 0.6
Problem: an object is illuminated uniformly
Ko= 0.7
Ko= 0.5
Illumination Models
Illumination model 2: Ambient + diffuse light
Lamberts Cosine Law
incident intensity from a point light source
wavelenght
diffuse reflection function
(0
s Kd()
s1)
Id() = Il () Kd() cos(u) 0
intensity of reflected diffuse light
Therefore, the Lambertian illumination model becomes:
Illumination model 3: Ambient + diffuse + specular light
At certain viewing angles,
Many surfaces are shiny shiny surfaces produces highlights
Highlights are due to specular reflection
Specular reflection
is directional
Highlights occur over a narrow range of angles
Highlights color same as the
illuminating light rather than the color of the surface
Highlights move with the observer
For a perfect reflecting surface (a mirror) the angle of reflection is equal to the angle of incidence For smooth surfaces, the spatial distribution of specular light is narrow.
For rough surfaces, it is spread out.
Illumination Models
Illumination model 3: Ambient + diffuse + specular light
L
to light source
Normal vector N
R
u u V
o
L - light source direction N - Normal vector u angle of incidence V - line of sight R - direction of ideal specular reflection o angle between R and V
line of sight
If o=0, we have a perfect reflecting surface (a mirror). An observer located here sees any specularly reflected light. Otherwise, we have a spatial distribution like:
Illumination model 3: Ambient + diffuse + specular light
Phong Model
Because of the complex physical characteristics of the specular light, an
empirical model based on taking the function:
f(o)=cosn(o)
1
0.8
0.6
0.4
0.2
n=1
n=5
n=50
where n depends on surface properties. For:
a perfect reflector, n= very poor reflector n=1 in practice use 1sns200
-t -1 1 t 2 2
In general, we use: Larger values of n for metals and other shiny surfaces Small values of n for nonmetallic surfaces (e.g., paper) 2001 Andrs Iglesias. See: http://personales.unican.es/iglesias
Illumination Models
Illumination model 3: Ambient + diffuse + specular light
Phongs empirical model controls the size of the specular highlight
incident intensity from a point light source
wavelenght reflectance curve
Is() = Il () w(i,) cosn(o)
intensity of reflected specular light
Combining this term with model 2:
Total
w(i,): ratio of the specularly reflected light to the incident light, as a function of
the incidence angle, i, and the wavelength
Intensity light
I() = Ko() Io()+ I l ( ) K d ( ) cos( u ) + I l ( ) w(i, ) cos n ( o )
Illumination model 3: Ambient + diffuse + specular light
In practice, dependence on the wavelength is usually omitted. In addition, w(i,) is a very complex function, so it is replaced by an aesthetically or experimentally determined constant ks
Ks= 0.0
Ks= 0.2
Ks= 0.4 Ks= 0.6
Illumination Models
Illumination model 3: Ambient + diffuse + specular light
I = Ko Io + Il Kd cos(u) + Il Ks cosn(o)
Ko Ambient reflection Kd Diffuse reflection
Ko= 0.6 Kd= 0.3
Ko= 0.5Specular reflection Kd= 0.4
Ks= 0.2
Ks= 0.4
Ko= 0.7 Kd= 0.2 Ks= 0.8
Illumination Models
Illumination model 3: Ambient + diffuse + specular light
Noting that:
cos(u)= N.L cos(o) = R.V
the model becomes:
I = Ko Io + Il Kd (N.L)+ Il Ks (R.V)n
However, two objects at different distances but with the same orientation to the light source exhibit the same intensity.
The intensity of light decreases inversely as the square of the distance.
Objects farther away appear dimmer !!!!!
I=
Isource
d = source
4 td2 distance
In practice, this model produces unrealistic variations in intensity.