0% found this document useful (0 votes)
8 views

Unit-5 Computer Graphics Part-3

Uploaded by

Smasher Ezio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Unit-5 Computer Graphics Part-3

Uploaded by

Smasher Ezio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Shri Ram Murti Smarak College of Engineering, Technology & Research, Bareilly

Unit-V Part 3
Topics : Basic Illumination: Ambient Light,
Diffuse Reflection, Specular Reflection, Phong
Model and Combined Approach
Subject Name: Computer Graphics Presented By:
Sachin Kumar Saxena
Subject Code: RCS-603
Assistant Professor
CSE Department
SRMS College of Engineering,Technology &
Research,Bareilly
Illumination models
• Introduction:
– A projection describes only where an object has to be drawn on the projection
plane.
– The determination of visible surfaces also focused only on the question
which objects should be drawn and which ones are hidden from view by others.
– The information where an object should be drawn on the projection plane is not
at all sufficient for a realistic representation of a 3D scene.
– Realistic displays of a scene are obtained by generating perspective projections
of objects and by applying natural lighting effects to the visible surfaces.

2/9/2019 By: Tekendra Nath Yogi 2


• Illumination Model:
– Also called a lighting model or shading model

– Model for calculating light intensity at a single surface point.

– used to calculate the intensity of light that we should see at a given point
on the surface of an object.

• Surface Rendering methods:


– Also called surface-shading methods.

– defined as a procedure for applying a lighting model to


obtain pixel
intensities for all the projected surface positions in a scene.

2/9/2019 By: Tekendra Nath Yogi 3


• Light Sources:

• Light source is defined as an object that is emitting radiant


energy, such as a Light bulb or the sun.
– Two types of light sources:
• Point light source and

• Distributed light source

2/9/2019 By: Tekendra Nath Yogi 4


• Point light source:
– The simplest model for a light emitter is a point source.

– Rays from the source follow radially diverging paths from the source position, as
shown in Figure below:

Fig: Diverging ray paths from the point source

– This light-source model is a reasonable approximation for sources whose


dimensions are small compared to the size of objects in the scene.
– Sources, such as the sun, that are sufficiently far from the scene can be accurately
modeled as point sources.
2/9/2019 By: Tekendra Nath Yogi
5
• Distributed light source:
– A nearby source, such as the long fluorescent light as shown in figure below is more
accurately modeled as a distributed light source.
– In this case, the illumination effects cannot be approximated realistically
with a point source, because the area of the source is not small compared to the
surfaces in the scene.
– An accurate model for the distributed source is one that considers the accumulated
illumination effects of the points over the surface of the source.

Fig: An object illuminated with a distributed light source


2/9/2019 By: Tekendra Nath Yogi
6
• Basic Illumination Models:
– Illumination models are used to calculate light intensities that we
should see at a given point on the surface of an object.
– Lighting calculations are based on:
• Optical properties of surfaces, such as glossy, matte, opaque, and
transparent. This controls the amount of reflection and absorption
of incident light.
• The background lighting conditions.

• The light-source specifications. All light sources are considered to


be point sources, specified with a coordinate position and intensity
value (color).
2/9/2019 By: Tekendra Nath Yogi
7
Basic Illumination
Models
1. Ambient light
2. Diffuse reflection
3. Specular reflection and
Phong model
4. Combined approach
5. Warn model
6. Intensity Attenuation
7. Color consideration
8. Transparency and Shadows
Basic Illumination
Model
• An illumination model, also called a lighting model
and sometimes referred to as a shading model, is
used to calculate the intensity of light that we
should see at a given point on the surface of an
object.
• Illumination models in computer graphics are
often loosely derived from the physical laws that
describe surface light intensities.
Basic Illumination
Model

• Illumination Model - the model for


calculating light intensity at a single
surface point is called illumination
model or a lighting model
• Surface Rendering is a procedure
for applying a lighting model to
obtain pixel intensities for all the
projected surface positions in a
scene.
LIGHT
SOURCES
• When we view an
opaque non uniform
object, we see reflected
light from the surfaces
of the object.
• A surface that is not
directly exposed to a
light source may still be
visible if nearby objects
are illuminated.
Diffuse reflection.
• Surfaces that are rough, or grainy, tend to scatter
the reflected light in all directions.
• This scattered light is called diffuse reflection.
Specular Reflection
• In addition to diffuse reflection, light sources
create highlights, or bright spots, called
specular reflection.
• This highlighting effect is more pronounced on shiny
surfaces than on dull surfaces.
Specular Reflection and Diffuse
reflection
• Ambient Light - Example

Fig. : An ambient illumination only.


Ambient
light
• This is a simple way to model the combination of
light reflections from various surfaces to produce a
uniform illumination called the ambient light, or
background light.
Ambient
light (Ia)
• Ambient light has no spatial or directional
characteristics.
• The amount of ambient light incident on each
object is a constant for all surfaces and over all
directions.
• The intensity of the reflected light for each surface
depends on the optical properties of the surface;
that is, how much of the incident energy is to be
reflected and how much absorbed.
• We can set the level for the ambient light in a scene
Diffuse
reflection (kd)
• Diffuse reflections are constant over each
surface in a scene,
independent of the viewing direction.
• The fractional mount of the incident light that
is diffusely reflected can be set for each
surface with parameter kd, the diffuse-
reflection coefficient, or diffuse reflectivity.
• Parameter kd is assigned a constant value in
the interval 0 to 1,
according to the reflecting properties we want
the surface to have.
Diffuse
reflection
• If a surface is exposed only to ambient light, we
can express the intensity of the diffuse
reflection at any point on the surface as

• (where Kd is the diffuse-reflection


coefficient)
Diffuse
reflection
• If we denote the angle of incidence between the
incoming light direction and the surface normal as
 , then the projected area of a surface patch
perpendicular to the light direction is proportional
to cos.
• If IL is the intensity of the point light source, then
the diffuse reflection equation for a point on the
surface can be written as
Il,diff = Kd Il
cos
Diffuse
reflection
• If N is the unit normal vector to a surface and L is
the unit direction vector to the point light source
from a position on the surface
• (Fig. 14-9), then cos = N.L and the diffuse
reflection equation for single point-source
illumination is

Il,diff = Kd Il (N.L)
Diffuse
reflection
• We can combine the ambient and point source
intensity calculations to obtain an expression for
the total diffuse reflection.
• In addition, many graphics packages introduce an
ambient-reflection coefficient ka to modify the
ambient light intensity Ia, for each surface.
Diffuse reflection Ka=0
and kd=[0,1]
Diffuse reflection Ka and
kd in [0,1]
Specular reflection and
Phong model
• Specular reflection
• When we look at an illuminated
shiny surface, such as polished metal,
an apple, or a person's forehead, we
see a highlight, or bright spot, at
certain viewing directions.
• This phenomenon, called specular
reflection, is the result of total, or
near total, reflection of the incident
light in a concentrated region around
the specular reflection angle.
Specular reflection and
Phong model
• In this figure, we use
• N unit normal surface
vector
• R to represent the unit
vector in the direction of
• ideal
L specular reflection;
to the vect
represent unit or
directed the light
•Vtoward
as the unit vector
source; to thepoint
pointing
viewer from the surface
position.
Specular reflection and
Phong model
• Phong specular-reflection model
• Shiny surfaces have a narrow specular-reflection
range, and dull surfaces have a wider reflection
range.
• An empirical model for calculating the specular-
reflection range, developed by Phong Bui Tuong
and called the Phong specular- reflection model.
Specular reflection and
Phong model
Specular reflection and
Phong model
• The intensity of specular reflection depends on the
material properties of the surface and the angle of
incidence, as well as other factors such as the
• polarization and color of themodel
We can approximately incident light. intens
monochromatic specular variations ity for
using a specular-reflection
coefficient, W(), surface. each
Ispec = W() Il COS ns

Specular reflection and
Phong model
Ispec = W() Il
COS ns 
Specular reflection and
Phong model
Ispec = W() Il COS ns

specular-
reflection
coefficient,
W() for
different
materials
Specular reflection and
Phong model
• We can reasonably model the reflected light
effects by replacing W() with a constant
specular-reflection coefficient ks We then simply
set ks equal to some value in the range 0 to 1 for
each surface.
• Since V and R are unit vectors in the viewing and
specular- reflection directions, we can calculate
the value of cos with the dot product V R.
Ispec = W() Il COS ns 

Ispec = KsIl (V.R)ns


Specular reflection and
Phong model
Simplified Specular reflection and
Phong model
• A somewhat simplified
Phong model is obtained by
using the halfway vector H
between Land V to calculate
the range of specular
reflections.
• If we replace V.R in the Phong
model with the dot product N.H
• (N.H requires less calculation as
compared to V.R)
Combined Diffuse and Specular
Reflections with Multiple Light
Sources
• For a single point light source, we can model the
combined diffuse and specula reflections from a
point on an illuminated surface as
•I = Idiff + I spec
• I = KaIa + KdIl (N.L) + KsIl (N.H)ns
Combined Diffuse and Specular
Reflections with Multiple Light
Sources
Any Query ?

www.sachinplacement.blogspot.com
or mail at
[email protected]

You might also like