lighting and shadows csis 5838: graphics and animation for gaming

8
Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

Upload: laura-haynes

Post on 06-Jan-2018

216 views

Category:

Documents


1 download

DESCRIPTION

“Point Source” Lamp Type Intensity falls off with distance d – K = 1/ad 2 Shadows based on perspective projection – “Elongated”

TRANSCRIPT

Page 1: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

Lighting and Shadows

CSIS 5838: Graphics and Animation for Gaming

Page 2: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

“Directional” Lamp Type

• Point source at “infinite” distance (like sun)• Shadows based on orthographic projection– All rays essentially parallel at that distance

Page 3: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

“Point Source” Lamp Type

• Intensity falls off with distance d– K = 1/ad2

• Shadows based on perspective projection– “Elongated”

Page 4: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

“Spot” Lamp Type

• Illuminates elliptical area in direction of lamp– Centered in direction ϴ of lamp– Out to some maximum angle d

• Illumination decreases with distance from center– Proportional to cos(ϴ/d)

ϴ d-d

Page 5: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

“Skybox” Light Source

• Light from “all directions” (ambient light)– Represents light reflected from other surfaces– No shadows

Page 6: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

“Skybox” Light Source

• Often combined with sun for “outdoor lighting”• Different spectrum:– Sun: yellow (1.0, 0.95, 0.5)– Hemisphere: “sky blue” (0.8, 0.9, 1.0)• Less intensity than sun (around 0.2)

Page 7: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

Movie Lighting

• 3-point lighting– Key light: Simulates main illumination in scene• Sun, overhead lamp, etc.• Only source that casts shadows

– Fill light: Prevents self-shadowing• In front of subject, but on other side of camera• Much less intense than key light

– Back light: Insures entire body of subject illuminated• Behind subject, less intense

• 4-point lighting: Adds source to illuminate background

Page 8: Lighting and Shadows CSIS 5838: Graphics and Animation for Gaming

Move Lighting

© MovingImageEducation.org