生产中的 Path Guiding
Jiří Vorba (组织者) Weta Digital
Thomas Müller NVIDIA¹
Johannes Hanika (组织者) Weta Digital
Jaroslav Křivánek 查尔斯大学,布拉格 Render Legion
Sebastian Herholz 蒂宾根大学
Alexander Keller NVIDIA
SIGGRAPH 2019 课程


图 1:Path guiding 能够高效渲染那些出了名困难的光传输条件。这些来自《阿丽塔:战斗天使》的制作镜头展示了它的多功能性。我们能够将其应用于阿丽塔眼睛的特写镜头,其中包含 specular-diffuse-specular caustics,以及广阔的水下场景,其中有 god-rays 和湖床上的 caustics,在 volume 中,以及在主角身上。©2018 二十世纪福克斯电影公司。保留所有权利。
允许个人或课堂使用本作品的部分或全部内容制作数字或硬拷贝,无需付费,前提是这些拷贝不得用于盈利或商业目的,并且拷贝必须附有本声明和首页的完整引用。必须尊重本作品中第三方组件的版权。对于所有其他用途,请联系所有者/作者。版权归所有者/作者所有。SIGGRAPH ’19 Courses,2019 年 7 月 28 日至 8 月 1 日,美国加利福尼亚州洛杉矶 ACM 978-1-4503-6307-5/19/07。10.1145/3305366.3328091
摘要
Path guiding 是物理渲染中一系列自适应方差缩减技术,包括对直接和间接光照、表面和 volume 进行采样的方法,也包括对最优路径长度进行采样和做出分裂决策的方法。自从几年前 path tracing 成为 VFX 行业事实上的标准以来,人们对以每像素少量 Monte Carlo 样本生成高质量图像的兴趣日益增加。Path guiding 在过去几年中受到研究界的关注,已被证明对此任务有用,因此已被 Weta Digital 采用。最近,它也在 Walt Disney Animation Studios 的 Hyperion 和 Pixar 的 Renderman 中实现。本课程的目标是分享我们在生产中使用 path guiding 的实践经验,提供对最近发表技术的自包含概述,并讨论它们的优缺点。我们还将带领听众了解各种 path guiding 方法的理论背景,这些方法大多基于机器学习——用于根据观察到的样本调整采样分布——以及零方差随机游走理论——用作以最优方式组合不同采样决策的框架。在课程结束时,我们将讨论未解决的问题,并邀请研究人员在未来的工作中进一步发展 path guiding。
注意
本手稿为草稿。您可以在 http://cgg.mff.cuni.cz/\~jirka/path-guiding-in-production/2019/index.html 找到最终版本。
1 目标 4
2 教学大纲 5
2.1 14:00 — 开场陈述与介绍,Jiri Vorba (15 分钟) 5
2.2 14:15 — 理论背景,Jaroslav Krivanek (15 分钟) 5
2.3 14:15 — Many-light 采样中的 Bayesian Inference,Jaroslav Krivanek(15 分钟)5
2.4 14:45 — Guiding 与阴影光线,Alexander Keller(30 分钟)5
2.5 15:15 — 生产中的 Guiding 方法,Thomas Müller(30 分钟)5
2.6 15:45 — 休息(15 分钟)6
2.7 16:00 — Volumetric 路径引导,Sebastian Herholz(30 分钟)6
2.8 16:30 — 路径空间中的 Guiding,Johannes Hanika(30 分钟)6
2.9 17:00 — 开放问题与未来工作,Jiri Vorba(15 分钟)6
3 组织者 8
3.1 Jirí Vorba,Weta Digital 8
3.2 Johannes Hanika,Weta Digital 8
4 演讲者 8
4.1 Sebastian Herholz,蒂宾根大学 8
4.2 Thomas Müller,NVIDIA . 8
4.3 Jaroslav Krivánek,查尔斯大学/Render Legion 9
4.4 Alexander Keller,NVIDIA . 9
5 引言 10
5.1 目标 10
5.2 课程概览 11
6 理论背景 12
6.1 Monte Carlo 光传输算法 . . 12
6.2 数据驱动的统计学习 12
6.3 零方差理论 12
6.4 机器学习基础 12
7 Path Guiding 13
7.1 应用 13
7.2 直接光照. 14
7.3 间接光照. 15
7.4 直接与间接光照的结合 15
7.5 焦散. 16
7.6 光泽间接光照. . 16
7.7 引导式俄罗斯轮盘赌与分裂 17
7.8 引导式光源/光子追踪发射 . . 18
7.9 Path Guiding 与高级双向算法 19
7.10 不同方法 . . 20
7.11 成功引导方法的要求 20
8 多光源采样中的 Bayesian Inference 24
9 引导与阴影光线 25
9.1 Importance Sampling 25
9.1.1 Resampling Importance Sampling . . 26
9.1.2 光源层次结构 26
9.1.3 包含可见性 26
9.2 部分累积分布函数 27
9.2.1 Multiple Importance Sampling 27
9.2.2 哈希与随机插值 28
9.3 光子引导的阴影光线 28
9.4 学习发射哪些阴影光线 28
9.5 结论 28
10 生产中的“Practical Path Guiding” 34
10.1 引言 34
10.2 PPG 算法 35
10.2.1 用于存储入射辐射率的 SD-tree . . 35
10.2.2 迭代学习与渲染 . . 36
10.3 扩展1:逆方差加权样本组合 37
10.4 扩展2:向 SD-tree 进行空间-方向 splatting . . 38
10.5 扩展3:MIS 选择概率的优化 40
10.5.1 最小化 Kullback-Leibler 散度 41
10.5.2 将 MIS 优化集成到 PPG 中 43
10.6 伴随驱动的俄罗斯轮盘赌与分裂 44
10.7 其他实现细节 44
10.8 遗留问题与未来工作 45
10.9 结论 45
11 Volumetric 零方差路径引导 47
11.1 引言 47
11.2 Volumetric 路径引导 49
11.3 Volumetric 辐射亮度估计 50
11.3.1 入射辐射亮度估计 51
11.3.2 内散射辐射亮度估计 51
11.4 引导采样决策 51
11.4.1 引导乘积距离采样 51
11.4.2 引导乘积方向采样 55
11.4.3 引导俄罗斯轮盘赌与分裂 56
11.5 集成到渲染系统的细节 59
11.5.1 训练/拟合入射辐射亮度分布 … 60
11.5.2 相位函数表示 . 65
12 路径空间中的引导 68
12.1 引言 68
12.2 概述 68
12.3 选择引导路径 . 70
12.4 采样新路径 70
12.5 确定高斯分布的大小 . 71
12.6 讨论 71
13 开放问题与未来工作
74
1 目标
在本课程中,我们分享我们在使用引导方法方面的实践经验,这些经验来自在Weta Digital的生产渲染器Manuka中使用引导方法,以及在华特迪士尼动画工作室使用的渲染器Hyperion中实现引导。本课程的另一个目标是对最近发表的关于各种引导方法的著作进行梳理。有些方法是相互竞争的,有些是正交的,有些可以部分结合以形成更好的采样方案。我们识别这些关系,并为未来研究的重要方向提供建议。我们还为不熟悉引导方法的人提供介绍,涵盖理论以及来自机器学习或中子输运等各个领域的一些概念,这些是引导方法背后的基础。
总之,我们的主要目标是
• 分享在生产中使用引导方法的实践经验,
• 概述当前的引导方法并讨论它们的优缺点,
• 涵盖理论背景,使听众对 path guiding 有扎实的理解,以及
• 与社区分享该领域的开放问题和可能的研究课题。
2 课程大纲
2.1 14:00 — 开场陈述与介绍,Jiri Vorba(15分钟)
我们将 path guiding 介绍为一类用于减少基于 Monte Carlo 的路径追踪器中方差的方法,并阐述本课程的目标(见上文)。我们提供在生产中采用 path guiding 的动机,概述一些典型场景,其中 path guiding 方法可以大幅减少追踪路径的数量(例如间接照明、焦散、在多光源之间选择),并根据它们试图改进的随机决策对这些方法进行分类。
2.2 14:15 — 理论背景,Jaroslav Krivanek(15分钟)
我们简要回顾基本的 Monte Carlo 渲染算法,如 path tracing、light tracing、photon mapping 或 bidirectional path tracing。我们将“path guiding”的含义定义为在路径构建中尝试执行全局最优决策。我们讨论各种数据驱动的方法来学习重要性,并将其与统计学习中的基本问题(如密度估计和回归)联系起来。我们简要讨论与零方差随机游走理论的关系,并列出良好 guiding 方法的理论和实践要求,如计算效率、低内存开销、在简单场景中的最小开销、鲁棒性等。
2.3 14:15 — 多光源采样中的贝叶斯推断,Jaroslav Krivanek(15分钟)
制作场景通常包含数十、数百甚至数千个光源,而整个场景中只有不同的子集可见。这使得直接照明的采样变得具有挑战性且不可预测。如果 path guiding 仅为间接照明学习最优采样决策,那么来自选择光源连接的方差仍然可能很大。Jaroslav 将讨论 Vévoda 等人最近的一种方法。$$ 2018
# 2.4 14:45 — Guiding and Shadow Rays, Alexander Keller (30 min) Alex will introduce an alternative data-driven approach to many-light sampling which computes and stores light source visibility first, and makes good use of this information during next-event estimation. This results in a guiding technique for shadow rays, and has the potential to greatly reduce noise in path tracing. # 2.5 15:15 — Guiding methods in production, Thomas Müller (30 min) We implemented the “Practical Path Guiding” algorithm $$ Müller et al., 2017 $$ in Disney’s Hyperion renderer $$ Burley et al., 2018 $$ for use in movie production. Thomas will introduce the algorithm at a high level and describe three extensions based on recently published material Müller et al. $$ 2018 $$ that we developed to further improve the algorithm’s effectiveness in a production environment. These extensions are (i) inverse-variance-weighted sample combination to avoid wasted samples, (ii) spatio-directional filtering to increase robustness against high-frequency illumination, and (iii) on-line learning of the BSDF : guiding ratio to improve handling of highly glossy materials. Mitsuba source code containing the extensions is available publicly at https://github.com/tom94/practical-path-guiding. ## 2.6 15:45 — 休息(15分钟) ## 2.7 16:00 — Volumetric path guiding,Sebastian Herholz(30分钟) 在参与介质中,路径构建受到散射方向和距离采样、Russian roulette 以及分裂策略的影响。Sebastian 将介绍一种 volumetric 路径构建技术 Herholz 等人。$$ 2019 $$ where all these sampling decisions are guided by a cached estimate of the adjoint light transport solution. This sampling strategy is based on the theory of zero-variance transport estimators, and it accounts for the spatial and directional variation in volumetric transport. Specifically, paths are constructed incrementally by sampling collision distances proportionally to the product of transmittance and the adjoint transport solution (i.e., in-scattered radiance). Scattering directions are likewise sampled according to the product of the phase function and the incident radiance estimate. Combined with an adaptive Russian roulette and splitting strategy tailored to volumes, variance is greatly reduced as compared to uni-directional methods. Sebastian will also discuss his experience with implementing this method in a production renderer such as Weta Digital’s Manuka. # 2.8 16:30 — Guiding in path space, Johannes Hanika (30 min) Johannes will take the ideas presented in the last talk, especially about volume sampling and Russian roulette, and relate them to guiding of full paths in path space Simon et al. $$ 2018 $$. Guiding new samples along full guide paths instead of marginalised distributions which only guide low dimensional parts at a time transparently includes all aspects. It also allows us to use simpler, uni-modal functions to represent a continuous PDF around guide samples. However both marginalised caches and full paths come with advantages and drawbacks. These properties will be systematically analysed and categorised, leading over seamlessly into the next talk. ## 2.9 17:00 — 开放问题与未来工作,Jiri Vorba(15分钟) 我们识别出最紧迫的问题,并与研究社区分享,以便进一步探索 path guiding 方法。我们还讨论了其中一些方法组合的可能性,以便将它们的优点结合起来形成更高效的算法。 我们涵盖的一些方面包括 • 所谓的全局探索问题,这与在局部探索之前首先找到一条有用的路径有关, • 效率驱动的 Russian roulette, • 与边缘化/缓存引导方法(marginalised/cached guiding methods)相关的问题, • 与“路径空间路径引导(path space path guiding)”相关的问题, • 与直接光照采样(direct illumination sampling)和光源选择(light selection)相关的问题。