延伸阅读(Further Reading

蒙特卡罗方法是在数字计算机发展后不久由斯坦尼斯瓦夫·乌拉姆和约翰·冯·诺依曼引入的(乌拉姆等,1947),尽管恩里科·费米似乎也独立发明了该方法(梅特罗波利斯,1987)。关于蒙特卡罗的早期论文是由梅特罗波利斯和乌拉姆撰写的(1949)。

关于蒙特卡罗积分,已经有许多书籍问世。Hammersley 和 Handscomb(1964)、Spanier 和 Gelbard(1969)以及 Kalos 和 Whitlock(1986)是经典参考文献。关于该主题的更近期书籍包括 Sobol(1994)、Fishman(1996)和 Liu(2001)的著作。我们还发现 Owen 的在编书籍(2019)是一个宝贵的资源。Motwani 和 Raghavan(1995)撰写了一本关于随机算法更广泛主题的优秀介绍。

在渲染中,大多数感兴趣的函数是非负的;对负函数应用重要性采样需要特别小心。一种简单的选择是定义一个与函数的绝对值成比例的采样分布。有关此类函数的更有效的采样方法,请参见 Owen 和 Zhou(2000)。

多重重要性采样是由 Veach 和 Guibas(Veach 和 Guibas 1995;Veach 1997)开发的。通常,使用每种采样技术会预先确定样本数量;有关自适应分配样本以减少方差的策略,请参见 Pajot 等人(2011)和 Lu 等人(2013)。Grittmann 等人(2019)跟踪了每种采样技术的方差,然后动态调整 MIS 权重。MIS 补偿方法是由 Karlík 等人(2019)开发的。

Sbert 及其合作者(2016, 2017, 2018)对 MIS 估计量进行了进一步的方差分析,并基于根据每种技术的方差和成本分配样本的方法进行了改进。Kondapaneni 等人(2019)考虑了 MIS 的推广,以包括负权重,并在该设置中推导出最优估计量。West 等人(2020)考虑了可用的连续采样技术的情况,并为该情况推导出最优的 MIS 估计量,而 Grittmann 等人(2021)在样本之间存在相关性时(例如,在双向光传输算法中)开发了改进的 MIS 估计量。

Heitz(2020)描述了一种基于反演的采样方法,当一维函数的累积分布函数(CDF)反演不可行时可以应用。该方法基于从一个近似于第一个函数的第二个函数中进行采样,然后使用第二个随机变量来调整样本,以匹配原始函数的分布。Anderson 等人(2017)描述了一种有趣的替代手动推导采样技术的方法,他们开发了一种特定领域的采样语言,在给定采样算法实现的情况下,概率会自动计算。他们通过简洁的实现展示了他们方法的有效性,涵盖了多种复杂的采样技术。

SampleLinear() 中使用的数值稳定采样技术是基于 Muller 方法(1956)的应用,来源于 Heitz(2020)。

在图形学中蒙特卡罗应用中,积分函数通常是多个因子的乘积,而没有适合整个乘积的采样分布。虽然多重重要性采样在这种情况下可以给出合理的结果,至少可以减少无效采样技术带来的方差,但仍然更倾向于对整个乘积进行采样。Talbot 等(2005)将 重要性重采样(importance resampling) 应用于这个问题,从某个分布中进行多次采样,然后根据与完整积分函数成比例的概率在这些样本中进行选择。最近,Hart 等(2020)提出了一种基于扭曲均匀样本的简单技术,可以用来近似乘积采样。有关此主题的更多信息,请参见第 13 章和第 14 章的“延伸阅读”部分,这些部分讨论了特定光传输算法背景下的乘积采样方法。

调试蒙特卡罗算法可能具有挑战性,因为决定其正确性的是它们的期望行为:很难判断特定样本的程序执行是否正确。统计测试可以是检查其正确性的有效方法。有关适用技术,请参见 Subr 和 Arvo(2007a)以及 Jung 等人(2020)的论文。

另见附录 A 中的“延伸阅读”部分,其中包含有关实现采样算法以及相关方法的信息。

参考文献(References)

  • Anderson, L., T.-M. Li, J. Lehtinen, and F. Durand. 2017. Aether: An embedded domain specific sampling language for Monte Carlo rendering. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2017) 36 (4), 99:1–16.
  • Fishman, G. S. 1996. Monte Carlo: Concepts, Algorithms, and Applications. New York: Springer-Verlag.
  • Grittmann, P., I. Georgiev, and P. Slusallek. 2021. Correlation-aware multiple importance sampling for bidirectional rendering algorithms. Computer Graphics Forum (Proceedings of Eurographics) 40 (2), 231–38.
  • Grittmann, P., I. Georgiev, P. Slusallek, and J. Křivánek. 2019. Variance-aware multiple importance sampling. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2019) 38 (6), 152:1–9.
  • Hammersley, J., and D. Handscomb. 1964. Monte Carlo Methods. New York: John Wiley.
  • Hart, D., M. Pharr, T. Müller, W. Lopes, M. McGuire, and P. Shirley. 2020. Practical product sampling by fitting and composing warps. Computer Graphics Forum 39 (4), 149–58.
  • Heitz, E. 2020. Can’t invert the CDF? The triangle-cut parameterization of the region under the curve. Computer Graphics Forum 39 (4), 121–32.
  • Jung, A., J. Hanika, and C. Dachsbacher. 2020. Detecting bias in Monte Carlo renderers using Welch’s t-test. Journal of Computer Graphics Techniques (JCGT) 9 (2), 1–25.
  • Kalos, M. H., and P. A. Whitlock. 1986. Monte Carlo Methods: Volume I: Basics. New York: Wiley.
  • Karlík, O., M. Šik, P. Vévoda, T. Skřivan, and J. Křivánek. 2019. MIS compensation: Optimizing sampling techniques in multiple importance sampling. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia) 38 (6), 151:1–12.
  • Kondapaneni, I., P. Vévoda, P. Grittmann, T. Skřivan, P. Slusallek, and J. Křivánek. 2019. Optimal multiple importance sampling. ACM Transactions on Graphics (Proceedings of SIGGRAPH) 37 (4), 37:1–14.
  • Liu, J. S. 2001. Monte Carlo Strategies in Scientific Computing. New York: Springer-Verlag.
  • Lu, H., R. Pacanowski, and X. Granier. 2013. Second-order approximation for variance reduction in multiple importance sampling. Computer Graphics Forum 32 (7), 131–36.
  • Metropolis, N. 1987. The beginning of the Monte Carlo method. Los Alamos Science Special Issue 15, 125–30.
  • Metropolis, N., and S. Ulam. 1949. The Monte Carlo method. Journal of the American Statistical Association 44 (247), 335–41.
  • Motwani, R., and P. Raghavan. 1995. Randomized Algorithms. Cambridge, U.K.: Cambridge University Press.
  • Muller, D. E. 1956. A method for solving algebraic equations using an automatic computer. Mathematical Tables and Other Aids to Computation 10 (56), 208–15.
  • Owen, A. B. 1998. Latin supercube sampling for very high-dimensional simulations. Modeling and Computer Simulation 8 (1), 71–102.
  • Owen, A. B. 2019. Monte Carlo theory, methods and examples. https://statweb.stanford.edu/ owen/mc/.
  • Owen, A., and Y. Zhou. 2000. Safe and effective importance sampling. Journal of the American Statistical Association 95 (449), 135–43.
  • Pajot, A., L. Barthe, M. Paulin, and P. Poulin. 2011. Representativity for robust and adaptive multiple importance sampling. IEEE Transactions on Visualization and Computer Graphics 17 (8), 1108–21.
  • Ross, S. M. 2002. Introduction to Probability Models (8th ed.). San Diego: Academic Press.
  • Sbert, M., and V. Havran. 2017. Adaptive multiple importance sampling for general functions. The Visual Computer 33, 845–55.
  • Sbert, M., V. Havran, and L. Szirmay-Kalos. 2016. Variance analysis of multi-sample and one-sample multiple importance sampling. Computer Graphics Forum 35 (7), 451–60.
  • Sbert, M., V. Havran, and L. Szirmay-Kalos. 2018. Multiple importance sampling revisited: Breaking the bounds. EURASIP Journal on Advances in Signal Processing 15, 1–15.
  • Sobol, I. M. 1994. A Primer for the Monte Carlo Method. Boca Raton: CRC Press.
  • Spanier, J., and E. M. Gelbard. 1969. Monte Carlo Principles and Neutron Transport Problems. Reading, Massachusetts: Addison-Wesley.
  • Subr, K., and J. Arvo. 2007a. Statistical hypothesis testing for assessing Monte Carlo estimators: Applications to image synthesis. In Pacific Graphics ’97, 106–15.
  • Talbot, J., D. Cline, and P. Egbert. 2005. Importance resampling for global illumination. Rendering Techniques 2005: 16th Eurographics Workshop on Rendering, 139–46.
  • Ulam, S., R. D. Richtmyer, and J. von Neumann. 1947. Statistical methods in neutron diffusion. Los Alamos Scientific Laboratory Report LAMS-551.
  • Veach, E. 1997. Robust Monte Carlo methods for light transport simulation. Ph.D. thesis, Stanford University.
  • Veach, E., and L. J. Guibas. 1995. Optimally combining sampling techniques for Monte Carlo rendering. In Computer Graphics (SIGGRAPH ’95 Proceedings), 419–28.
  • West, W., I. Georgiev, A. Gruson, and T. Hachisuka. 2020. Continuous multiple importance sampling. ACM Transactions on Graphics (Proceedings of SIGGRAPH) 39 (4), 136:1–12.