Build the idea, one step at a time一步步建立理解
Need a math refresher?需要补一点数学基础?
Open only the tool you need; return here to use it in the next step.按需打开一个小工具,再回到本课把它用起来。
Vectors & weighted sums向量与加权求和Integrals & accumulation积分与累加STEP步骤 1 / 5
Use a direction, not a position先得到方向,而不是位置
Subtract camera position from the Gaussian center and divide by the vector length. This produces a unit vector v: three numbers whose squared values sum to one. Our SH convention uses camera → Gaussian. Reversing it flips odd-degree SH terms, so sign conventions must match the exporter.用 Gaussian 中心减相机位置,再除以向量长度,得到单位方向 v:三个分量平方和等于 1。本教学采用相机 → Gaussian 的方向。方向取反会翻转奇数阶 SH 项,因此必须与导出端保持一致。
STEP步骤 2 / 5
Build with reusable patterns用固定的方向图案搭颜色
Spherical harmonics are fixed functions on the unit sphere. Degree zero is constant. Degree one supplies patterns proportional to −y, z and −x in our convention. Higher degrees provide finer angular variation. A coefficient says how strongly a pattern contributes; the pattern itself does not change for each Gaussian.球谐函数是在单位球面上的一组固定函数。零阶是常数;在本约定中,一阶分别与 −y、z、−x 成比例。更高阶表达更细的角度变化。系数决定某个图案占多大比重,基函数本身不会因 Gaussian 不同而改变。
STEP步骤 3 / 5
Repeat the sum independently for R, G and BR、G、B 分别做一次求和
For each direction, evaluate the basis once. Multiply those same basis values by three separate coefficient lists, then sum each channel. Up to degree L there are (L + 1)² basis functions. Degree three therefore needs 16 coefficients per channel, 48 scalar coefficients in total. Sharing basis values does not mix channels.每个方向只需算一次基函数,再分别乘 R、G、B 三列系数,各自求和。到 L 阶共有 (L + 1)² 个基函数。三阶就是每通道 16 个系数,总计 48 个标量。共用基函数并不意味着混合通道。
STEP步骤 4 / 5
Interpret the colored sphere correctly正确理解彩色球
Each point on the visualization sphere represents a direction, not a point on a physical Gaussian surface. At that direction, three scalar results become one displayed RGB color. The red-only, green-only and blue-only views expose the separate sums. Plot rotation changes how you inspect the function; it must not silently change its coefficients.可视化球面上的每个位置代表一个方向,不代表真实 Gaussian 表面的位置。在这个方向算出的三个标量合为一个显示 RGB。R、G、B 单独视图展示各自的和。旋转图示相机只是换角度查看函数,不应偷偷修改系数。
STEP步骤 5 / 5
Match the actual appearance contract核对真实模型的外观契约
The +0.5 offset is an implementation convention. Our teaching evaluator follows Graphdeco’s nonnegative output clamp and then separately clips to 0–1 for display. The STG-Lite fixture in our viewer stores direct RGB, not learned higher-order SH. Full STG feature rendering and this SH lesson are different appearance models.+0.5 是实现约定。教学求值器先按 Graphdeco 方式把负输出截到零,再单独截到 0–1 用于显示。当前 STG-Lite 真实模型存的是直接 RGB,不是学到的高阶 SH。完整 STG 的特征渲染与本课 SH 是不同外观模型。
PUT NUMBERS IN代入数字
Take baseline RGB = (0.5, 0.5, 0.5) and only a₂R = 0.4. At +Z, Y₂ ≈ 0.4886, so RGB ≈ (0.6954, 0.5, 0.5). At −Z, it is (0.3046, 0.5, 0.5). Green and blue never change.基准 RGB = (0.5, 0.5, 0.5),只令 a₂R = 0.4。在 +Z,Y₂ ≈ 0.4886,RGB ≈ (0.6954, 0.5, 0.5);在 −Z 则为 (0.3046, 0.5, 0.5)。绿色与蓝色始终没变。