New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient...

30
Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann 1,3 Arsène Pérard-Gayot 1 Philipp Slusallek 1,2 Jaroslav Kivánek 3,4 1 Saarland University 2 DFKI Saarbrücken 3 Charles University, Prague 4 Render Legion

Transcript of New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient...

Page 1: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 2: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 3: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

Reduces Variance

P. Grittmann et al. – Lightweight Photon Mapping 3

(plotted with low pass filter)

Page 4: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 5: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 6: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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)

Page 7: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

Vorba GMM – Training Phase

7

Page 8: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 9: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 10: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 11: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 12: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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(𝑥)

Page 13: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 14: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 15: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 16: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 17: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 18: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

ResultsImpact of the Full Method with Our Test Scenes

P. Grittmann et al. – Lightweight Photon Mapping 8

Page 19: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 20: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 21: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 22: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 23: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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.

Page 24: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 25: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 26: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

P. Grittmann et al. – Lightweight Photon Mapping

Page 27: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

P. Grittmann et al. – Lightweight Photon Mapping

Page 28: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

P. Grittmann et al. – Lightweight Photon Mapping

Page 29: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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

Page 30: New Efficient Caustic Rendering with Lightweight Photon Mapping · 2020. 9. 28. · Efficient Caustic Rendering with Lightweight Photon Mapping Pascal Grittmann1,3 ArsènePérard-Gayot1

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