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

Post on 21-Jan-2016

216 views 0 download

Tags:

transcript

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

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

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

to an observer as real photographs

Which one is real?

Realistic image synthesisRealistic image synthesis• Applications

– Architecture

– Movie industry

– Lighting design

– Computer games

– Archeology

– Product design

– …

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

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

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Diffuse paint, glass, metal, …

BSDF

Materials: BSDFMaterials: BSDF

• Bidirectional scattering distribution function (reflection & transmission)

x

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

),( sf

BSDF ComponentsBSDF Components

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

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

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Position, brightness, spotlight, …

Scene descriptionScene description

• Geometry• Materials• Light sources• Camera / Eye

Position, viewing angle, …

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

• Geometry

• Materials

• Light sources

• Camera/Eye

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

Account for all possible paths from light to eye!

Global illumination

Light TransportSimulation

Global illuminationGlobal illumination

• Mathematical basis for light transport

Outgoing radiance L in x in direction θ ?

x

L ??)( xL

Rendering equation

Light TransportSimulation

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

Realistic image synthesisRealistic image synthesis

Scene description

Light TransportSimulation

Compute illumination

Image

• Geometry

• Materials

• Light sources

• Camera/Eye

• Global illumination

• Rendering equation

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

Example sceneExample scene

Specular refraction

Caustics

Indirect caustics

Indirect illumination

Many different illumination features:

We want a full global illumination solution!

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

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

Stochastic ray tracingStochastic ray tracing

• Trace paths starting from the eye

9 paths/pixel

L

E

Monte Carlo integration

Particle tracingParticle tracing

• Trace paths starting from the light

9 paths/pixel

L

E

Pattanaik ’92, Dutré ’93

Bidirectional path tracingBidirectional path tracing

• Trace paths starting from the light AND the eye

L

E

Lafortune ’93, Veach ’94

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)

Radiosity methodsRadiosity methods

• Object space method• Diffuse surfaces only• View independent

Galerkin radiosity

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

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

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

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

• 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

Results (unweighted)Results (unweighted)

Bidirectional path tracing Radiosity + stoch. ray tracing

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

Results (weighted)Results (weighted)

+

Bidirectional path tracing Radiosity + stoch. ray tracing

LD(G|S)X*E + LDE

Final resultFinal result

BPT only

Radiosity + Stoch. RT

Weighted combination

Radiosity + Stoch. RT and

Bidirectional path tracing

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

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

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

Path footprintPath footprint

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

),( 21 uux

),,,( 4321 uuuuy

Path footprintPath footprint

• Variables change path perturbation

),( 2211 uuuux

),( 11 uuy

Path footprintPath footprint

• Set of path perturbations footprint

x

y

Path differentialsPath differentials

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

approx.)– footprint estimate from a single path!

iu

x

iu

y

ApplicationsApplications

• Path differentials widely applicable– Any Monte Carlo path sampling

algorithm

•Texture filtering•Hierarchical particle tracing radiosity•Importance maps

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

Application: hierarchical Application: hierarchical radiosityradiosity

Fixed size (large) Fixed size (small)

Path differentials

Application: hierarchical Application: hierarchical radiosityradiosity

Fixed size (large) Fixed size (small)

Path differentials

Conclusion: Path Conclusion: Path differentialsdifferentials

• New, robust technique to compute path footprint

• Handles general BSDFs, complex geometry

• Many applications in global illumination

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

Photon mappingPhoton mapping

• Popular 2-pass global illumination algorithm

Jensen ’96, …

1. Particle tracing

• trace light paths

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, …

Photon mappingPhoton mapping

• Density of photons radiance estimate

Photon hits Radiance estimate

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

Photon Photon mappingmapping

examples examples

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

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

Density controlDensity control• Target density? Importance maps

Path differentials can be used!

Trace ‘importons’ from eye

importance map

Overview Viewpoint

Target densityError analysis

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

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

Conclusion: Density controlConclusion: Density control

• Fewer photons: memory efficient

• Global & Caustic map

• Important step towards error control

OverviewOverview

• Introduction– Realistic image synthesis– Global illumination

• Algorithms for global illumination• Contributions

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

• Conclusion

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)