Tobias Zirr, Johannes Hanika, and Carsten Dachsbacher
Computer Graphics Forum
Abstract
Samples with high contribution but low probability density, often called fireflies, occur in all practical Monte Carlo estimators and are part of computing unbiased estimates. For finite-sample estimates, however, they can lead to excessive variance. Rejecting all samples classified as outliers, as suggested in previous work, leads to estimates that are too low and can cause undesirable artifacts. In this paper, we show how samples can be reweighted depending on their contribution and sampling frequency such that the finite-sample estimate gets closer to the correct expected value and the variance can be controlled. For this, we first derive a theory for how samples should ideally be reweighted and that this would require the probability density function of the optimal sampling strategy. As this PDF is generally unknown, we show how the discrepancy between the optimal and the actual sampling strategy can be estimated and used for reweighting in practice. We describe an efficient algorithm that allows for the necessary analysis of per-pixel sample distributions in the context of Monte Carlo Rendering without storing any individual samples, with only minimal changes to the rendering algorithm. It causes negligible runtime overhead, works in constant memory, and is well-suited for parallel and progressive rendering. The reweighting runs as a fast postprocess, can be controlled interactively, and our approach is non-destructive in that the unbiased result can be reconstructed at any time.
Downloads
Preprint |
Supplemental Video (LQ on YT) |
Mitsuba (HDR Film) Extension (C++) |
Cascaded Splatting (C++) |
Re-Weighting (GLSL) |
Interactive Online Tool (WebGL) |
Interactive WebGL Demo Implementation
The online viewer may be used for interactive re-weighting of Monte Carlo Rendering results in a post process, either by selecting your own framebuffer files or looking at one of the following online examples from the paper (about 20 MB of download each!):
Bathroom [18 MB] |
Flashlight [12 MB] |
Torus [7.5 MB] |