Monte Carlo Path Tracing III & Operator Formulation of Light - - PowerPoint PPT Presentation

monte carlo path tracing iii
SMART_READER_LITE
LIVE PREVIEW

Monte Carlo Path Tracing III & Operator Formulation of Light - - PowerPoint PPT Presentation

Monte Carlo Path Tracing III & Operator Formulation of Light Transport CS295, Spring 2017 Shuang Zhao Computer Science Department University of California, Irvine CS295, Spring 2017 Shuang Zhao 1 Announcement PA1 will be due next


slide-1
SLIDE 1

Monte Carlo Path Tracing III & Operator Formulation of Light Transport

CS295, Spring 2017 Shuang Zhao

Computer Science Department University of California, Irvine

CS295, Spring 2017 Shuang Zhao 1

slide-2
SLIDE 2

Announcement

  • PA1 will be due next Tuesday
  • PA2 to be released shortly after

CS295, Spring 2017 Shuang Zhao 2

slide-3
SLIDE 3

Last Lecture

  • Monte Carlo Path Tracing II
  • BRDF sampling
  • Multiple importance sampling

CS295, Spring 2017 Shuang Zhao 3

slide-4
SLIDE 4

Today’s Lecture

  • Monte Carlo Path Tracing III
  • MIS for direct illumination
  • Operator formulation of light transport
  • Ray space, throughput measure
  • Functions and operators
  • Operator formulation of the RE

CS295, Spring 2017 Shuang Zhao 4

slide-5
SLIDE 5

Recap: Multiple Importance Sampling

  • To estimate
  • Assume there are n probability densities p1, p2,

…, pn to sample x. Then, is an unbiased estimator of as long as:

  • for all x with
  • whenever

CS295, Spring 2017 Shuang Zhao 5

slide-6
SLIDE 6

Recap: Weighting Functions

  • The Balance Heuristic
  • Then,
  • It holds that

for any unbiased estimator

(with the n densities)

  • In other words, as long as one provided density is

“good”, will also be “good”

CS295, Spring 2017 Shuang Zhao 6

slide-7
SLIDE 7

Recap: Weighting Functions

  • The Power Heuristic
  • Then,
  • It holds that

for any unbiased estimator

(with the n densities)

  • Sometimes works better than balance heuristic in

rendering

CS295, Spring 2017 Shuang Zhao 7

slide-8
SLIDE 8

Multiple Importance Sampling for Evaluating Direct Illumination

Monte Carlo Path Tracing III

CS295, Spring 2017 Shuang Zhao 8

slide-9
SLIDE 9

Recap: Direct Illumination

CS295, Spring 2017 Shuang Zhao 9

slide-10
SLIDE 10

Recap: Direct Illumination

  • Measure:

solid angle

  • Domain of integral:

the unit hemisphere Ωx around the normal nx at x

  • Variable of integration:

ωi (which determines y)

CS295, Spring 2017 Shuang Zhao 10

Light

slide-11
SLIDE 11

Recap: Direct Illumination

  • Measure:

surface area

  • Domain of integral:

the union Ae of all light sources’ surfaces

  • Variable of integration:

y (which determines ωi)

CS295, Spring 2017 Shuang Zhao 11

Light

Ae Geometric term

slide-12
SLIDE 12

Direct Illumination Estimators

CS295, Spring 2017 Shuang Zhao 12

Light sampling BRDF sampling

slide-13
SLIDE 13

MIS for Direct Illumination

  • In the previous slide, the two density functions

pBRDF and plight have different underlying measures (i.e., solid angle vs. surface area)

  • To apply MIS, we need to rewrite one of the

two densities so that both have the same measure

  • We use solid angle as the unified measure

CS295, Spring 2017 Shuang Zhao 13

slide-14
SLIDE 14

MIS for Direct Illumination

  • ωi1 generated by sampling a point y on the light source

and setting ωi1 = normalize(y - x)

  • ωi2 generated by sampling the BRDF fr given x and ω
  • The key is to evaluate the four density values
  • Assume plight(y) and pBRDF(ω) are given
  • We now need rewrite plight(ωi1) and plight(ωi2) as densities
  • f directions instead of surface points

CS295, Spring 2017 Shuang Zhao 14

slide-15
SLIDE 15

Change of Measure

  • Observation: the ray tracing operation

provides a one-to-one correspondence between all

  • ωi with

and

  • with

CS295, Spring 2017 Shuang Zhao 15

Light

slide-16
SLIDE 16

Change of Measure

  • Observation: the ray tracing operation

provides a one-to-one correspondence between all

  • ωi with

and

  • with
  • For all such ωi and y,

CS295, Spring 2017 Shuang Zhao 16

slide-17
SLIDE 17

Rewriting Density Functions

CS295, Spring 2017 Shuang Zhao 17

slide-18
SLIDE 18

MIS Direct Illumination Estimator

directRadianceMIS(x, ω): directRad = 0 [y, p1] = luminaireSample() ωi1 = normalize(y - x) if RayTrace(x, ωi1) == y: p1 *= dot(y - x, y - x) / dot(ny, -ωi1) p2 = pBRDF(ωi1) directRad += emittedRadiance(y, -ωi1) * brdf(x, ωi1, ω) * dot(nx, ωi1) / (p1 + p2)

CS295, Spring 2017 Shuang Zhao 18

slide-19
SLIDE 19

MIS Direct Illumination Estimator

# continue from last slide [ωi2, p2] = brdfSample() y = RayTrace(x, ωi2) if y lies on a light source: p1 = plight(y) * dot(y - x, y - x) / dot(ny, -ωi2) directRad += emittedRadiance(y, -ωi2) * brdf(x, ωi2, ω) * dot(nx, ωi2) / (p1 + p2) return directRad

CS295, Spring 2017 Shuang Zhao 19

slide-20
SLIDE 20

Example 1

CS295, Spring 2017 Shuang Zhao 20

Light source BRDF (diffuse)

slide-21
SLIDE 21

Example 1

CS295, Spring 2017 Shuang Zhao 21

Light source BRDF (shiny)

slide-22
SLIDE 22

Example 2

CS295, Spring 2017 Shuang Zhao 22

slide-23
SLIDE 23

Operator Formulation of Light Transport

CS295 Realistic Image Synthesis

CS295, Spring 2017 Shuang Zhao 23

slide-24
SLIDE 24

Ray Space

  • Let be the set of surfaces in the scene,

then is the ray space consisting

  • f all light rays
  • riginating from all

surface points

CS295, Spring 2017 Shuang Zhao 24

slide-25
SLIDE 25

The Throughput Measure

  • Let

, then the throughput measure is given by

  • With this measure, we can then define

integrals over the ray space in the forms of

CS295, Spring 2017 Shuang Zhao 25

slide-26
SLIDE 26

Functions on the Ray Space

  • Many quantities (e.g., L) we are interested in

can be interrupted as (real-valued) functions on the ray space

  • For any two function f and g, their inner product

is defined to be

CS295, Spring 2017 Shuang Zhao 26

slide-27
SLIDE 27

Operators

  • Let denote all real-valued functions on the

ray space . An operator then maps a function to another function

  • Operators useful in our case
  • Local scattering operator K
  • Propagation operator G

CS295, Spring 2017 Shuang Zhao 27

slide-28
SLIDE 28

Useful Operators

  • For any function

:

  • The local scattering operator K:
  • The propagation operator G:

CS295, Spring 2017 Shuang Zhao 28

slide-29
SLIDE 29

Operator Formulation of the RE

CS295, Spring 2017 Shuang Zhao 29

= +

slide-30
SLIDE 30

Operator Formulation of the RE

CS295, Spring 2017 Shuang Zhao 30

(Invariant of radiance along lines)

slide-31
SLIDE 31

Operator Formulation of the RE

  • Given the results from the previous two slides,

we can rewrite the RE as

  • Solving the RE is effectively inverting (I - T)

where I denotes the identity operator:

CS295, Spring 2017 Shuang Zhao 31

slide-32
SLIDE 32

Conditions for Invertibility

  • When

, which translates to all BRDFs conserving energy in our case, (I - T) is invertible and

  • It follows that

CS295, Spring 2017 Shuang Zhao 32

slide-33
SLIDE 33

Next Lecture

  • Operator formulation of light transport II
  • Sensors and measurements
  • Adjoint operators and adjoint particle tracing

CS295, Spring 2017 Shuang Zhao 33