Title: Illumination Lighting
1Illumination (Lighting)
2Outline
- Light Source
- Basic Illumination Models
- Shading Methods
- Ray-Tracing Methods
- Radiosity Lighting Model
- Shadow
3Introduction
- Realistic displays of a scene
- Perspective projections of objects
- Applying lighting effects
4Introduction (Contd.)
- Illumination model
- Lighting model or Shading model
- Calculate the intensity of light for a given
point on the surface of an object - Surface-Rendering algorithm
- Use the intensity of a given point to determine
the light intensity for all projected pixel
position in a polygon
5Light Sources
- Types of light source
- light source (direct)
- light reflector (indirect)
- Two light emitter models
- Point light source, see (b)
- Distributed (Area) light source, see (a)
6Illumination Models
- Concerning methods for calculating light
intensity - Also called Lighting Models
- An approximation for physical optical laws
7Types of illumination models
- Local Illumination Models
- Only considering the interchanges of the light
sources - Global Illumination Models
- Concerning the interchange of light between all
surfaces - Ray-Tracing, Light as a particle
- Radiosity, Light as a energy
8Phong Model
- Phong in 1975
- The standard model that compromises between
acceptable results and processing cost - Light source
- A point light source
- Light interactions with a solid
- incident light at a surface light reflected
light scattered light absorbed light
transmitted - Models reflected light as
- reflected light ambient diffuse specular
9Ambient Light
- Equally on all surfaces from all directions.
- Results from multiple reflections of light from
the many surfaces in the environment - Our illumination equation becomes
- I IaKa
- Ia intensity of the ambient light( to be
constant) - Ka ambient-reflection coefficient ( 0 1)
- depends on objects material
- be empirical convenience
10Diffuse Reflection
- Dull and matte surfaces exhibit diffuse
reflection - Equally bright from all viewing angles
- The intensity on a given surface depends on the
angle ? between the light's direction L and
surface's normal N - I IaKa IpKdcos?
- Ip Intensity of point light source
- Kd diffuse-reflection coefficient (0 1)
- cos? max( cos ?, 0)
11Total Diffuse Reflection
- Assuming that N and L have been normalized,
- I IaKa IpKd(N dot L)
- L is a constant if a point light source is at
infinite - (Called directional light source)
12Visual Effects of Different Values of Kd
13Visual effects of different values of Kd and Ka
14Diffuse Reflection - Further Discussions
- Light-source attenuation
- Colored lights and surfaces
- Similar for IG and IB.
15Specular Reflection
- Specular reflection can be observed on any shiny
surface - The highlight presents the incident light
n vary from 1 to ?00, it depends on surface
material being simulated
16Specular Reflection
- In Phong model does a good job of modeling
specular reflection from plastic surfaces - Reduce the calculation of the reflection vector
- where H (L V)/ L V
17Visual Effects of Specular Reflections
Ks
1.0
0.5
8
16
32
64
128
Shinness
18Visual Effects of Combined Reflections
See Figure 10-23
19Improving the Point-Light-Source Model
- Models the directionality of the lights
- Warn 83
- Multiple light sources
20Summary of the Phong Model
- Light sources are assumed to be point sources
- Light sources and viewer are located at infinity
- Only the normal vector of a surface needs to be
computed - The diffuse and specular terms are modeled as
local components - The color of the specular reflection is assumed
to be that of the light source - ks is set to be a constant value independent of
the surface color - The global term(ambient) is modeled as a constant
- Drawback
- Gives the impression of colored plastic surface
21Illumination Models and Surface-Rendering
Methods
- Light Source
- Basic Illumination Models
- Shading Methods
- Ray-Tracing Methods
- Radiosity Lighting Model
- Shadow
22Shading Models for Polygons
23Constant-Intensity Shading
- Also called flat shading
- A single intensity is calculated for each polygon
- Advantage
- Quickly displayed with same intensity value
- If a polyhedron is not an approximation of an
object with a curved surface, flat shading
provides an accurate rendering - Disadvantage
- Not accurate rendering for an object
24Gouraud Shading
- Also called Intensity-interpolation shading
- Introduce Mach bands
25(No Transcript)
26Phong Shading
- Normal-vector Interpolation Shading
- The rendered image is more acceptable
- Increase the cost of shading
27Gouraud Shaded Polygons with Diffuse Reflection
28Gouraud Shaded Polygons with Diffuse and Specular
Reflection
29Phong Shaded Polygons with specular Reflection
30Curved Surfaces with Specular Reflection
31The Rendering Pipeline
- For Z-buffer and Phong shading
32Demo and Trace Demo Program
- DiffuseDemo
- Diffuse.fx -gt DiffuseVS()
- AmbientDiffuseDemo
- AmbientDiffuse.fx -gt AmbientDiffuseVS()
- AmbientDiffuseSpecularDemo
- ambientdiffusespec.fx -gt AmbientDiffuseSpecVS()
33Problems with Interpolated Shading
- Polygonal silhouette
- Improve by breaking the surface into a greater
number of smaller polygons - Orientation dependence
- Solved by decomposing polygons
- Problems at shared vertices
- Unrepresentative vertex normals
A
C
B
34Normal Vectors
- To get the normal vector for a vertex
- For a differentiable surface, use calculus to
find - For not differentiable, use vertex normal
averaging
Averaging the four polygon face normals
35Global Illumination
36Global Illumination Models
- Recursive Ray-Tracing
- Light regards as particle
- Sharpening renderer, and view dependent
- Radiosity
- Light regards as energy
- Smoothy renderer, and view independent
37Ray-tracing
38Purple Hall
39Room with Metal and Glass Sphere
40(No Transcript)
41Subdivisions on Radiosity Computation
42(No Transcript)
43Figure of Radiosity
44Figure of Radiosity (Contd.)
45Figure of Radiosity(Contd.)
46Illumination Models and Surface-Rendering
Methods
- Light Source
- Basic Illumination Models
- Shading Methods
- Ray-Tracing Methods
- Radiosity Lighting Model
- Shadow
47Shadows
- Shadow algorithms determine which surfaces can be
seen from light source. - In multiple light sources, we have problems.
- umbra and penumbra.
- Illumination equation involving shadows
48Hard Shadows
49Soft Shadows
50Remarks
- Light Source
- Basic Illumination Models
- Shading Methods
- Ray-Tracing Methods
- Radiosity Lighting Model
- Shadow