Click here to load reader

Global Illumination

  • View

  • Download

Embed Size (px)


Global Illumination. Direct Illumination vs. Global Illumination. reflected, scattered and focused light (not discreet). physical-based light transport calculations modeled around bidirectional reflective distribution functions (BRDFs). discreet light source. - PowerPoint PPT Presentation

Text of Global Illumination

  • Global Illumination

  • Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet).physical-based light transport calculations modeled around bidirectional reflective distribution functions (BRDFs).

    discreet light source.efficient lighting calculations based on light and surface vectors (i.e. fast cheats).

  • Indirect IlluminationColor Bleeding

  • Contact ShadowsNotice the surface just under the sphere. The shadow gets much darker where the direct illumination as well as most of the indirect illumination is occluded. That dark contact shadow helps enormously in sitting the sphere in scene. Contact shadows are difficult to fake, even with area lights.

  • CausticsFocused and reflected light, or caustics, are another feature of the real world that we lack in direct illumination.

  • Global illumination rendered images Caustics are a striking and unique feature of Global Illumination.

  • BRDFBRDF really just means the way light bounces off of something.Specular reflection: some of the light bounces right off of the surface along the angle of reflection without really changing color much.Diffuse reflection: some of the light gets refracted into the plastic and bounced around between red particles of pigment. Most of the green and the blue light is absorbed and only the red light makes its way back out of the surface. The red light bounced back is scattered every which way with fairly equal probability.

  • Rendering Equation L is the radiance from a point on a surface in a given direction E is the emitted radiance from a point: E is non-zero only if x is emissive V is the visibility term: 1 when the surfaces are unobstructed along the direction , 0 otherwise G is the geometry term, which depends on the geometric relationship between the two surfaces x and x It includes contributions from light bounded many times off surfaces f is the BRDF

  • Light Emitted from a SurfaceRadiance (L): Power per unit area per unit solid angleMeasured in W/m2srdA is projected area perpendicular to given directionRadiosity (B): Radiance integrated over all directions

    Power from per unit area, measured in W/m2

  • Radiosity ConceptRadiosity of each surface depends on radiosity of all other surfacesTreat global illumination as a linear systemNeed constant BRDF (diffuse)Solve rendering equation as a matrix problemProcessMesh into patchesCalculate form factorsSolve radiosityDisplay patchesCornell Program of Computer Graphics

  • Radiosity EquationAssume only diffuse reflectionConvert to radiosity

  • Radiosity ApproximationsDiscretize the surface into patchesThe form factorFii = 0 (patches are flat)Fij = 0 if occludedFij is dimensionless

  • Radiosity MatrixSuch an equation exists for each patch, and in a closed environment, a set of n Simultaneous equations in n unknown Bi values is obtained:A solution yields a single radiosity value Bi for each patch in the environment a view-independent solution. The Bi values can be used in a standard renderer and a particular view of the environment constructed from the radiosity solution.

  • Intuition

  • Form Factor Intuition

  • HemicubeCompute form factor with image-space precision Render scene from centroid of AiUse z-buffer to determine visibility of other surfacesCount pixels to determine projected areas

  • Monte Carlo SamplingCompute form factor by random samplingSelect random points on elementsIntersect line segment to evaluate VijEvaluate Fij by Monte Carlo integration

  • Solving the Radiosity EquationsSolution methods:Invert the matrix O(n3)Iterative methods O(n2)Hierarchical methods O(n)

  • ExamplesMuseum simulation. Program of Computer Graphics, Cornell University.50,000 patches. Note indirect lighting from ceiling.

  • Gauss-Siedel Iteration methodFor all iBi = EiWhile not convergedFor each i in turn

    Display the image using Bi as the intensity of patch i

  • Interpretation of IterationIteratively gather radiosity to elements

  • Progressive Radiosity

  • Progressive RadiosityInterpretation:Iteratively shoot unshot radiosity from elementsSelect shooters in order of unshot radiosity

  • Progressive Radiosity

  • Adaptive MeshingRefine mesh in areas of large errors

  • Adaptive MeshingUniform MeshingAdaptive Meshing

  • Hierarchical RadiosityRefine elements hierarchically:Compute energy exchange at different element granularity satisfying a user-specified error tolerance

  • Hierarchical Radiosity

  • Hierarchical Radiosity

  • Displaying RadiosityUsually Gouraud ShadingComputedRendered

  • RadiosityConstrained by the resolution of your subdivision patches.Have to calculate all of the geometry before you rendered an image.No reflections or specular component.

  • Path TypesOpenGLL(D|S)ERay TracingLDS*ERadiosityLD*EPath Tracingattempts to trace all rays in a scene

  • Ray TracingLDS*E PathsRays cast from eye into sceneWhy? Because most rays cast from light wouldnt reach eyeShadow rays cast at each intersectionWhy? Because most rays wouldnt reach the light sourceWorkload badly distributedWhy? Because # of rays grows exponentially, and their result becomes less influential

  • Tough CasesCausticsLight focuses through a specular surface onto a diffuse surfaceLSDEWhich direction should secondary rays be cast to detect caustic?BleedingColor of diffuse surface reflected in another diffuse surfaceLDDEWhich direction should secondary rays be cast to detect bleeding?

  • Path TracingKajiya, SIGGRAPH 86Diffuse reflection spawns infinite raysPick one ray at randomCuts a path through the dense ray treeStill cast an extra shadow ray toward light source at each step in pathTrace > 40 paths per pixel

  • Monte Carlo Path TracingIntegrate radiance for each pixel by sampling paths randomly

  • Basic Monte Carlo Path TracerChoose a ray (x, y), t; weight = 1race ray to find intersection with nearest surfaceRandomly decide whether to compute emitted or reflected lightStep 3a: If emitted, return weight * LeStep 3b: If reflected,weight *= reflectanceGenerate ray in random directionGo to step 2

  • Bi-directional Path TracingRole of source and receiver can be switched, flux does not change

  • Bi-directional Path Tracing

  • Tracing from eye

  • Tracing from light

  • Monte Carlo Path TracingAdvantagesAny type of geometry (procedural, curved, ...)Any type of BRDF (specular, glossy, diffuse, ...)Samples all types of paths (L(SD)*E)Accurate control at pixel levelLow memory consumptionDisadvantagesSlow convergenceNoise in the final image

  • Monte Carlo path tracing1000 path / pixel

  • Monte Carlo Ray TracingIts worse when you have small light sources (e.g. the sun) or lots of light and dark variation (i.e. high-frequency) in your environment.

  • Monte Carlo IntegrationThats why you always see overcast lighting like this.

  • Noise Filteringvan Jensen, StanfordUnfilteredfiltered

  • Photon MappingMonte Carlo path tracing relies on lots of camera rays to find the bright areas in a scene. Small bright areas can be a real problem. (Hence the typical overcast lighting).Why not start from the light sources themselves, scatter light into the environment, and keep track of where the light goes?

  • Photon MappingJensen EGRW 95, 96Simulates the transport of individual photonsPhotons emitted from sourcePhotons deposited on diffuse surfacesPhotons reflected from surfaces to other surfacesPhotons collected by rendering

  • What is a Photon?A photon p is a particle of light that carries flux DFp(xp, wp)Power: DFp magnitude (in Watts) and color of the flux it carries, stored as an RGB triplePosition: xp location of the photonDirection: wp the incident direction wi used to compute irradiancePhotons vs. raysPhotons propagate fluxRays gather radiance

  • SourcesPoint sourcePhotons emitted uniformly in all directionsPower of source (W) distributed evenly among photonsFlux of each photon equal to source power divided by total # of photonsFor example, a 60W light bulb would send out a total of 100K photons, each carrying a flux DF of 0.6 mWPhotons sent out once per simulation, not continuously as in radiosity

  • Russian RouletteArvo & Kirk, Particle Transport and Image Synthesis, SIGGRAPH 90, pp. 63-66.Reflected flux only a fraction of incident fluxAfter several reflections, spending a lot of time keeping track of very little fluxInstead, absorb some photons and reflect the rest at full powerSpend time tracing fewer full power photonsProbability of reflectance is the reflectance rProbability of absorption is 1 r.

  • Mixed SurfacesSurfaces have specular and diffuse components rd diffuse reflectance rs specular reflectance rd + rs < 1 (conservation of energy)Let z be a uniform random value from 0 to 1If z < rd then reflect diffuseElse if z < rd + rs then reflect specularOtherwise absorb

  • Photon MappingDirect illuminationPhoton Map

  • RenderingPhotons in photon map are collected by eye rays cast by a distributed ray tracerMultiple photon mapsIndirect irradiance mapCaustic mapRays use the radiance constructed from reflected flux density from nearest neighbor photons

  • Photon Mapping RenderingRay TracingAt each hit:Ray trace further if the contribution > threshold (more accurate)Use photon map approximation otherwiseCaustics rendered directly

  • Caustic photon mapThe caustics photon map is used only to store photons correspon

Search related