第 10 章 Textures and Materials

第 10 章 Textures and Materials:从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF,依据PBRT 4e完整正文独立重写。

学习目标

  • 能说明“第 10 章 Textures and Materials”如何从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF
  • 能逐项核对texture、material、texture mapping、MIPMap、antialiasing、normal mapping在对象、测度、空间或执行阶段中的归属
  • 能用章专属路径图与估计量实验制造“忽略纹理足迹导致远处闪烁,或用着色法线替代几何法线做可见性偏移”并找到uv、dudx/dudy、MIP level、texture value、material parameters与two normals中的首个分叉
  • 能修改最小实现、固定随机种子,并验证“第 10 章 Textures and Materials的固定输入、路径状态、估计量输出和恢复结果可由同一证据包重放”

从一个像素样本开始

“第 10 章 Textures and Materials”先固定scene hash、pixel、sample index和随机种子,再预测一条路径或一个估计量的中间状态。若uv、dudx/dudy、MIP level、texture value、material parameters与two normals不能解释首个差异,即使最终图像看起来合理也不能通过。

本页不变量是:第 10 章 Textures and Materials的固定输入、路径状态、估计量输出和恢复结果可由同一证据包重放。正常、故障、恢复三次运行共享场景、版本、采样序列与质量目标,只允许改变一个机制条件。

来源、版本与重写边界

本页依据开放在线的 PBRT 4e 官方完整正文独立重写,并用官方总目录核对章节与小节边界。正文不复刻原书段落;公式、接口名和机制结论以第4版正文与pbrt-v4官方源代码交叉检查。

第4版正式结构是16个编号章与A–C三个附录。本课程保持16个页面;最终综合页显式映射第16章和三个实现附录,不再把旧版章节顺序、Vulkan API或虚构“Rendering System”当作第4版目录。

六个检查词

在“第 10 章 Textures and Materials”的术语核对中,。术语必须进入公式、路径状态、代码和可重放输出,不能只在目录里出现。

原版单元、机制与边界

10 Textures and Materials

在“第 10 章 Textures and Materials”的本单元核对中,Texture在SurfaceInteraction与波长条件下求值,映射函数提供坐标及微分以选择MIP层级。Material读取纹理参数并构造BSDF;法线贴图只改变着色坐标架,不能篡改几何可见性与射线偏移法线。

本单元的可推翻反例是“忽略纹理足迹导致远处闪烁,或用着色法线替代几何法线做可见性偏移”。若发生分叉,按uv、dudx/dudy、MIP level、texture value、material parameters与two normals定位,而不是把差异归因于“渲染有随机性”。

BSDF=Material(Texture(si),λ)BSDF=Material(Texture(si),\lambda)

官方小节覆盖

  • Texture Sampling and Antialiasing:在“第 10 章 Textures and Materials”中以从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF的对象、测度或执行合同核对。
  • Texture Coordinate Generation:在“第 10 章 Textures and Materials”中以从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF的对象、测度或执行合同核对。
  • Texture Interface and Basic Textures:在“第 10 章 Textures and Materials”中以从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF的对象、测度或执行合同核对。
  • Image Texture:在“第 10 章 Textures and Materials”中以从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF的对象、测度或执行合同核对。
  • Material Interface and Implementations:在“第 10 章 Textures and Materials”中以从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF的对象、测度或执行合同核对。

先预测,再操作三个章专属实验

分步1 / 3

1. 路径空间与对象归属

调整路径顶点与下一事件估计,观察本章对象如何改变throughput和贡献。

Path-space inspection

第 10 章 Textures and Materials

从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF

Film传感器x₁首个交点x₂散射事件Light发光端
throughput0.462
估计贡献0.620

观察对象:texture、material、texture mapping、MIPMap、antialiasing

最小可重现实验

Vector2f dstdx, dstdy;
Point2f st = mapping.Map(ctx, &dstdx, &dstdy);
Spectrum value = mipMap.Filter(st, dstdx, dstdy);

运行“第 10 章 Textures and Materials”时保存PBRT版本、场景hash、像素/样本、波长样本、关键对象状态和输出摘要。截图只能证明最终外观,不能替代路径顶点、PDF、throughput、错误界或队列身份。

练习与答案

练习

问题 1:公式边界。 在“第 10 章 Textures and Materials”中,如何用固定小样本验证 BSDF=Material(Texture(si),λ)BSDF=Material(Texture(si),\lambda),并标明每个量的对象、测度、空间和时间点?

问题 2:正式坐标。 texture、material、texture mapping、MIPMap、antialiasing、normal mapping怎样进入可操作验证?

问题 3:恢复证据。 怎样证明“忽略纹理足迹导致远处闪烁,或用着色法线替代几何法线做可见性偏移”已真正修复?

本章回顾

掌握“第 10 章 Textures and Materials”意味着能把“从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF”落到真实PBRT对象、数学测度和执行阶段,能主动制造“忽略纹理足迹导致远处闪烁,或用着色法线替代几何法线做可见性偏移”,并凭uv、dudx/dudy、MIP level、texture value、material parameters与two normals恢复同输入结果。

名词解释

本章出现的专业名词,用大白话再讲一遍。

texture

texture在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

material

material在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

texture mapping

texture mapping在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

MIPMap

MIPMap在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

antialiasing

antialiasing在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

normal mapping

normal mapping在“第 10 章 Textures and Materials”的“10 Textures and Materials”中用于从纹理坐标与足迹得到参数,再由Material构造当前交点的BSDF;由uv、dudx/dudy、MIP level、texture value、material parameters与two normals核对。

阅读导航

← 第 9 章 Reflection Models · 第 11 章 Volume Scattering →

讨论

评论区加载中…