Unformatted text preview:

CSE168Computer Graphics II, RenderingSpring 2006Matthias ZwickerLast time• Global illumination• Light transport notation• Path tracing• Sampling patternsGiven a point andincident radiance ,integrate over thehemisphereReflection vs. rendering equationReflection equationDirect illumination• Incident radiance given by light source[Wojciech Jarosz]Find radiance functionsuch that reflection equation is satisfied simultaneously at each pointReflection vs. rendering equationRendering equationGlobal illumination• Reflection equation satisfied at each point[Wojciech Jarosz]Reflected radianceIncident radiancePath tracing• Based on a recursive expansion of the rendering equation• Compute incident radiance as integral of radiance transported along all paths connecting and a point on a light sourcePath tracing• Integration of radiance over all paths………Length 3 Length 4Length 7Monte Carlo integrationwhere are radiance, PDF of random path through ,Path tracingConstruct random pathConstruct random pathConstruct random pathConstruct random pathConstruct random pathConstruct random pathRussian roulette• Introduce probaility to terminate path• Return 0 with probability• Sample as usual otherwiseRussian roulette• Introduce probaility to terminate path• Return 0 with probability• Sample as usual otherwise• Re-weight samplesContribution of a path• PDF for path of length is• Russian roulette for path termination• Terminate path of length with probability•UsuallyContribution of a path• PDF for sampling directions–Uniform– Cosine weighted– Importance sampling the BRDF• PDF for sampling light sources–Uniform– Multiple importance samplingContribution of a path• Path of length given by pointsContribution of a path• Path of length given by pointsContribution of a path• Notation• Radiance transported along path• Monte Carlo integration• DenotePath tracingMeasurement equation• Value of a pixelwhere pixel filterMeasurement equation• Monte Carlo integrationMeasurement equation• Monte Carlo integration• Last equality holds becauseMeasurement equationBottom line: pixel value is weighted sum of random paths through pixelMeasurement equationGeneralization• If we have random variablethen we can compute any measurementfor any importance functionPath tracing algorithm• Construct paths incrementally starting at the eye, dozens of rays for each pixel• Incrementally update [Cutler, Durand]Path tracing algorithm• Construct paths incrementally starting at the eye, dozens of rays for each pixel• Incrementally update • Shoot shadow rays at each path vertex[Cutler, Durand]Path tracing algorithm• Construct paths incrementally starting at the eye, dozens of rays for each pixel• Incrementally update • Shoot shadow rays at each path vertex[Cutler, Durand]Path tracing• UnbiasedExpected value for each pixel is the correct solution of the rendering equation• ConsistentIf we shoot infinitely many rays, we will get the correct solutionLight transport notation•Light L• Diffuse D• Specular S•Eye E•ExampleSampling patterns• Stratified sampling – avoid sample clumping• Jittered grids• N-rooks sampling• Quasi Monte Carlo•…Today• Photon mappingProblems with path tracing[Wann Jensen]10 paths/pixelProblems with path tracing[Wann Jensen]10 paths/pixelProblems with path tracing[Wann Jensen]100 paths/pixelProblems with path tracing[Wann Jensen]1000 paths/pixelRemoving noise• More samples/rays per pixel (but slow convergence, ) • Better sampling patterns (stratified sampling, importance sampling)• Adaptive samplingPhoton mapping• Bi-directional pathsConstruct paths not only from the eye, but also from the light sources• CachingCache photons distributed along paths from the light sources• InterpolationInterpolate radiance from cached photonsPhoton mapping• Photon emission and transport[Cutler, Durand]Photon mapping• Photon caching[Cutler, Durand]Photon mapping• Spatial data structure for fast access[Cutler, Durand]Photon mapping• Radiance estimation[Cutler, Durand]What is a photon?• A photon has a location and a direction• A photon storessuch that the expected value isclass photon {vector3 xvector3 wvector3 a}Photon emission and transport• Very much like path tracing, only starting at light sources instead of at the eye![Cutler, Durand]Photon emissionRectangular diffuse light•Power•Area• Radiance• Choose uniform PDF• Initialize photonPhoton transport• Russian roulette with probability to abort after bounces• At each surface, choose random and update photonChoosing random directionsSampling BRDFs• Uniform• Cosine weighted• Importance sampling… as in path tracingPhoton mapping• Photon caching[Cutler, Durand]Taking measurements• Use the “average” incident radiance to estimate reflected radianceTaking measurements• Measurement equation with “averaging kernel” W• Because we made sure that• …introduces biasTaking measurements• To measure reflected radiance, we choosefor• The estimate of the measurement iswhereDirect illuminationIndirect illuminationCausticsNext time• Photon data structure and efficient access• Photon mapping rendering


View Full Document

UCSD CSE 168 - Lecture

Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?