1
11.1 Global Illumination
Fall 2014
CSCI 420: Computer Graphics
Hao Li
http://cs420.hao-li.com
11.1 Global Illumination Hao Li http://cs420.hao-li.com 1 Global - - PowerPoint PPT Presentation
Fall 2014 CSCI 420: Computer Graphics 11.1 Global Illumination Hao Li http://cs420.hao-li.com 1 Global Illumination Lighting based on the full scene Lighting based on physics (optics) Traditionally represented by two
1
Fall 2014
http://cs420.hao-li.com
2
– Raytracing – 1980 – Radiosity – 1984
many variations of raytracing and radiosity ideas
2
3
transmitted light
bounces
recursion only)
Color Bleeding
4
5
Shadows are much darker where the direct and indirect illuminations are
They are difficult to fake without global illumination.
5
refocuses on a surface, usually in a pretty pattern
illumination
6
7
– Light to diffuse – Specular to specular
– Diffuse to diffuse
7
– L(D|S)E
– LDS*E
– LD*E
– attempts to trace “all rays” in a scene
8
9
10
10
– Length of projection onto unit circle at x – Measured in radians (0 to 2π)
– Area of of projection onto unit sphere at x – Measured in steradians (0 to 4π)
11
unit area per unit solid angle – Measured in W / m2str – dA is projected area (perpendicular to given direction)
integrated over all directions – Power from per unit area, measured in W / m2
12
Ω
13
If a ray hits a surface point at angle ωi, how much light bounces into the direction given by angle ωo? It depends on the type of material.
14
14
15
Ideal Specular Ideal Diffuse Rough Specular Directional Diffuse
15
16
Marschner et al. 2000
16
17
– Brushed metal – Others?
17
emissive
direction ω, 0 otherwise
(such as distance) between the two surfaces x and x’
19
19
20
From: http://jedi.ks.uiuc.edu/~johns/raytracer/raygallery/stills.html
20
21
Albrecht Duerer, Underweysung der Messung mit dem Zirkel und Richtscheyt (Nurenberg, 1525), Book 3, figure 67.
21
22
Raycasting Raytracing
22
23
– Shadows – Reflections – Refractions (light through glass, etc.)
23
24
24
25
– Aliasing – Unnaturally sharp images
25
26
– Split each pixel into a grid and send rays through each grid point
– Split each pixel only if it’s significantly different from its neighbors
– Send rays through randomly selected points within the pixel
26
27
Cornell University
27
28
(e.g., each triangle is one patch)
linear equations
– Diffuse reflection only – No specular reflection – No participating media (no fog) – No transmission (only opaque surfaces) – Radiosity is constant across each patch – Solve for R, G, B separately
28
29
Form factor calculation Solution of radiosity eqn Visualization Scene Geometry Reflectance Properties Viewing Conditions Radiosity Image Division into patches
29
30
– Soft shadows – Indirect lighting – Color bleeding
30
31
– Mirrors and shiny objects hard to include
31
32
– Bi = radiosity (unknown) – Ei = emittance of light sources (given; some patches are light sources) – ρi = reflectance (given) – Fij = form factor from i to j (computed) fraction of light emitted from patch i arriving at patch j – Ai = area of patch i (computed)
32
33
Fij is dimensionless
1 if not occluded (visibility factor)
34
Museum simulation. Program of Computer Graphics, Cornell
34
35
35
36
36
37
Using only BRDF With subsurface light transport
37
38
direct only subsurface scattered only combined
38
39
39
40
From http://graphics.ucsd.edu/~henrik/images/global.html
40
41
41
42
from light sources
are absorbed
with both position and incoming direction
the geometry (often stored in a kd-tree)
Photon Map
42
43
43
44
be re-done if the lighting or positions of objects change
– Shadows – Indirect lighting – Color bleeding – Highlights and reflections – Caustics – current method of choice
44
45
45
46
224,316 caustic photons, 3095 global photons
46
47
48
48