CPSC 441: Computer Graphics Lighting - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

CPSC 441: Computer Graphics Lighting

Description:

Matte. Types of Reflection Functions. Ideal Specular. Reflection Law. Mirror. Ideal Diffuse ... Matte. From Apodaca and Gritz, Advanced RenderMan. Specular Light ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 56
Provided by: symo5
Category:

less

Transcript and Presenter's Notes

Title: CPSC 441: Computer Graphics Lighting


1
CPSC 441 Computer GraphicsLighting
  • Jinxiang Chai

2
3D Rendering pipeline
Modeling transformation
Transform into 3D world system
Illuminate according to lighting and reflectance
lighting
Transform into 3D camera coordinate system
Viewing transformation
Transform into 2D camera system
Project transformation
Clip primitives outside cameras view
Clipping
Draw pixels (includes texturing, hidden surface,
etc.)
Scan conversion
Image
3
3D Rendering pipeline
Modeling transformation
Transform into 3D world system
Illuminate according to lighting and reflectance
lighting
Transform into 3D camera coordinate system
Viewing transformation
Transform into 2D camera system
Project transformation
Clip primitives outside cameras view
Clipping
Draw pixels (includes texturing, hidden surface,
etc.)
Scan conversion
Image
4
Outline
  • Ambient, diffuse and specular light
  • Light attenuation spot lights
  • Readings HB 10-1,10-2,10-3

5
Lighting/Illumination
  • Color is a function of how light reflects from
    surfaces to the eye
  • Global illumination accounts for light from all
    sources as it is transmitted throughout the
    environment
  • Local illumination only accounts for light that
    directly hits a surface and is transmitted to the
    eye

6
Direct and Indirect Light
7
Global Illumination II
8
Global Illumination II
9
Lighting/Illumination
  • Color is a function of how light reflects from
    surfaces to the eye
  • Global illumination accounts for light from all
    sources as it is transmitted throughout the
    environment
  • Local illumination only accounts for light that
    directly hits a surface and is transmitted to the
    eye

10
Reflection Models
  • Definition Reflection is the process by which
    light incident on a surface interacts with the
    surface such that it leaves on the incident side
    without change in frequency.

11
Reflection Models
  • Definition Reflection is the process by which
    light incident on a surface interacts with the
    surface such that it leaves on the incident side
    without change in frequency.

12
Reflection Models
  • Definition Reflection is the process by which
    light incident on a surface interacts with the
    surface such that it leaves on the incident side
    without change in frequency.

13
Reflection Models
  • Definition Reflection is the process by which
    light incident on a surface interacts with the
    surface such that it leaves on the incident side
    without change in frequency.

14
Types of Reflection Functions
  • Ideal Specular
  • Reflection Law
  • Mirror

15
Types of Reflection Functions
  • Ideal Specular
  • Reflection Law
  • Mirror
  • Ideal Diffuse
  • Lamberts Law
  • Matte

16
Types of Reflection Functions
  • Ideal Specular
  • Reflection Law
  • Mirror
  • Ideal Diffuse
  • Lamberts Law
  • Matte
  • Specular
  • Glossy
  • Directional diffuse

17
Materials
Plastic
Metal
Matte
From Apodaca and Gritz, Advanced RenderMan
18
Illumination Model
  • Ambient Light
  • Uniform light caused by secondary reflections
  • Diffuse Light
  • Light scattered equally in all directions
  • Specular Light
  • Highlights on shiny surfaces

19
Ambient Light
  • A intensity of ambient light
  • ka ambient reflection coefficient
  • Really 3 equations! (Red, Green, Blue)
  • Accounts for indirect illumination
  • Determines color of shadows

20
Total Illumination
21
Diffuse Light
  • Assumes that light is reflected equally in all
    directions
  • Handles both local and infinite light sources
  • Infinite distance L doesnt change
  • Finite distance must calculate L for each point
    on surface

Surface
22
Diffuse Light
  • C intensity of point light source
  • kd diffuse reflection coefficient
  • angle between normal and direction to light

Surface
23
Lamberts Law
Beam of Light
Surface
24
Lamberts Law
Beam of Light
Surface
25
Lamberts Law
Beam of Light
Surface
26
Total Illumination
27
Total Illumination
28
Materials
Plastic
Metal
Matte
From Apodaca and Gritz, Advanced RenderMan
29
Specular Light
  • Perfect, mirror-like reflection of light from
    surface
  • Forms highlights on shiny objects (metal, plastic)

Surface
30
Specular Light
  • C intensity of point light source
  • ks specular reflection coefficient
  • angle between reflected vector (R) and eye
    (E)
  • n specular coefficient

Surface
31
Finding the Reflected Vector
Surface
32
Finding the Reflected Vector
Surface
33
Finding the Reflected Vector
Surface
34
Finding the Reflected Vector
Surface
35
Finding the Reflected Vector
Surface
36
Finding the Reflected Vector
Surface
37
Total Illumination
38
Total Illumination
39
Total Illumination
40
Total Illumination
41
Multiple Light Sources
  • Only one ambient term no matter how many lights
  • Light is additive add contribution of multiple
    lights (diffuse/specular components)

42
Total Illumination
43
Total Illumination
44
Attenuation
  • Decrease intensity with distance from light
  • d distance to light
  • r radius of attenuation for light

45
Attenuation
46
Attenuation
47
Spot Lights
  • Eliminate light contribution outside of a cone

Surface
48
Spot Lights
  • Eliminate light contribution outside of a cone

Surface
49
Attenuation
50
Spot Lights
51
Spot Lights
52
Implementation Considerations
Surface
53
Implementation Considerations
  • Typically choose
  • Clamp each color component to 0,1

54
Opengl Functions
  • See section 10-20
  • how to set up light sources (light source pos
  • - light source position and type
  • - light source colors
  • - radial-intensity attenuation
  • - spotlights
  • how to specify global lighting parameters
  • how to specify surface properties

55
Next Lecture
  • Shading
  • Texture mapping others
  • Readings HB 10-10, 10-17, 10-18
Write a Comment
User Comments (0)
About PowerShow.com