CSCI 420: Computer Graphics
Hao Li
http://cs420.hao-li.com
Fall 2014
5.1 Lighting and Shading
1
5.1 Lighting and Shading Hao Li http://cs420.hao-li.com 1 - - PowerPoint PPT Presentation
Fall 2014 CSCI 420: Computer Graphics 5.1 Lighting and Shading Hao Li http://cs420.hao-li.com 1 Debunking Lunar Landing Conspiracies with Global Illumination https://www.youtube.com/watch?v=O9y_AVYMEUs 2 Single Light Source for Global
CSCI 420: Computer Graphics
http://cs420.hao-li.com
Fall 2014
1
https://www.youtube.com/watch?v=O9y_AVYMEUs
2
https://www.youtube.com/watch?v=O9y_AVYMEUs
3
4
5
6
Tobias R. Metoc
7
Martin Moeck, Siemens Lighting
8
Restaurant Interior. Guillermo Leal, Evolucion Visual
light, surface, viewer
fast, supported in OpenGL
9
camera
light source
light, surface, viewer
surface normal, relative camera position and relative light position
10
camera
light source
11
12
13
14
15
16
17
18
19
20
21
22
23
every object
A cheap hack to make the scene brighter
24
25
26
27
= unit vector to light source = surface normal = unit vector to viewer = reflection of at (determined by and )
28
lighting and material properties [ GR GG GB ]
(can be set to different value for each light source)
29
30
31
32
= distance to light source, = diffuse component of light
= unit vector to light = unit surface normal = angle to normal
(need other techniques)
33
specular reflection specular highlights
34
= unit vector to camera = unit reflected vector = angle between and
coefficient
35
Higher gives narrower curves
low α high α
Source:
36
= unit vector to light = surface normal
= reflected about = vector to viewer
37
real materials
pixel shading
38
Lighting properties of a human face were captured and face re-rendered; Institute for Creative Technologies
39
http://cs420.hao-li.com
40