1 introduction to global illumination jack tumblin cs 395 advanced computer graphics winter 2003

27
1 Introduction to Introduction to Global Illumination Global Illumination Jack Tumblin Jack Tumblin CS 395 Advanced Computer Graphics CS 395 Advanced Computer Graphics Winter 2003 Winter 2003

Post on 20-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

1

Introduction to Introduction to Global IlluminationGlobal Illumination

Jack TumblinJack Tumblin

CS 395 Advanced Computer GraphicsCS 395 Advanced Computer GraphicsWinter 2003Winter 2003

2

Global IlluminationGlobal Illumination

Physical Simulation Physical Simulation of Light Transport:of Light Transport:

– AccuracyAccuracyaccount for ALL light pathsaccount for ALL light pathsconservation of energyconservation of energy

– PredictionPredictionforward renderingforward renderingcalculate light meter readingscalculate light meter readings

– AnalysisAnalysisinverse renderinginverse rendering! find surface properties !! find surface properties !

– Realism?Realism?perceptually necessary?perceptually necessary?

3

LocalLocal Illumination Illumination““Everything is lit by Everything is lit by Light SourcesLight Sources””

– Screen color = Screen color = light sourcelight source * surface reflectance * surface reflectance– Refinements: Refinements:

reflectance = specular, diffuse, ambient, texture, … reflectance = specular, diffuse, ambient, texture, …light = direct*shadow +ambient+environment maps, … light = direct*shadow +ambient+environment maps, …

4

LocalLocal Illumination Illumination

““Everything is lit by Everything is lit by Light SourcesLight Sources””– Refine: point light source Refine: point light source Area light source Area light source – Result? hard shadows Result? hard shadows soft shadows soft shadows

5

GlobalGlobal Illumination Illumination

““Everything is lit by Everything is lit by Everything ElseEverything Else””– Screen color = Screen color = entire sceneentire scene * surface reflectance * surface reflectance– Refinements: Models of area light sources, caustics, Refinements: Models of area light sources, caustics,

soft-shadowing, fog/smoke, photometric calibration, … soft-shadowing, fog/smoke, photometric calibration, …

H. Rushmeier et al., SIGGRAPH`98 Course 05 “A Basic Guide to Global Illumination”H. Rushmeier et al., SIGGRAPH`98 Course 05 “A Basic Guide to Global Illumination”

6

GlobalGlobal Illumination Illumination

Idea: Idea: ALL POSSIBLE PATHSALL POSSIBLE PATHS of light source to eye: of light source to eye:

From Jensen et al.,From Jensen et al.,SIGGRAPH2000 Course 20: SIGGRAPH2000 Course 20: ‘‘A Practical Guide To Global A Practical Guide To Global

Illumination Using Photon Maps’Illumination Using Photon Maps’

7

GlobalGlobal Illumination Illumination

Idea: Idea: ALL POSSIBLE PATHSALL POSSIBLE PATHS of light source to eye: of light source to eye:

From Jensen et al.,From Jensen et al.,SIGGRAPH2000 Course 20: SIGGRAPH2000 Course 20: ‘‘A Practical Guide To Global A Practical Guide To Global

Illumination Using Photon Maps’Illumination Using Photon Maps’

8

LimitationsLimitations

• Geometric Optics Only:Geometric Optics Only:– All objects, apertures >> All objects, apertures >> (wavelength) (wavelength)– YES: Reflection, Refraction, ScatteringYES: Reflection, Refraction, Scattering– No: fringes, diffraction, dispersion* (see movie)No: fringes, diffraction, dispersion* (see movie)

• Point-Based BRDF* Point-Based BRDF* (see Wann-Jensen et al.SIGGRAPH2001…(see Wann-Jensen et al.SIGGRAPH2001…

9

Summary ISummary I

Big Ideas:Big Ideas:

– Measure Light: RadianceRadiance

– Measure Light Attenuation: : BRDFBRDF

– Light will ‘bounce around’ endlessly, decaying on each bounce: The Rendering Equation The Rendering Equation (intractable: must approximate)(intractable: must approximate)

10

Review:Review: Surface Properties Surface PropertiesPerfectly Specular:Perfectly Specular:

““Mirror”Mirror”

““infinite gloss”infinite gloss”

Phong Phong Specular Specular Model:Model:

L R cosL R cos(())

Andrew Glassner et al.. SIGGRAPH`94 Course 18:Andrew Glassner et al.. SIGGRAPH`94 Course 18:““Fundamentals and Overview of Computer Graphics”Fundamentals and Overview of Computer Graphics”

IncidentIncidentLightLightRayRay

SurfaceSurfaceNormalNormal

ReflectedReflectedLightLight

11

Review:Review: Surface Properties Surface PropertiesSlightly scattered Specular:Slightly scattered Specular:

““high gloss”high gloss”

Phong Phong Specular Specular Model:Model:

L R cosL R cos1515(())

IncidentIncidentLightLightRayRay

SurfaceSurfaceNormalNormalReflectedReflected

LightLight

Andrew Glassner et al.. SIGGRAPH`94 Course 18:Andrew Glassner et al.. SIGGRAPH`94 Course 18:““Fundamentals and Overview of Computer Graphics”Fundamentals and Overview of Computer Graphics”

12

Review:Review: Surface Properties Surface PropertiesMore Scattered Specular:More Scattered Specular:

““medium gloss”medium gloss”

Phong Phong Specular Specular Model:Model:

L R cosL R cos55(())

IncidentIncidentLightLightRayRay

SurfaceSurfaceNormalNormal

Andrew Glassner et al.. SIGGRAPH`94 Course 18:Andrew Glassner et al.. SIGGRAPH`94 Course 18:““Fundamentals and Overview of Computer Graphics”Fundamentals and Overview of Computer Graphics”

13

Review:Review: Surface Properties Surface PropertiesPerfectly DiffusePerfectly Diffuse

““flat”, “chalky”,…flat”, “chalky”,…IncidentIncidentLightLightRayRay

SurfaceSurfaceNormalNormal

Andrew Glassner et al.. SIGGRAPH`94 Course 18:Andrew Glassner et al.. SIGGRAPH`94 Course 18:““Fundamentals and Overview of Computer Graphics”Fundamentals and Overview of Computer Graphics”

14

Review:Review: Surface Properties Surface PropertiesMost Materials:Most Materials:

Combination ofCombination of

Diffuse and SpecularDiffuse and Specular

IncidentIncidentLightLightRayRay

SurfaceSurfaceNormalNormal

Andrew Glassner et al.. SIGGRAPH`94 Course 18:Andrew Glassner et al.. SIGGRAPH`94 Course 18:““Fundamentals and Overview of Computer Graphics”Fundamentals and Overview of Computer Graphics”

15

Point-wise Reflectance: Point-wise Reflectance: BRDFBRDF

BBidirectional idirectional RReflectance eflectance DDistribution istribution FFunctionunction

((i i , , i i , , r r , , r r , , i i , , r , …r , … )) == (L == (Lrr / L / Lii) ) a scalara scalar

Illuminant Illuminant LLii

Reflected Reflected LLrr

InfinitesimalInfinitesimalSolid AngleSolid Angle

16

Point-wise Light: Radiance Point-wise Light: Radiance LL

Radiance: Radiance: The Pointwise Measure of LightThe Pointwise Measure of Light

• Free-space light power Free-space light power LL ==(energy/time) ==(energy/time)

• – At At leastleast a 5D scalar function: a 5D scalar function: L(x, y, z, L(x, y, z, , , , …), …)– Position (x,y,z), Angle (Position (x,y,z), Angle (,,) and more (t, ) and more (t, , …) , …) – Power density units, but tricky…Power density units, but tricky…

SolidAnglereaProjectedAtime

energyL

**

17

Radiance UnitsRadiance UnitsTricky: think Hemispheres Tricky: think Hemispheres

with a floor:with a floor:

Solid AngleSolid Angle (steradians) (steradians)=dS = fraction of a=dS = fraction of ahemisphere’s area (4hemisphere’s area (4))

dAdA

Projected AreaProjected Area

dAdA

cos cos dA dA

SolidAnglereaProjectedAtime

energyL

**

18

Rendering EquationRendering Equation

Radiance from pointRadiance from point

..

Radiance emitted from pointRadiance emitted from point

Radiance reflected from point Radiance reflected from point (from all inward directions)(from all inward directions)

(Kajiya 1986)(Kajiya 1986)

19

Rendering EquationRendering EquationOpportunitiesOpportunities

• Scalar operations only: Scalar operations only: ()() and and L()L(), indep. of , indep. of , x,y,z, , x,y,z, ,, ……

• Linearity: Linearity: – Solution = weighted sum of one-light solns.Solution = weighted sum of one-light solns.– Many BRDFs Many BRDFs weighted sum of diffuse, specular, gloss terms weighted sum of diffuse, specular, gloss terms– SIGGRAPH2001 Result: reflected light = convolution(LSIGGRAPH2001 Result: reflected light = convolution(L inin, , ))

DifficultiesDifficulties• Almost Almost nono notrivial analytic solutions exist; notrivial analytic solutions exist;

MUST use approximate methods to solveMUST use approximate methods to solve

• Verification: tough to measure real-world Verification: tough to measure real-world ()() and and L() L() wellwell• Notable wavelength-dependent surfaces exist Notable wavelength-dependent surfaces exist

(iridescent insect wings & casing, CD grooves)(iridescent insect wings & casing, CD grooves)• BRDF doesn’t capture important subsurface scatteringBRDF doesn’t capture important subsurface scattering

20

Implementation IImplementation I

• Practical Approximations:Practical Approximations:

– Diffuse-only reflectance: Radiosity SolutionRadiosity SolutionBook presents old, slow, exact Gauss-Book presents old, slow, exact Gauss-

Seidel…Seidel…

– Bounce-by-Bounce: Progressive Refinement, Path TracingProgressive Refinement, Path Tracing

– Object-space Storage: Adaptive MeshingAdaptive Meshing

21

Remeshing ExampleRemeshing Example

22

Progressive RadiosityProgressive Radiosity

23

Implementation IIImplementation II• Practical Approximations:Practical Approximations:

– From Both Ends: Bi-directional TracingBi-directional Tracing, , • Trace from light to surfaces & store result, thenTrace from light to surfaces & store result, then• Trace from eye to surfacesTrace from eye to surfaces

– Scattering Rays where needed: • Monte-Carlo Methods, Monte-Carlo Methods, • Distributed Ray TracingDistributed Ray Tracing

– Hybrids: • Numerical Methods (Galerkin, etc.), Numerical Methods (Galerkin, etc.), • Photon Maps, Photon Maps, • Metropolis Transport, Metropolis Transport, • Particles, Illumination caching, Particles, Illumination caching, • 4D light volume sampling…4D light volume sampling…

24

Example: Photon MapsExample: Photon Maps

• Ideal:Ideal: Trace Photon Paths Trace Photon Paths

• Trouble:Trouble: high compute costs (exponential) high compute costs (exponential)

• ‘‘Photon Maps’ A Hybrid SolutionPhoton Maps’ A Hybrid Solution– ‘‘big, sticky, aggregate photons’ big, sticky, aggregate photons’ – Russian Roulette (reflect, transmit, absorb?)Russian Roulette (reflect, transmit, absorb?)– Trace photons outwards from light sourcesTrace photons outwards from light sources– Store photons only at diffuse surfacesStore photons only at diffuse surfaces– Scattered data interp., Scattered data interp., – Cache photons/illum. at each step.Cache photons/illum. at each step.

25

Example: Photon MapsExample: Photon Maps

Forward-tracedForward-traced Reverse-TracedReverse-TracedPhoton MapPhoton Map ResultResult

26

Photon Map ResultPhoton Map Result

• ..

27

ConclusionConclusion

• Physically accuratePhysically accurate (geometric optics only) (geometric optics only) simulation of light transport.simulation of light transport.

• ‘‘Ultimate Realism’Ultimate Realism’? perceptual, not physical? perceptual, not physical

• LanguishedLanguished as tweak-hungry lab curiosity as tweak-hungry lab curiosity

• Gradual adoptionGradual adoption for multitexturing source, for multitexturing source, for mixing real/synthetic images, Ph.Ds, for mixing real/synthetic images, Ph.Ds, theatre/architectural lighting, archaeology,…theatre/architectural lighting, archaeology,…

• Growing interestGrowing interest for use in inverse rendering for use in inverse rendering tasks: image-based rendering & modelingtasks: image-based rendering & modeling