43
Selected Topics in Global Illumination Computation Jaroslav Křivánek Charles University, Prague Jaroslav.Krivanek@mff.cuni.cz

Selected Topics in Global Illumination Computation

  • Upload
    mili

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

Selected Topics in Global Illumination Computation. Jaroslav K řivánek Charles University, Prague [email protected]. Global illumination. Light bouncing around in a scene. g lossy reflection s. diffuse inter-reflections. c austics. r efractions. www.photos-of-the-year.com. - PowerPoint PPT Presentation

Citation preview

Page 1: Selected Topics in Global Illumination Computation

Selected Topics in Global Illumination Computation

Jaroslav KřivánekCharles University, [email protected]

Page 2: Selected Topics in Global Illumination Computation

• Light bouncing around in a scene

Global illumination

caustics

glossy reflections

refractionswww.photos-of-the-year.com

diffuse inter-reflections

Page 3: Selected Topics in Global Illumination Computation

Diffuse inter-reflection• May go unnoticed, but looks odd if

missing

Slide credit: Michael Bunnell

3

Page 4: Selected Topics in Global Illumination Computation

Why is GI important?

• Architectural visualization• Interior design• Product design• Animated movies, special effects• Games

• Quality criteria depend on the application

4

Page 5: Selected Topics in Global Illumination Computation

Syllabus discussion

Page 6: Selected Topics in Global Illumination Computation

6

Data-driven importance sampling

[Lawrence et al. 2004]

Measured BRDF samplingDirect illuminationsampling

[Wang & Åkerlund 2009]

Sampling various illumination effects

[Cline et al. 2008]

Page 7: Selected Topics in Global Illumination Computation

7

Many-light rendering methodsBasic formulation (VPLs) Speeding it up: Real-time

methods

Making it scalable Making it robust

[Keller 1997] [Ritschel et al. 2008]

[Walter et al. 2005] [Křivánek et al. 2010]

Page 8: Selected Topics in Global Illumination Computation

• No-precomputation – Real-time many-light methods– Other stuff

• Precomputed radiance transfer (PRT) – Light transport as a linear operator – Spherical harmonics PRT – Wavelet PRT – Separable BRDF approximation – Direct-to-Indirect Transfer – Non-linear operator approximations

8

Real-time GI for Games & Other Apps

Page 9: Selected Topics in Global Illumination Computation

9

Metropolis sampling & appsMetropolis light transport

[Veach & Guibas, 1997]

Energy redistribution path tracing

[Cline et al. 2005]Metropolis photon tracing

[Hachisuka & Jensen 2011]

Metropolis env. map sampling

[Ghosh & Heindrich 2006]

Page 10: Selected Topics in Global Illumination Computation

• Radiative transport equation• Single scattering solutions• Multiple scattering solutions

– Volumetric (bidirectional) path tracing– Volumetric photon mapping– Volumetric radiance caching

10

Participating media

Page 11: Selected Topics in Global Illumination Computation

• Diffusion approximation• BSSRDF• Fast hierarchical computation• Multi-layered materials• Real-time solutions

11

Subsurface scattering

Page 12: Selected Topics in Global Illumination Computation

• Surface BRDF models

• Hair– Kajiya-Kay, Marschner reflection model– Multiple scattering in hair

• Measurement & data-driven models

12

Appearance modeling

[d’Eon et al. 2011]

Page 13: Selected Topics in Global Illumination Computation

• Light transport measurement– Nystrom kernel method– Compressed sensing– Separation of direct and indirect

illumination• Fabrication

– Reflectance fabrication– Volumetric scattering fabrication

13

A little more exotic stuff[Nayar et al. 2006]

Page 14: Selected Topics in Global Illumination Computation

Rules & Organization

Page 15: Selected Topics in Global Illumination Computation

• Either– Lecture notes

• Prepare notes based on lectures given in the class

– Give a 45-minute lecture• Topic chosen by the student• Must be closely related to the class

• Or– Research / Implementation

• Topic chosen by the student or assigned by the instructor

• Preferably (but not necessarily) original, unpublished work 15

Student participation

Page 16: Selected Topics in Global Illumination Computation

• Student participation

• Oral exam– 2 questions from the lecture material – 1 out of 3 papers (must be different

from the lecture material)

16

Student evaluation

Page 17: Selected Topics in Global Illumination Computation

• M. Pharr, G. Humphreys: Physically-based rendering. Morgan-Kaufmann 2004 (2nd ed. 2010)

• Dutre, Bala, Bekaert: Advanced Global Illumination. AK Peters, 2006.

• Szirmay-Kalos: Monte-Carlo Methods in Global Illumination, Vienna University of Technology, 2000. http://sirkan.iit.bme.hu/~szirmay/script.pdf

• Paper references on the class page: http://cgg.mff.cuni.cz/~jaroslav/teaching/2012-npgr031/index.html

17

Books & other sources

Page 18: Selected Topics in Global Illumination Computation

A brief review of physically-based

rendering

Page 19: Selected Topics in Global Illumination Computation

• Radiometry / light reflection (BRDF)• Rendering equation• Monte Carlo quadrature

– Primary estimator, Importance sampling, Stratified sampling, Multiple-importance sampling

• Path / light tracing• Bidirectional path tracing• (Progressive) photon mapping• Irradiance caching

19

Required knowledge

Page 20: Selected Topics in Global Illumination Computation

Rendering• For each visible point p in the scene

– How much light is reflected towards the camera

How much light?

20

Page 21: Selected Topics in Global Illumination Computation

Radiance• “Amount of light” transported by a ray

– To / from point p– To / from direction

• L (p, ) [W / m2 sr ]

• Constant along a ray• Proportional to

perceived brightness

d

N

pdA

Page 22: Selected Topics in Global Illumination Computation

Direct vs. indirect illumination• Where does the light come from?

– Light sources (direct illumination)– Scene surfaces (indirect illumination)

p

direct

indirectindirect

22

Page 23: Selected Topics in Global Illumination Computation

Where does the light go then?• Light reflection – material reflectance

p23

Page 24: Selected Topics in Global Illumination Computation

Light reflection• BRDF

– Bi-directionalReflectance Distribution Function

• Implementation:– Shader

Image courtesy Wojciech Matusik24

Page 25: Selected Topics in Global Illumination Computation

Light reflection – BRDF• Bi-directional Reflectance Distribution

Function

p25

i

i

o

iiii

oooir dL

dLf

from cominglight toreflectedlight

cos)()(),(

Page 26: Selected Topics in Global Illumination Computation

BRDF components

Images by Addy Ngan

Glossy / specular Diffuse

26

Page 27: Selected Topics in Global Illumination Computation

Local reflection integral• Total amount of light reflected to o:

Lo (o) = Le (o) + ∫ Li(i) BRDF (i, o) cosi di

p

Lo (o)

Li(i)

27

Page 28: Selected Topics in Global Illumination Computation

Light transport• Q: How much light is coming from i ?• A: Radiance constant along rays, so:Li(p,i) = Lo(p’,−i)

= Lo(r(p,i),−i)

p

p’Lo(p’,−i)

=Li(p,i)

28

ray castingfunction

Page 29: Selected Topics in Global Illumination Computation

Rendering equationLo (p, o) = Le (o) + ∫ Li(p, i) BRDF (p, i, o) cosi di

Lo (p, o) = Le (o) + ∫ Lo(r(p,i),−i) BRDF (p, i, o) cosi di

p

p’Lo(p’,−i)

=Li(p,i)

29

Page 30: Selected Topics in Global Illumination Computation

Rendering eqn vs. reflection integral

• Reflection Integral– Local light reflection– Integral to compute Lo given that we

know Li

• Rendering Equation– Condition on light distribution in the

scene– Integral equation – the unknown, L, on

both sides

Page 31: Selected Topics in Global Illumination Computation

Solving RE – RecursionLo (p, o) = Le (o) + ∫ Lo(r(p,i),−i) BRDF (p, i, o) cosi di

• Q: How much light is reflected from p’ ?

Recursive application of RE at p’

p

p’Lo(p’,−i) = ?Recursive nature of

light transport

31

Page 32: Selected Topics in Global Illumination Computation

• Recursive evaluation of illumination integral at different points (p, p’, … )

Solving RE – Recursion

p’

32p

Page 33: Selected Topics in Global Illumination Computation

Monte Carlo integration• General approach for numerical

estimation of integrals

1

f(x)

0 1

p(x)

23 45 6

xx d)(fI

)(;)()(1

1

xppf

NI i

N

i i

i

Integral to evaluate:

Monte Carlo estimator:

Page 34: Selected Topics in Global Illumination Computation

Monte Carlo integration• Estimator <I> gives an unbiased

estimate of I:

I

f

ppf

N

pfE

NIE

N

i

N

i i

i

xx

xxxx

d)(

d)()()(1

)()(1

1

1

Page 35: Selected Topics in Global Illumination Computation

Lo (p, o) = Le (o) + ∫ Lo(r(p,i),−i) BRDF (p, i, o) cosi di

Applying MC to rendering

p’

35p

integrand f(i)

random sample cast a ray in a random direction

Page 36: Selected Topics in Global Illumination Computation

Distribution Ray Tracing• Recursive nature – ray tracing• Direct illumination separated from

indirect

p

Page 37: Selected Topics in Global Illumination Computation

Distribution Ray Tracing• Cook ’84• Breakthrough at the time

• Problem: Terribly slow!– Number of rays exponential with

recursion depth

• Solution: Irradiance caching / path tracing / …

Page 38: Selected Topics in Global Illumination Computation

• Unbiased estimator– No systematic error, only variance

• Consistent estimator– May has systematic error– Converges to the correct result

38

Unbiased vs. consistent estimator

Page 39: Selected Topics in Global Illumination Computation

• Path Tracing – unbiased• Light Tracing – unbiased• Bi-directional Path Tracing – unbiased• Metropolis Light Transport – unbiased• Photon Mapping – biased, not consistent• Progressive photon mapping – biased,

consistent• Irradiance caching – biased, not

consistent• Radiance caching – biased, not

consistent 39

Unbiased / consistent GI algorithms

Page 40: Selected Topics in Global Illumination Computation

40

GI Algorithms: Pros and Cons

Image credit: Toshiya Hachisuka

Page 41: Selected Topics in Global Illumination Computation

41

GI Algorithms: Pros and Cons

Image credit: Toshiya Hachisuka

Page 42: Selected Topics in Global Illumination Computation

Unbiased vs. consistent GI algorithm

• Practice– Prefer less noise at the cost of bias– Systematic error is more acceptable

than noise if “looks good” is our only measure of image quality

Page 43: Selected Topics in Global Illumination Computation

• We’ve seen– GI, i.e. Light transport simulation

• There’s also– Emission modeling

• How do various objects emit light?– Appearance modeling

• What does light do after it hits a specific surface?

– Tone mapping• Radiance remapping for display

43

There’s more to realistic rendering