02941 Physically Based Rendering Path Tracing Jeppe Revall Frisvad - - PowerPoint PPT Presentation

02941 physically based rendering
SMART_READER_LITE
LIVE PREVIEW

02941 Physically Based Rendering Path Tracing Jeppe Revall Frisvad - - PowerPoint PPT Presentation

02941 Physically Based Rendering Path Tracing Jeppe Revall Frisvad June 2020 Heckberts Light Transport Notation Path tracing includes all light paths: L ( S | D ) E . References: - Heckbert, P. S. Adaptive radiosity textures for


slide-1
SLIDE 1

02941 Physically Based Rendering

Path Tracing

Jeppe Revall Frisvad June 2020

slide-2
SLIDE 2

Heckbert’s Light Transport Notation

◮ Path tracing includes all light paths: L(S|D)∗E .

References:

  • Heckbert, P. S. Adaptive radiosity textures for bidirectional ray tracing. Computer Graphics (Proceedings of ACM SIGGRAPH 90) 24(4),
  • pp. 145–154, August 1990.
slide-3
SLIDE 3

Progressive unidirectional path tracing

  • 1. Generate rays from the camera through pixel positions.
  • 2. Trace the rays and evaluate the rendering equation for each ray.
  • 3. Randomize the position within the pixel area to Monte Carlo integrate

(measure) the radiance arriving in a pixel.

p0 p1 p2 p3

http://www.pbr-book.org/

◮ Noise is reduced by progressive updates

  • f the measurement.

◮ Update the rendering result in a pixel Lj after rendering a new frame with result Lnew using Lj+1 = Lnew + jLj j + 1 . ◮ Progressive (stop and go) rendering is convenient for several reasons:

◮ No need to start over. ◮ Result can be stored and refined later if need be. ◮ Convergence can be inspected during progressive updates.

slide-4
SLIDE 4

Monte Carlo integration

◮ The rendering equation: Lo(x, ω) = Le(x, ω) +

fr(x, ω′, ω)Li(x, ω′) cos θ dω′ . ◮ The Monte Carlo estimator: LN(x, ω) = Le(x, ω) + 1 N

N

  • j=1

fr(x, ω′

j,

ω)Li(x, ω′

j) cos θ

pdf( ω′

j)

with cos θ = ω′

j ·

n, where n is the surface normal at x.

slide-5
SLIDE 5

Splitting the evaluation

◮ Distinguishing between:

◮ Direct illumination Ldirect.

◮ Light reaching a surface directly from the source.

◮ Indirect illumination Lindirect.

◮ Light reaching a surface after at least one bounce.

◮ The rendering equation is then L = Le + Ldirect + Lindirect .

◮ Le is emission. ◮ Ldirect is sampling of lights. ◮ Lindirect is sampling of the BRDF excluding lights.

slide-6
SLIDE 6

Path tracing diffuse objects

◮ The diffuse BRDF: fr = ρd/π . ◮ Computing direct illumination:

◮ Sample positions uniformly on light sources. ◮ Estimator for Ldirect is Ldirect,N = ρd(x) π 1 N

N

  • j=1

Le(xℓ,j, − ω′

j)V (x, xℓ,j)

  • nℓ,j · (−

ω′

j)

xℓ,j − x2 Aℓ ( ω′

j ·

n ) .

◮ Computing indirect illumination:

◮ Set Le = 0 . ◮ Sample directions using cosine-weighted hemisphere: pdf( ω′

j) = cos θ/π .

◮ Estimator for Lindirect is Lindirect,N = ρd(x) 1 N

N

  • j=1

V ( ω′

j)Li(x,

ω′

j) .

slide-7
SLIDE 7

Example

◮ 100 samples per pixel. ◮ Time: c. 3 minutes and 39 seconds.

slide-8
SLIDE 8

Example

◮ 100 samples per pixel. ◮ Split into 5 samples at first diffuse surface. ◮ Time: c. 8 minutes and 41 seconds.

slide-9
SLIDE 9

Example

◮ 100 samples per pixel. ◮ Split into 5 samples at first diffuse surface. ◮ Russian roulette for remaining bounces. ◮ Time: c. 43 minutes.

slide-10
SLIDE 10

Splitting vs. Russian roulette for diffuse objects

◮ Splitting is very expensive. Russian roulette is very noisy. ◮ A compromise: Final gathering. ◮ Final gathering: Trace from the eye. Split at the first diffuse surface encountered. Russian roulette afterwards. ◮ Russian roulette: Either diffuse reflection or absorption. ◮ What is the probability? The simplest idea is the average: probability of diffuse reflection = ρd,R + ρd,G + ρd,B 3 . ◮ Could we importance sample this probability? Do some colours have more importance than

  • thers?

◮ The eye is more sensitive to some colours compared to others. ◮ This is estimated by luminance (photometric radiance). ◮ The luminance of an RGB colour is a weighted average of R, G, and B. The weights depend on the RGB colour space used. ◮ Luminance according to the NTSC (1953) colour space: Y = 0.2989R + 0.5866G + 0.1145B .

slide-11
SLIDE 11

Path tracing specular objects

◮ See slides on Reflection and Transmission.

slide-12
SLIDE 12

Example

◮ 288 samples per pixel. ◮ Split into 5 samples at first diffuse surface. ◮ Split in 2 at first 2 specular surfaces. ◮ Russian roulette for remaining bounces. ◮ Time: c. 2 hours.

slide-13
SLIDE 13

Exercises

◮ Implement path tracing for diffuse objects. ◮ Render the Cornell box with blocks. ◮ Render the Cornell box with specular spheres. ◮ Explain light paths leading to secondary caustics. ◮ Extended light transport notation:

L − Light E − Eye D − Diffuse surface S − Specular surface (Sr – reflection, St – transmission) ∗ − 0 or more interactions + − 1 or more interactions ? − 0 or 1 interaction | − either the path on the left or the right side All possible paths: L(D|S)∗E Caustics: LS+DS∗E Primary caustics: L(Sr|StSt)DE | LStD(St?)E