Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Efficient Caustic Rendering with Lightweight Photon Mapping
Pascal Grittmann1,3 Arsène Pérard-Gayot1 Philipp Slusallek1,2 Jaroslav Krivánek3,4
1Saarland University 2DFKI Saarbrücken 3Charles University, Prague 4Render Legion
The Idea Behind Guiding
• Importance sampling of the 𝐿𝑖/𝑊𝑖 term (path tracing / particle tracing)• Combine with importance sampling of the BSDF• Ideally results in perfect importance sampling of the entire Light Transport Equation (LTE)!
• How to importance sample 𝑳𝒊?• Many approaches
• Usually store a representation of 𝐿𝑖 at some point in the scene and interpolate them
• Methods differ in what representations they choose and how they obtain them
2
Reduces Variance
P. Grittmann et al. – Lightweight Photon Mapping 3
(plotted with low pass filter)
Photon Mapping Already Does Guiding [Jen96]
• Heuristic classification of materials as “glossy”• Projection of caustic-casters• “Caustic map”
P. Grittmann et al. – Lightweight Photon Mapping 4
glossy
glossy
diffuse
Path Guiding Using the Photon Map
• One of the first approaches to guide• Uses nearby photons to construct a histogram of incident radiance
• Samples a cell of this histogram and a direction within the cell (uniformly)
• Histogram is a grid, each cell maps to a part of the hemisphere
5
0 0 0 0
0 2 0 0
0 0 4 0
0 0 0 0
The red photon has a luminance of 2The blue one a luminance of 4
Gaussian Mixture Models – Vorba et al. 2014
• Fits mixtures of gaussians to the incident radiance/importance at a set of points in the scene
• Project hemisphere onto plane, incident directions as bivariate Gaussians over that plane
• Gaussians are easy to sample and easy to update• Long training pass before actual rendering (~15-30 min)
Vorba GMM – Training Phase
7
Guide Photons According to Visual Importance
• [PP98] [VKS*14] [SOHK16]• Using importance sampling or MCMC
P. Grittmann et al. – Lightweight Photon Mapping 8
Example Scene Visual importance
Our Method
• Guide emission based on visual importance• Limit to paths with high variance form the path tracer
P. Grittmann et al. – Lightweight Photon Mapping 9
Example Scene Visual importanceof all photons
Our Method: only “useful” photons
Our Method Relies Only on Path Probabilities
• No (implicit) material classification• Accounts for the (relative) size of the light source
P. Grittmann et al. – Lightweight Photon Mapping 10
The Lightweight Photon Mapping Algorithm
• Based on VCM / UPS – [GKDS12] [HPJ12] • Goal: More efficient solution for large scenes with a few small caustics• MIS Combination of
• Light Tracer• Photon Mapper• Path Tracer
P. Grittmann et al. – Lightweight Photon Mapping 11
Motivation / Idea
• Existing methods: Try to be unbiased for all estimators• Looses main advantage of MIS!
• Why not ignore estimators that we know will contribute little?• A la maximum heuristics or alpha-max heuristics – but only where necessary
• Can restricting costly estimators to regions of high variance result in more efficient combined algorithms?
P. Grittmann et al. – Lightweight Photon Mapping 12
𝑓(𝑥)
𝑝1(𝑥)
𝑝2(𝑥)
The Notion of “Useful” Photons
P. Grittmann et al. – Lightweight Photon Mapping 13
𝑁𝑚𝑖𝑛 𝑝𝑃𝑀 𝑦 𝜋𝑟2
𝑝𝑃𝑇(𝑦|𝑦𝑘)> 1
“The photon mapper can reach a point within 𝑟with higher probability than the path tracer, using only 𝑁min light paths”
𝑟
𝑦𝑘𝑦𝑘−1
𝑦𝑘−2
𝑦0
How Many Photons Should We Trace?- One Per Pixel Influenced by Caustics
• VCM: One light path per pixel• With guiding: Fewer light paths are needed!
P. Grittmann et al. – Lightweight Photon Mapping 14
𝐼 = 𝐼𝑃𝑀 + 𝐼𝐿𝑇 + 𝐼𝑃𝑇
𝐼𝑃𝑀 + 𝐼𝐿𝑇𝐼𝑃𝑀 + 𝐼𝐿𝑇 + 𝐼𝑃𝑇
> 1%𝐼𝑃𝑀 + 𝐼𝐿𝑇
Rendered Image PM / LT Contribution(exposure +5)
Pixel Classification
Is that Number of Light Paths Optimal?
P. Grittmann et al. – Lightweight Photon Mapping 15
0.
0.2
0.
2
0 0
2
Ours (0.3 )
ar
time (seconds)
→ Optimal for large scenes with small Caustics
0 0
2
Ours (0.7)
till i e
time (seconds)
Is that Number of Light Paths Optimal?
P. Grittmann et al. – Lightweight Photon Mapping 16
0.
0.2
0.
2
→ Complex SDS paths require more samples from the path tracer
0 0
Ours (0. 3)
or s
time (seconds)
Is that Number of Light Paths Optimal?
P. Grittmann et al. – Lightweight Photon Mapping 17
0.
0.2
0.
2
→ For scenes that are trivial except for the caustics, a higher number would be more efficient
ResultsImpact of the Full Method with Our Test Scenes
P. Grittmann et al. – Lightweight Photon Mapping 8
Photon Densities in the Cornell Box Variations
P. Grittmann et al. – Lightweight Photon Mapping 19
Reference
Photon density – Our
Photon density – Guiding with all Photons
Photon Densities in the Cornell Box Variations
P. Grittmann et al. – Lightweight Photon Mapping 20
Reference
Photon density – Our
Photon density – Guiding with all Photons
Photon Densities in the Cornell Box Variations
P. Grittmann et al. – Lightweight Photon Mapping 21
Reference
Photon density – Our
Photon density – Guiding with all Photons
Photon Densities in the Cornell Box Variations
P. Grittmann et al. – Lightweight Photon Mapping 22
Reference
Photon density – Our
Photon density – Guiding with all Photons
The Torus – Simple Example, Directional Light
P. Grittmann et al. – Lightweight Photon Mapping 23
Path tracer(delta light)
Unguided Our
Result identical to existing guiding approaches.
Car Scene – Large Exterior Scene, Small Caustics
P. Grittmann et al. – Lightweight Photon Mapping 24
Equal-time comparison (60 seconds)
00 0
Time (seconds)
2
0
RMSE
02
Importance
Unguided
Ours
Unguided Importance Ours Reference
Car Scene – Large Exterior Scene, Small Caustics
P. Grittmann et al. – Lightweight Photon Mapping 25
Equal-time comparison (60 seconds)
Unguided Importance Ours Reference
0 0Time (seconds)
2
RMSE
02
Unguided
Importance
Ours
P. Grittmann et al. – Lightweight Photon Mapping
P. Grittmann et al. – Lightweight Photon Mapping
P. Grittmann et al. – Lightweight Photon Mapping
Limitations
• Only for caustic-casters directly in front of the light source• Resorts to path tracing for (diffuse) indirect illumination
P. Grittmann et al. – Lightweight Photon Mapping 2
Efficient Caustic Rendering with Lightweight Photon Mapping
Restrict costly estimators to a subset of the domain
→ More efficient MIS combination
30
Pascal Grittmann Arsène Pérard-Gayot Philipp Slusallek Jaroslav Krivánek
𝑟
𝑦𝑘𝑦𝑘−1
𝑦𝑘−2
𝑦0
Reference
Our
Importancedriven
Reference PM / LT contribution Our pixel classification
Unguided Importance Ours Reference