240 likes | 399 Views
Efficient Importance Sampling Techniques for the Photon Map. Ingo Wald University of Saarbrücken. Alexander Keller University of Kaiserslautern. Outline. Overview: The Photon Map method New importance sampling techniques for the Photon Map Probabilistic photon deposition
E N D
Efficient Importance SamplingTechniques for thePhoton Map Ingo Wald University of Saarbrücken Alexander Keller University of Kaiserslautern
Outline • Overview: The Photon Map method • New importance sampling techniques for the Photon Map • Probabilistic photon deposition • Automatic caustic generation • Faster direct illumination computation • Summary
The Photon Map (Jensen,’95-’98) • Basic idea : Density estimation with a discrete density of photons • 2-step algorithm • Photon generation stage • Emit photons on light sources • Random walk (trace photons through scene) • Store interactions (position x, power phi, …) • Rendering : Modified distribution ray tracing • Approximate radiance by density estimation • Query k nearest photons • Density estimation: radiance = sumOfEnergies/coveredArea • Estimate too coarse to be visualized directly Use only indirectly (final gather)
Photon Generation • Original algorithm: Pure forward simulation Visual importance not taken into account • Photon density is high (only) where illumination is high • Problematic whenever photon density doesn’t match importance distribution • High density (high cost) in unimportant regions • Low density (low quality) in important region
Bad Importance Distribution - Examples importance distribution photon distribution
Bad Importance Distribution - Examples importance distribution photon distribution
Importance Driven Photon Maps • Photon generation stage is relatively cheap • Invest more time in photon generation to improve rendering • Goal : Concentrate photons in important regions Two approaches : • Guide photons to important regions (Peter, Pietrek, ‘98) • Discard unimportant photons • Guiding photons often problematic • Fails for highly improbable light paths • Generates noise in photon energies ( artifacts) • Our approach: Discard unimportant photons • Probabilistic photon deposition • Similar work : Suykens at al, EGWR 2000
Probabilistic Photon Deposition • Initialization stage : Approximate importance • Shoot ‘importons’ from camera into scene • Store in separate importance map • Photon tracing stage • Generate deposition probability P for each new photon • Based on importance of photon location • Approximate importance with density estimation • Stochastically discard unimportant photons • Discard with probability (1-P) • On acceptance : Deposit photon with new energy phi/P • Make sure that P = 1 in important regions No noise in photon energies Unbiased
Probabilistic Photon Deposition - Results Efficiently discards unimportant photons
Probabilistic Photon Deposition - Results Efficiently discards unimportant photons Comparison at same number of traced photons : importance distribution photons, not importance driven
Probabilistic Photon Deposition - Results Efficiently discards unimportant photons Comparison at same number of traced photons : importance distribution photons, not importance driven photons, importance driven
Probabilistic Photon Deposition - Results Comparison at same number of stored photons : importance distribution photons old method photons, importance driven
Probabilistic Photon Deposition - Results Comparison at same number of stored photons : importance distribution photons old method photons, importance driven Impact on final image (same number of stored photons) without importance importance driven
Probabilistic Photon Deposition Two ways to look at results: “Emit same number of photons” • Same quality (no important photons are discarded) • Less photons during rendering phase • less storage “Same number of photons during rendering” • Higher photon tracing cost (often small compared to rendering) • Better quality • all photons are important • higher density in important regions • Often only way to reach required density if total number of photons is limited (available memory)
Automatic Caustic Generation • Problem: Caustics need higher photon density • Final gather only works for diffuse indirect illumination • Caustics have to be visualized directly (artifacts) • Higher density required • Jensen: Shoot caustic photons separately • Shoot directly to caustic generating objects • Generates onlydirectcaustics • Our approach : Extend importance driven photon deposition • Trace S times as many photons • Discard non-caustics photons with probability (S-1)/S
Automatic Caustic Generation Results • Photon generation S (typically 5-20) times as costly(Still often small compared to total rendering time) • Increases caustic density by factor S • Automatically generates indirect caustics
Automatic Caustic Generation Results • Photon generation S (typically 5-20) times as costly(Still often small compared to total rendering time) • Increases caustic density by factor S • Automatically generates indirect caustics original caustic density
Automatic Caustic Generation Results • Photon generation S (typically 5-20) times as costly(Still often small compared to total rendering time) • Increases caustic density by factor S • Automatically generates indirect caustics original caustic density higher caustic density (S=20)
Direct Illumination • Direct illumination calculated separately • Photon Map estimate too coarse Monte Carlo sampling of light sources • Send shadow rays to each light source Very expensive for lots of light sources • Real scenes: Large fraction of lights often occluded Sampling all sources equally is inefficient Importance sampling • Shoot more samples to ‘important’ light sources
Importance Driven Direct Illumination • Photon driven direct illumination computation • Estimate light source importances with Photon Map • Rough estimate is enough for importance sampling • Tag direct photons with light source id • Rendering: Estimate contribution from each light source • Based on k nearest direct photons • Select number of shadow rays per light source relative to that light source’s importance • Missing light sources • Light source may ‘by chance’ not contribute a photon Artifacts • Highly improbable if query radius is large enough
Importance Driven Direct Illumination Efficiently excludes unimportant light sources Significantly less shadow rays • Better quality at same rendering time
Importance Driven Direct Illumination Efficiently excludes unimportant light sources Significantly less shadow rays • Better quality at same rendering time Comparison at identical rendering times: original method importance driven
Summary Presented three new extensions to the Photon Map • Importance driven photon deposition • Makes complex scenes tractable • Automatic caustic generation • Can generate indirect caustics • Importance driven direct illumination • Much faster for lots of light sources with varying importance