第 7 章 Primitives and Intersection Acceleration
第 7 章 Primitives and Intersection Acceleration:用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元,依据PBRT 4e完整正文独立重写。
学习目标
- 能说明“第 7 章 Primitives and Intersection Acceleration”如何用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元
- 能逐项核对primitive、aggregate、intersection、bvh、surface area heuristic在对象、测度、空间或执行阶段中的归属
- 能用章专属路径图与估计量实验制造“构建时使用非保守bounds,或遍历后没有收紧最近tMax”并找到node bounds、split axis、primitive range、visit order、tMax与reference intersection中的首个分叉
- 能修改最小实现、固定随机种子,并验证“第 7 章 Primitives and Intersection Acceleration的固定输入、路径状态、估计量输出和恢复结果可由同一证据包重放”
从一个像素样本开始
“第 7 章 Primitives and Intersection Acceleration”先固定scene hash、pixel、sample index和随机种子,再预测一条路径或一个估计量的中间状态。若node bounds、split axis、primitive range、visit order、tMax与reference intersection不能解释首个差异,即使最终图像看起来合理也不能通过。
本页不变量是:第 7 章 Primitives and Intersection Acceleration的固定输入、路径状态、估计量输出和恢复结果可由同一证据包重放。正常、故障、恢复三次运行共享场景、版本、采样序列与质量目标,只允许改变一个机制条件。
来源、版本与重写边界
本页依据开放在线的 PBRT 4e 官方完整正文独立重写,并用官方总目录核对章节与小节边界。正文不复刻原书段落;公式、接口名和机制结论以第4版正文与pbrt-v4官方源代码交叉检查。
第4版正式结构是16个编号章与A–C三个附录。本课程保持16个页面;最终综合页显式映射第16章和三个实现附录,不再把旧版章节顺序、Vulkan API或虚构“Rendering System”当作第4版目录。
六个检查词
在“第 7 章 Primitives and Intersection Acceleration”的术语核对中,↡primitive在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。、↡aggregate在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。、↡intersection在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。、↡bvh在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。、↡surface area heuristic在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。。术语必须进入公式、路径状态、代码和可重放输出,不能只在目录里出现。
原版单元、机制与边界
7 Primitives and Intersection Acceleration
在“第 7 章 Primitives and Intersection Acceleration”的本单元核对中,Primitive把Shape与Material、AreaLight和MediumInterface关联,Aggregate则在不改变求交语义的前提下组织多个Primitive。BVH节点的bounds必须包含全部后代,SAH只决定分割成本,不能改变最近交点结果。
本单元的可推翻反例是“构建时使用非保守bounds,或遍历后没有收紧最近tMax”。若发生分叉,按node bounds、split axis、primitive range、visit order、tMax与reference intersection定位,而不是把差异归因于“渲染有随机性”。
官方小节覆盖
- Primitive Interface and Geometric Primitives:在“第 7 章 Primitives and Intersection Acceleration”中以用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元的对象、测度或执行合同核对。
- Aggregates:在“第 7 章 Primitives and Intersection Acceleration”中以用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元的对象、测度或执行合同核对。
- Bounding Volume Hierarchies:在“第 7 章 Primitives and Intersection Acceleration”中以用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元的对象、测度或执行合同核对。
先预测,再操作三个章专属实验
1. 路径空间与对象归属
调整路径顶点与下一事件估计,观察本章对象如何改变throughput和贡献。
Path-space inspection
第 7 章 Primitives and Intersection Acceleration
用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元
0.4620.620观察对象:primitive、aggregate、intersection、bvh、surface area heuristic
最小可重现实验
if (!node.bounds.IntersectP(ray, tMax)) continue;
if (auto hit = primitive.Intersect(ray, tMax)) {
tMax = hit->tHit; closest = hit;
}运行“第 7 章 Primitives and Intersection Acceleration”时保存PBRT版本、场景hash、像素/样本、波长样本、关键对象状态和输出摘要。截图只能证明最终外观,不能替代路径顶点、PDF、throughput、错误界或队列身份。
练习与答案
练习
问题 1:公式边界。 在“第 7 章 Primitives and Intersection Acceleration”中,如何用固定小样本验证 ,并标明每个量的对象、测度、空间和时间点?
问题 2:正式坐标。 primitive、aggregate、intersection、bvh、surface area heuristic怎样进入可操作验证?
问题 3:恢复证据。 怎样证明“构建时使用非保守bounds,或遍历后没有收紧最近tMax”已真正修复?
本章回顾
掌握“第 7 章 Primitives and Intersection Acceleration”意味着能把“用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元”落到真实PBRT对象、数学测度和执行阶段,能主动制造“构建时使用非保守bounds,或遍历后没有收紧最近tMax”,并凭node bounds、split axis、primitive range、visit order、tMax与reference intersection恢复同输入结果。
名词解释
本章出现的专业名词,用大白话再讲一遍。
- primitive
primitive在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。
- aggregate
aggregate在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。
- intersection
intersection在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。
- bvh
bvh在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。
- surface area heuristic
surface area heuristic在“第 7 章 Primitives and Intersection Acceleration”的“7 Primitives and Intersection Acceleration”中用于用Primitive绑定几何与材质,并以BVH保守裁剪不可能命中的图元;由node bounds、split axis、primitive range、visit order、tMax与reference intersection核对。