Presentation is loading. Please wait.

Presentation is loading. Please wait.

02/9/05© 2005 University of Wisconsin Last Time Lights Next assignment – Implement Kubelka-Munk as a BSDF.

Similar presentations


Presentation on theme: "02/9/05© 2005 University of Wisconsin Last Time Lights Next assignment – Implement Kubelka-Munk as a BSDF."— Presentation transcript:

1 02/9/05© 2005 University of Wisconsin Last Time Lights Next assignment – Implement Kubelka-Munk as a BSDF

2 02/9/05© 2005 University of Wisconsin Today Direct Lighting The Light Transport Equation

3 02/9/05© 2005 University of Wisconsin Direct Lighting (Sect 16.1) The direct lighting equation only accounts for power leaving the light, being reflected once or not at all, and hitting the image –L(D|S|G)E and LE paths in Heckbert’s 1994 notation Light to reflection to eye and light to eye –Also called “3 point transfer paths” + “2 point transfer paths” –Also called “1 bounce” paths

4 02/9/05© 2005 University of Wisconsin Direct Lighting Equation The integral is typically difficult to solve –Implicit in the L d term is visibility –The f r term may be non-analytic So we sample … Outgoing radiance toward eye If the point is a light Integral, over all incoming directions, of light reflected from sources

5 02/9/05© 2005 University of Wisconsin Breaking it Up Different lights and functions are best served by different sampling techniques Break up the domain of integration to most efficient handle each piece What are the sub-domains?

6 02/9/05© 2005 University of Wisconsin Light Path Classification L delta SEL delta GEL delta DE L area SEL area GEL area DE

7 02/9/05© 2005 University of Wisconsin Direct Lighting Equation Delta lights must be treated differently Delta reflectance functions must be treated differently Then there are two obvious ways to do the others Why is there no Delta Light - Delta Reflectance contribution?

8 02/9/05© 2005 University of Wisconsin Specular Reflectance Contribution Algorithmically, what are we doing?

9 02/9/05© 2005 University of Wisconsin Point Light Contribution Algorithmically, what are we doing?

10 02/9/05© 2005 University of Wisconsin Diffuse/Glossy to Area Contribution We will turn to Monte Carlo Integration for these contributions This is computed with SurfaceIntegrator in PBRT Two strategies: Multiple samples from all lights, or a single sample from a single light –Why two strategies?

11 02/9/05© 2005 University of Wisconsin Sampling All Lights Integral can be broken into sum over single lights To evaluate it, loop over lights and do a Monte Carlo estimate for each light –Samples to use for each light are passed into the integrator- details in book

12 02/9/05© 2005 University of Wisconsin Sampling One Light Say we want to evaluate E[f+g] If we choose, uniformly at random, to evaluate a sample with either f or g, then multiply it by 2, the expected value of the result is E[f+g] Result generalizes to any distribution for choosing which function to sample The upshot, we can choose a single sample from a single light, weight it appropriately, and use it for estimate

13 02/9/05© 2005 University of Wisconsin Sampling for Direct Lighting We can choose to sample according to BRDF’s importance function … Or we can sample according to light’s importance function Which is best depends on the situation

14 02/9/05© 2005 University of Wisconsin Multiple Importance Sampling (15.4.1) Say we want to integrate f(x)g(x) Say we have a good importance sampling pdf for f, p f, and another one suited to g, p g Using only p f gives high variance in some places because it is a bad match for the g component, and vice versa

15 02/9/05© 2005 University of Wisconsin Combining Importance Functions (1) You could get an estimate using the p f sampler, and another using the p g sampler, and then average their results: But this does nothing for variance – it is the sum of each estimators’ variance –Once variance is in the estimate, you can’t cancel it out

16 02/9/05© 2005 University of Wisconsin Combining Importance Functions (2) A better strategy includes a weight term for each sample: The weight term is chosen to provably reduce variance –It takes into account all the ways to generate each sample –We’ll see something similar later, with MCMC algorithms

17 02/9/05© 2005 University of Wisconsin Power Heuristic Even better at reducing variance: In practice,  =2 is good

18 02/9/05© 2005 University of Wisconsin Two Poor Estimators http://graphics.stanford.edu/papers/combine/

19 02/9/05© 2005 University of Wisconsin Make One Good One http://graphics.stanford.edu/papers/combine/

20 02/9/05© 2005 University of Wisconsin http://graphics.stanford.edu/papers/combine/ Many estimates

21 02/9/05© 2005 University of Wisconsin http://graphics.stanford.edu/papers/combine/ Combination of Estimates

22 02/9/05© 2005 University of Wisconsin PBRT’s DirectLighting Integrator It does not do the LSE case –Most algorithms that build on the DirectLighting integrator will treat these paths separately If it detects a L point case it just uses the estimate obtained by tracing a ray to the light Otherwise, it generates one estimate based on sampling the area light, another sampling the BSDF (but not the specular components), and combines them with the power heuristic

23 02/9/05© 2005 University of Wisconsin Light Transport Equation (Sect 16.2) Power leaving is power emitted plus incoming power that is scattered The trace operation, t(p,  ) traces a ray and finds the first surface seen There are many variants on this equation –Mostly related to changing domain of integration

24 02/9/05© 2005 University of Wisconsin Trivial Solutions In almost all cases, there is no closed form solution –Reflectance, visibility, and lights conspire to make it difficult But in some simple cases, a closed form solution exists –These are extremely useful test cases to ensure algorithm correctness Web sites exist with known solutions for simple geometry –Actually, web sites with Form Factors or Configuration Factors These are terms we will see again shortly –Combine these with uniform lighting and diffuse reflectance and you can solve –We saw this in the first assignment (a little)

25 02/9/05© 2005 University of Wisconsin Next Time Path Tracing Irradiance Caching


Download ppt "02/9/05© 2005 University of Wisconsin Last Time Lights Next assignment – Implement Kubelka-Munk as a BSDF."

Similar presentations


Ads by Google