Illumination Lighting - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

Illumination Lighting

Description:

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 ... – PowerPoint PPT presentation

Number of Views:5824
Avg rating:3.0/5.0
Slides: 51
Provided by: idtu
Category:

less

Transcript and Presenter's Notes

Title: Illumination Lighting


1
Illumination (Lighting)
2
Outline
  • Light Source
  • Basic Illumination Models
  • Shading Methods
  • Ray-Tracing Methods
  • Radiosity Lighting Model
  • Shadow

3
Introduction
  • Realistic displays of a scene
  • Perspective projections of objects
  • Applying lighting effects

4
Introduction (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

5
Light 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)

6
Illumination Models
  • Concerning methods for calculating light
    intensity
  • Also called Lighting Models
  • An approximation for physical optical laws

7
Types 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

8
Phong 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

9
Ambient 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

10
Diffuse 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)

11
Total 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)

12
Visual Effects of Different Values of Kd
13
Visual effects of different values of Kd and Ka
14
Diffuse Reflection - Further Discussions
  • Light-source attenuation
  • Colored lights and surfaces
  • Similar for IG and IB.

15
Specular 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
16
Specular 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

17
Visual Effects of Specular Reflections
Ks
1.0
0.5
8
16
32
64
128
Shinness
18
Visual Effects of Combined Reflections
See Figure 10-23
19
Improving the Point-Light-Source Model
  • Models the directionality of the lights
  • Warn 83
  • Multiple light sources

20
Summary 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

21
Illumination Models and Surface-Rendering
Methods
  • Light Source
  • Basic Illumination Models
  • Shading Methods
  • Ray-Tracing Methods
  • Radiosity Lighting Model
  • Shadow

22
Shading Models for Polygons
  • Constant Shading

23
Constant-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

24
Gouraud Shading
  • Also called Intensity-interpolation shading
  • Introduce Mach bands

25
(No Transcript)
26
Phong Shading
  • Normal-vector Interpolation Shading
  • The rendered image is more acceptable
  • Increase the cost of shading

27
Gouraud Shaded Polygons with Diffuse Reflection
28
Gouraud Shaded Polygons with Diffuse and Specular
Reflection
29
Phong Shaded Polygons with specular Reflection
30
Curved Surfaces with Specular Reflection
31
The Rendering Pipeline
  • For Z-buffer and Phong shading

32
Demo and Trace Demo Program
  • DiffuseDemo
  • Diffuse.fx -gt DiffuseVS()
  • AmbientDiffuseDemo
  • AmbientDiffuse.fx -gt AmbientDiffuseVS()
  • AmbientDiffuseSpecularDemo
  • ambientdiffusespec.fx -gt AmbientDiffuseSpecVS()

33
Problems 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
34
Normal 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
35
Global Illumination
36
Global Illumination Models
  • Recursive Ray-Tracing
  • Light regards as particle
  • Sharpening renderer, and view dependent
  • Radiosity
  • Light regards as energy
  • Smoothy renderer, and view independent

37
Ray-tracing
38
Purple Hall
39
Room with Metal and Glass Sphere
40
(No Transcript)
41
Subdivisions on Radiosity Computation
42
(No Transcript)
43
Figure of Radiosity
44
Figure of Radiosity (Contd.)
45
Figure of Radiosity(Contd.)
46
Illumination Models and Surface-Rendering
Methods
  • Light Source
  • Basic Illumination Models
  • Shading Methods
  • Ray-Tracing Methods
  • Radiosity Lighting Model
  • Shadow

47
Shadows
  • 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

48
Hard Shadows
49
Soft Shadows
50
Remarks
  • Light Source
  • Basic Illumination Models
  • Shading Methods
  • Ray-Tracing Methods
  • Radiosity Lighting Model
  • Shadow
Write a Comment
User Comments (0)
About PowerShow.com