on robust monte carlo algorithms for multi-pass global illumination frank suykens – de laet 17...

61
On robust Monte Carlo On robust Monte Carlo algorithms for multi-pass algorithms for multi-pass global illumination global illumination Frank Suykens – De Laet 17 September 2002

Upload: jodie-potter

Post on 21-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

On robust Monte Carlo On robust Monte Carlo algorithms for multi-pass global algorithms for multi-pass global

illuminationillumination

Frank Suykens – De Laet

17 September 2002

Page 2: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 3: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 4: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Realistic image synthesisRealistic image synthesis• Goal: Compute images that appear

to an observer as real photographs

Which one is real?

Page 5: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Realistic image synthesisRealistic image synthesis• Applications

– Architecture

– Movie industry

– Lighting design

– Computer games

– Archeology

– Product design

– …

Page 6: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

Page 7: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Position, size, … (e.g., CAD)

Page 8: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Diffuse paint, glass, metal, …

BSDF

Page 9: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Materials: BSDFMaterials: BSDF

• Bidirectional scattering distribution function (reflection & transmission)

x

Fraction of incoming radiance L(x ) that is scattered into the direction θ

),( sf

Page 10: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

BSDF ComponentsBSDF Components

Diffuse (D) Glossy (G) Specular (S)

Diffuse, glossy and specular: (D|G|S) = X

Page 11: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Position, brightness, spotlight, …

Page 12: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Position, viewing angle, …

Page 13: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

• Geometry

• Materials

• Light sources

• Camera/Eye

Page 14: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Compute illuminationCompute illumination• For every pixel: how much light passes through?

Account for all possible paths from light to eye!

Global illumination

Light TransportSimulation

Page 15: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Global illuminationGlobal illumination

• Mathematical basis for light transport

Outgoing radiance L in x in direction θ ?

x

L ??)( xL

Rendering equation

Light TransportSimulation

Page 16: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Rendering equationRendering equation

dfxLxLxL se cos),()()()(

= +Radiance

x

L

Integration over all directions

BSDFUnknown incomingradiance

x

Le

Self emitted radiance

Lr

Reflected (& refracted) radiance

x

Light TransportSimulation

Recursive

Page 17: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

• Geometry

• Materials

• Light sources

• Camera/Eye

• Global illumination

• Rendering equation

Page 18: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 19: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Example sceneExample scene

Specular refraction

Caustics

Indirect caustics

Indirect illumination

Many different illumination features:

We want a full global illumination solution!

Page 20: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Algorithms for global Algorithms for global illuminationillumination

• Computation: Numerical integration– Monte Carlo integration

• Algorithms– Image space algorithms

• Stochastic ray tracing• Particle tracing• Bidirectional path tracing

– Object space algorithms• Radiosity

Page 21: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Monte Carlo integrationMonte Carlo integration

• Estimate integrals by random sampling– draw a number of random samples– average their contribution

estimate of integral

• Statistical errors Noise in images• Convergence: More samples, less

noise

Page 22: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Stochastic ray tracingStochastic ray tracing

• Trace paths starting from the eye

9 paths/pixel

L

E

Monte Carlo integration

Page 23: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Particle tracingParticle tracing

• Trace paths starting from the light

9 paths/pixel

L

E

Pattanaik ’92, Dutré ’93

Page 24: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Bidirectional path tracingBidirectional path tracing

• Trace paths starting from the light AND the eye

L

E

Lafortune ’93, Veach ’94

Page 25: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

ComparisonComparison

Same computation time (± 5 min.)

Stochastic ray tracing

(9 samples per pixel)

Particle tracing

(9 samples per pixel)

Bidirectional path tracing

(4 samples per pixel)

Page 26: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Radiosity methodsRadiosity methods

• Object space method• Diffuse surfaces only• View independent

Galerkin radiosity

Page 27: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 28: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 29: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Multi-pass methodsMulti-pass methods

• Combine different algorithms

• Separate light transport– Based on BSDF components– Different algorithms different illumination

– Preserve strengths of individual algorithms

• Regular expressions (e.g., LD* , LX*E )– derive path evaluation from regular expression

Page 30: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Radiosity & stochastic ray Radiosity & stochastic ray tracing tracing

LD*(G|S)X*E LX*E

E

D|G|S

LD*

G|S

Full global illuminationbut

drawbacks of stoch. ray tracing

Combine with bidirectional path tracing

1. Radiosity

2. Stochastic ray tracing

Use radiosity solution at end points

Page 31: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Multi-pass configurationMulti-pass configuration

+ +

BPT Use weighting Rad + SR

L(G|S)X*E

LD(G|S)X*E+ LDE

???

Self-emitted light

Direct diffuse

Indirect diffuse

LDD+(G|S)X*E+ LDD+E

Page 32: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

• Weighting instead of separation– allow overlapping transport between

different algorithms– weight individual paths

automatic ‘separation’

• Technique– General Monte Carlo variance reduction

technique– Constraints, weighting heuristics

Weighted multi-pass Weighted multi-pass methodsmethods

Page 33: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Results (unweighted)Results (unweighted)

Bidirectional path tracing Radiosity + stoch. ray tracing

LD(G|S)X*E + LDE LD(G|S)X*E + LDE

Page 34: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Results (weighted)Results (weighted)

+

Bidirectional path tracing Radiosity + stoch. ray tracing

LD(G|S)X*E + LDE

Page 35: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Final resultFinal result

BPT only

Radiosity + Stoch. RT

Weighted combination

Radiosity + Stoch. RT and

Bidirectional path tracing

Page 36: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Conclusion: WMPConclusion: WMP

• Multi-pass methods– separation: path evaluation from regular

expression– weighting: each path is weighted

individually automatic ‘separation’

• General technique• Robust combination of bidirectional

path tracing and radiosity

Page 37: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 38: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Path differentialsPath differentials

• Idea– Many algorithms trace paths– A path is infinitely thin: no neighborhood

information– Knowledge about ‘region of influence’ or

‘footprint ’ would be useful in many applications:• bias-noise trade-off

• Footprint definition• Path differentials

Page 39: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Path footprintPath footprint

• Path = function of random variables– direction sampling, light source sampling, …

),( 21 uux

),,,( 4321 uuuuy

Page 40: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Path footprintPath footprint

• Variables change path perturbation

),( 2211 uuuux

),( 11 uuy

Page 41: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Path footprintPath footprint

• Set of path perturbations footprint

x

y

Page 42: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Path differentialsPath differentials

• Partial derivatives– approximate perturbations– combine into footprint (first order Taylor

approx.)– footprint estimate from a single path!

iu

x

iu

y

Page 43: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

ApplicationsApplications

• Path differentials widely applicable– Any Monte Carlo path sampling

algorithm

•Texture filtering•Hierarchical particle tracing radiosity•Importance maps

Page 44: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Application: hierarchical Application: hierarchical radiosityradiosity

• Particle tracing radiosity

L

• Trace light paths

• Each hit contributes to the illumination of the element

In which level should the particle contribute? Path differentials: size

of footprint size of element

Small elements noise

Large elements blurfixed

hierarchical

Page 45: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Application: hierarchical Application: hierarchical radiosityradiosity

Fixed size (large) Fixed size (small)

Path differentials

Page 46: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Application: hierarchical Application: hierarchical radiosityradiosity

Fixed size (large) Fixed size (small)

Path differentials

Page 47: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Conclusion: Path Conclusion: Path differentialsdifferentials

• New, robust technique to compute path footprint

• Handles general BSDFs, complex geometry

• Many applications in global illumination

Page 48: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 49: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Photon mappingPhoton mapping

• Popular 2-pass global illumination algorithm

Jensen ’96, …

1. Particle tracing

• trace light paths

Page 50: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

1. Particle tracing

• trace light paths

• record all hitpoints

Photon mappingPhoton mapping

• Popular 2-pass global illumination algorithm

Set of photons: ‘Photon map’ Jensen ’96, …

Page 51: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Photon mappingPhoton mapping

• Density of photons radiance estimate

Photon hits Radiance estimate

Page 52: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Photon mapping: second Photon mapping: second passpass• Global map: indirect visualization• Caustic map: direct visualization

Global map

Caustic map

Final image

2. Stochastic ray tracing

indirect

direct

Page 53: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Photon Photon mappingmapping

examples examples

Page 54: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Photon mappingPhoton mapping• Advantages

– efficient, full global illumination– robust (photon map independent of

geometrical complexity)

• Difficulties– many photons a lot of memory!– how many photons needed?

Density control

Page 55: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Density controlDensity control

• Only store photons when more photons are needed– choose target density– new photon hit: target density reached?

No store photonYes redistribute photon

power among neighbors

Page 56: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Density controlDensity control• Target density? Importance maps

Path differentials can be used!

Trace ‘importons’ from eye

importance map

Overview Viewpoint

Target densityError analysis

Page 57: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Results: photon map Results: photon map constructionconstruction

Actual density of photon map

Radiance estimate

No density control, 400.000

photons

Density control, 57.000 photons

Page 58: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Results: final imageResults: final image

No density control, 400.000 photons

With density control, 57.000 photons

No visible difference with 1/7th of the photons

Page 59: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

Conclusion: Density controlConclusion: Density control

• Fewer photons: memory efficient

• Global & Caustic map

• Important step towards error control

Page 60: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Conclusion

Page 61: On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002

ConclusionConclusion• General techniques to construct better,

more robust global illumination methods– Weighted multi-pass methods– Path differentials– Density control for photon maps

• Wide applicability (general scenes, other algorithms)

• Future work:– improved techniques– more applications

• RenderPark: our freely available global illumination software (www.renderpark.be)