Distributed ray tracing part 2
This presentation is the property of its rightful owner.
Sponsored Links
1 / 16

Distributed Ray Tracing Part 2 PowerPoint PPT Presentation


  • 62 Views
  • Uploaded on
  • Presentation posted in: General

Distributed Ray Tracing Part 2. 黃聰賢. Overview. Render Equation BRDF Importance Sampling Implementation. Rendering Equation (1). ω o. x. is the radiance from a point to given direction w o. Rendering Equation (2). ω o. x. is the emitted radiance.

Download Presentation

Distributed Ray Tracing Part 2

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Distributed ray tracing part 2

Distributed Ray Tracing Part 2

黃聰賢


Overview

Overview

  • Render Equation

  • BRDF

  • Importance Sampling

  • Implementation


Rendering equation 1

Rendering Equation (1)

ωo

x

  • is the radiance from a point to given direction wo


Rendering equation 2

Rendering Equation (2)

ωo

x

  • is the emitted radiance

  • is non-zero if x is emissive(a light source)


Rendering equation 3

Rendering Equation (3)

ωi

ωo

x

  • Sum of the contributionfrom all of the other direction in the scene


Rendering equation 4

Rendering Equation (4)

ωi

ωo

x

  • Radiance from all hemisphere direction


Distributed ray tracing part 2

BRDF


Integration over hemisphere

Integration over hemisphere

y0

ω0

y1

normal

ω1

eye

yi

ωi

x

Spherical sample direction

L(x,wo) = (2 PI / #samples) * ∑ [BRDF(x,wo,wi)*L(yi,-wi) * cos(n,ωi)]


Spherical uniform sampling

Spherical Uniform Sampling

Generate two uniform random variables in [0,1) : ξx, ξy

x = sin(θ) cos(φ)

y = sin(θ) sin(φ)

z = cos(θ)

φ


Importance sampling

Importance Sampling


Distributed ray tracing part 2

Why?

Too Many

Too Coarse

Importance


Converge speed

Converge Speed


Implement of importance sampling

Implement of Importance Sampling

  • Generate enough samples (uniform samples)

  • Compute the importance of each sample

  • Build the CDF of importance

  • Generate uniform random variables over [0,1)

  • Use Inverse CDF to choose a sample

  • Divide the contribution of each sample by its probability


Direct lighting

Direct Lighting

  • Use Phong Lighting Model.

  • Add the lighting effect if visibility is one.

I * (Kd * dot(N, L) + Ks * pow(dot(E, R), Ns) )

N

E

L

R


Indirect lighting

Indirect Lighting

  • Use importance sampling to choose direction

  • If the direction hits a point yi ,compute the yi direct lighting

y0

ω0

y1

normal

ω1

eye

yi

ωi

x


Distributed ray tracing part 2

L(x, ωo) = (2 PI / #samples) * ∑ [BRDF(x, ωo, ωi)*L(yi,-ωi) * cos(n,ωi)]

L(x, ωo) = (1.0 / #samples) * ∑ { L(yi ,-ωi) * [Kd * dot(ωi, N) + Ks * pow(dot(E, reflect(ωi, N)), Ns) ] }

N

E

yi

ωi

x


  • Login