41
Global Illumination

Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Embed Size (px)

Citation preview

Page 1: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Global Illumination

Page 2: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

2

Outline

• Light transport• Radiometric units

• Light received and reflected• Bidirectional reflectance distribution function

Page 3: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

3

Light Transport• Different energy transfer

processes:

• Conduction

• Convection

• Radiation

• Light transport is energy transfer.

• Through radiation.

• Through visible wavelength.

x

ωo

ωi

ωi

Page 4: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

4

Radiometric Units

• Radiant energy:• The amount of energy transferred through

radiation.

• Measured in Joules (J)

• Radiant flux or power (Φ):• Energy transferred within a unit time interval.

• Measured in Watts (W)

• Radiant intensity (I):• Power transferred along a given direction (per

unit solid angle).

• Measured in Watts per steradian (W/sr)

Page 5: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

5

Radiometric Units (Cont’d)

• Irradiance (E):• Incident radiant power on a unit projected area.

• Measured in Watts per square meter (W/m2).

• Radiosity or radiant exitance (B):• Exitant radiant power on a unit projected area.

• Also measured in W/m2.

• Radiance (L):• The power passes through a unit projected

surface area along a unit solid angle.

• Measured in W/m2/sr.

Page 6: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Solid Angle

• Area on the unit sphere that is spanned

• by a set of directions• Unit: steradian

• Directions usually denoted by

6

Page 7: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Angle and Solid Angle

• Angle

• Unit circle has ? radian

7

rl / • Solid angle

• Unit sphere has ?

2/ RA

Page 8: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Spherical Coordinate

• Unit direction vector in spherical coordinate

8

Page 9: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Differential solid angle

• The differential area on the unit sphere around direction ω

9

Page 10: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Differential solid angle

• Integrating the differential solid angle over the unit sphere yields the surface area of the sphere

10

Page 11: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Differential solid angle

• Differential solid angle spanned by Differential area

at distance

and angle

11

dA

r

2

cos

r

dAd

Page 12: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

13

Irradiance from a Single

Source• Assume the source is a

point light, which sends light uniformly to all directions.

• Less irradiance is received when surface is far away:

• E ~ 1/r2

• Maximum irradiance is received when surface is facing the light:

• E ~ n·l

r

nl

2

2

r

IE

r

AIA

Eln

ln

A

ω

Page 13: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

15

Energy Reflected• Bidirectional reflectance

distribution function:

• Depicts how a surface reflects light.

• Measures the ratio between the radiance reflected in direction ωo and that incident from direction ωi.

• BRDF is a 4D function

• 2 angles for input direction

• 2 for output direction.

iii

oooooiir

L

Lf

,

,,,,

Page 14: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

16

Properties of BRDF• Energy conservation:

• Total output energy is less than total input.

• Helmholtz reciprocity principle:• Stay the same if

travel direction is reversed.

• Isotropy vs. Anisotropic:• A BRDF is isotropy if

it stays the same when surface is rotated around the normal

• 3D vs. 4D function

1221 rr ff

1cos,,,

ooooiir df

2211

2211

,,,

,,,

r

r

f

f

Page 15: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

17

Idea Diffuse Surface• An idea diffuse surface

reflects equal amount of light to all directions:

• BRDF is a constant.

• The total energy reflected is a fraction (ρ) of total input.

• ρ is called albedo.

• kd is the diffuse parameter.

dooiir kf ,,,

L

Page 16: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

18

Relation between Diffuse

Parameter and Albedo

d

d

oood

ooood

ooooiir

k

k

dk

ddk

df

2

0

2

0

2

0

sincos2

sincos

cos,,,

Page 17: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

19

Idea Mirror• An idea mirror reflect

light from one direction to another.

• BRDF is 0 except where θo=θi & φo=φi+π.

• Can be defined using Dirac delta function (δ).

L

ioiom

ooiir

k

f ,,,

Page 18: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

20

Relation between Mirror

Parameter and Albedo

i

m

im

ooooioiom

ooooiir

k

k

ddk

df

cos

cos

sincos

cos,,,

2

0

2

0

Page 19: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

21

Rendering Equation for

Global Illumination

iiiioiroeoo dLfLL cos,,,,

xxxx

radiance Incoming:,

BRDF:,

radiance Emitted:,

radiance Outgoing:,

ii

oir

oe

oo

L

f

L

L

x

x

x

x

Page 20: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

24

Color Bleeding• Also called diffuse inter-

reflection.

• The light path:

• LD*E

Page 21: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Radiosity

• Based on heat transfer theory

• ssume diffuse reflections on all surfaces

• Solve for radiant exitance, or radiosity,(power per area) instead of radiance

• No directional variation, view independent

26

Page 22: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Radiosity equation

• Radiosity:

• Diffuse BRDF

• Emitted Radiosity

27

Page 23: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Finite Element Approach

• Express Solution as a weighted sum of basis functions

• Simplest Approach: constant basis function on a triangular mesh

• Solve for unknown coefficients

28

Page 24: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Finite Element Approach

• Substitute into radiosityequation, we get

• Form factor

with area of triangles

• Form factor is fraction of light leaving triangle i incident on triangle j

29

Page 25: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Intuition

30

Page 26: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Intuition

31

Page 27: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Intuition

32

Page 28: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Intuition

33

Page 29: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Intuition

34

Page 30: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Matrix formulation

• Matrix form of

35

Page 31: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Radiosity algorithm

36

Page 32: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Form factors

• Area-to-area form factor

• Area to point

• Sample area-to-point form factors as an approximation to area-to-area factors

37

Page 33: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Meshing

© Cohen and Wallace

38

Page 34: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Meshing

39

Page 35: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Meshing

• Increase mesh resolution

40

Page 36: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Meshing

• Adaptive Meshing

41

Page 37: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Gathering

• Rows of F times B

• Calculate one row of F and discard

42

Page 38: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Examples

43

Page 39: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Examples

44

Page 40: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Examples

45

Page 41: Global Illumination - Vis Center ·  · 2010-04-21unit solid angle). •Measured in Watts ... •The power passes through a unit projected surface area along a unit solid angle

Radosity summary

• Diffuse reflection only

• Finite element approach

• Yields linear system of equations

• Major challenges• Meshing

• Form factor computation

• Solution of linear system

46