Unformatted text preview:

Global IlluminationFrom last time…Today’s topicsGlobal IlluminationKajiya’s Rendering EquationSolution MethodsGrammar for Light PathsPathsEnergy TransportRadiance Form of Rendering EquationKajiya’s Path TracingResultsResultsPath TracingPure Path TracingPure Path TracingWith Shadow Ray to LightsWith Shadow Ray to LightsLight TracingLight TracingBi-Directional Path TracingBi-Directional Path TracingBidirectional Path TracingCausticsPhoton MappingWhy Map Photons?Why Map Photons?What is a Photon?SourcesRussian RouletteMixed SurfacesStoring PhotonsReflected RadianceHow Many Photons?FilteringMultiple Photon MapsRenderingRadiosityRadiosity EquationForm FactorsDiscretizationSystem of EquationsSolvingRenderingCalculating Form FactorsForm factor between two polygons (actually just a part of it)HemicubeHemicube LimitationsRay casting3/26/071Global IlluminationComputer GraphicsCOMP 770 (236)Spring 2007Instructor: Brandon Lloyd3/26/072From last time…■ Robustness issues■ Code structure■ Optimizations° Acceleration structures■ Distribution ray tracing° anti-aliasing° depth of field° soft shadows° motion blur3/26/073Today’s topics■ Rendering equation■ Path tracing■ Photon mapping■ Radiosity3/26/074Global IlluminationTechniques■ The Rendering Equation° theoretical basis forlight transport■ Path Tracing° attempts to tracelight paths to the eye■ Photon Mapping° deposits light energy fromthe source for later collection■ Radiosity° Computes equilibrium fordiffuse interreflections3/26/075Kajiya’s Rendering Equation()I(,)g(,)e(,) (,, )I(, )dρ′′′ ′′′′′′′′=+∫xx xx xx xx x x x xI(x,x’) – Light transported at x from x’g(x,x’) – geometry (visibility) term° fraction of light from x’ that reaches x° e.g. shadows, occlusione(x,x’) – emissive term° light emitted by x’toward x° e.g. light sourcesρ(x,x’,x’’) – reflectivity° fraction of intensity incident at x’from x’’reflected in the x direction3/26/076Solution MethodsI = ge + gR(I)■ R(⋅) – Integrals are linear operators° Reflected intensity is twice the power if the incident radiance is twice the power (homogeneity)R(cI) = cR(I)° Reflected intensity from two light sources is equal to the sum of the intensities reflected from each (superposition)R(I1+ I2) = R(I1) + R(I2)■ Solve for intensity I(1 – gR)I = geI= (1 –gR)-1geI = ge + gRge + gRgRge + gRgRgRge + ...…+++−−−−2332221111AAAAAAAAAAAOne bounce; direct illuminationTwo bounces()I(,)g(,)e(,) (,,)I(,)dρ′′′ ′′′′′′′′=+∫xx xx xx xx x x x x3/26/077Grammar for Light Paths■L– Light source■E–Eye■D– Ideal diffuse reflectorρ(xi,x’,x”) = ρ( xj,x’,x”) for all i and j° In general, any interaction where light is scattered across hemisphere■S– Ideal specular reflector° Mirror Reflection, Ideal Refractionρ(x,x’,x”) = δ(ang(x,x’) – ang(x’,x’’))° In general, any interaction where light is reflected in a single direction■ Regular expressions° X* (0 or more)° X+ (1 or more)° X? (0 or 1)° (X|Y) (X or Y)DS3/26/078Paths■ OpenGLL(D|S)EI= ge+ gDe(no shadows)I= ge+ gDge(shadow buffer)■ Ray tracingLD?S*EI= ge+ g(Sg)*Dge■ RadiosityLD*EI= g(Dg)*e3/26/079Energy Transport■ L = Radiance – power per unit projected area perpendicular to the ray, per unit solid angle in the direction of the ray (W m-2sr-1)° Fundamental unit of light transport° Invariant along raydωdA dAdωL1L2dA1dA2dω1dω2Φ= Radiant Flux (Photons/sec - W)dΦ/dA = Irradiance (from emitter – W/m2)dΦ/dA = Radiosity (from surfaces – W/m2)dΦ/dω = Radiant Intensity (W/sr)ωθΦ=ω⋅Φ=dAdcosddAd)rn(dL22This term factors in the projected area of the infinitesimal surface patch along the transport direction3/26/0710Radiance Form of Rendering EquationerL(,) L(,) f(,, )G(, )L(, )dAωω ωω ω′′′′′=+∫xx x xxx2cos cosG(,) V(,)θθ′′′=′−xx xxxxV(x, x’) – visibility term• 1 if visible• 0 if occludedxωx’ω’θθ’This is the same equation that we saw before, but the integration domain is over oriented infinitesimal surface patches rather than pointsSurface BRDF3/26/0711Kajiya’s Path Tracing■ At each hit,° Cast one random reflected or refracted ray and weight result based on specular, diffuse, and transmission coefficients° Terminate path when contribution is imperceptible (harder than you might think with high dynamic range light sources)° Augment with importance sampling (add one random ray to a light)■ Cast a large constant number of rays per pixel (40 - 1000)3/26/0712Results256 x 256 image256 x 256 imageRay TracedRay TracedPath TracedPath TracedLight Light scattered scattered by reflective by reflective sphere401 minutes401 minutes533 minutes533 minutessphere3/26/0713ResultsAll objects are gray, except for spheres and base.Color bleedingCaustics3/26/0714Path Tracing■ Postulates that even for ray tracing, following one random path statistically is better, than computing a *bushy* ray tree and integrating the results.■ Why? Key IssuesSampling is extremely importantNeed to be careful about proportion of reflection, refraction, and shadow rays. Want to avoid biasing the results. An unbaised sampling has the same mean as the final result, only the variance (noise) is reduced by samplingCurrent Methods■ Bi-directional path tracing (Lafortune and Veach)■ Metropolis (Veach & Gubias) Path trace some, then carefully perturb existing paths rather than generating new ones (substantial benefit far from the root)Largest contribution from first ray, and this approach includes more first-ray samples as a fraction of the total.3/26/0715Pure Path TracingTraces many rays forward from the eye randomly choosing reflection directions and weights them according to the BRDF3/26/0716Pure Path TracingBest for large light sources.Small lightslead to fewhits and large variance.3/26/0717With Shadow Ray to LightsAdds in “Dge”terms at eachbounce3/26/0718With Shadow Ray to LightsSmall lights OK.Best for specular surfaces.3/26/0719Light TracingTraces manyrays backward from the light source, and in a second pass integrates in viewing direction3/26/0720Light TracingSmall lights OK.Best for caustics.3/26/0721Bi-Directional Path TracingTraces some rays forward from the eye, and others backwards from the light source3/26/0722Bi-Directional Path TracingSlow.Must sample carefullyBest for caustics.3/26/0723Bidirectional Path TracingPath


View Full Document

UNC-Chapel Hill COMP 770 - Global Illumination

Download Global Illumination
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 Global Illumination 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 Global Illumination 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?