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.按需打开一个小工具,再回到本课把它用起来。
Exponentials & logarithms指数与对数STEP步骤 1 / 5
Container is not semantics容器不是语义
PLY declares properties, types and element counts. It does not impose a universal Gaussian schema. A field called f_dc_0 might mean an SH DC coefficient in one exporter and direct red in another. Names alone are insufficient: record activations, color conventions, orientation, units and time normalization.PLY 声明属性、类型与元素数量,但没有规定通用 Gaussian 语义。某个导出器的 f_dc_0 可能是 SH 的 DC 系数,另一个却直接存红色值。不能只看名字,还要记录激活、颜色约定、旋转、单位与时间归一化。
STEP步骤 2 / 5
Map this exact 32-float row逐项对上本项目 32 个浮点数
Our STG-Lite teaching row stores center at 0–2, time center/width log at 3–4, placeholder normals at 5–7, motion at 8–16, direct RGB at 17–19, opacity logit at 20, scale logs at 21–23, wxyz quaternion at 24–27 and its four linear coefficients at 28–31. This is 128 bytes per decoded row; compressed file size is a different quantity.本教学 STG-Lite 行中:0–2 中心,3–4 时间中心与宽度对数,5–7 占位法线,8–16 运动,17–19 直接 RGB,20 opacity logit,21–23 尺度对数,24–27 为 wxyz 四元数,28–31 为其四个线性系数。一行解码后 128 字节,压缩文件大小是另一回事。
STEP步骤 3 / 5
Activate exactly once激活只能按约定做一次
The Python trainer learns RGB logits internally and exports sigmoid RGB; the viewer must therefore read those exported RGB values directly. Opacity is exported as a logit and scales as logs, so the viewer still activates those. Applying sigmoid or an SH DC transform to already exported direct RGB changes the intended image.Python 训练器内部学 RGB logits,导出前已算 sigmoid,因此播放器直接读导出的 RGB。opacity 导出的是 logit,scale 导出的是对数,播放器仍需激活它们。对已导出的直接 RGB 再做 sigmoid 或 SH DC 变换,会改变原本图像。
STEP步骤 4 / 5
Validate before uploading to the GPU上传 GPU 之前先验证
Check header order, float type, little-endian payload, record count, payload length and finite values. CPU and GPU buffers can have different layouts; map them explicitly instead of assuming a PLY row is a shader struct. A round-trip export/decode test and a known-pixel reference are stronger than merely seeing a picture.检查头部属性顺序、float 类型、小端载荷、记录数量、载荷长度与有限值。CPU 与 GPU 缓冲布局可能不同,应明确映射,不能假定 PLY 行就是 shader 结构体。导出再解码的往返检查,以及已知像素对照,比“看见画面”更可靠。
STEP步骤 5 / 5
Keep deployment artifacts and training state distinct分清部署产物与训练状态
An inference export stores what the renderer needs. A resumable training checkpoint additionally needs optimizer states, iteration, schedules and any other learned components such as deformation networks or feature decoders. For this project’s native exercise, export model.ply and the matching cameras.json, then run the existing StgPass host.推理导出保存渲染需要的内容;恢复训练还需要优化器状态、迭代数、调度及其他学习组件,例如形变网络或特征解码器。本项目原生练习导出 model.ply 和配套 cameras.json,再运行已有的 StgPass 主机。
PUT NUMBERS IN代入数字
Select field 20 below. The stored β is ln(4) ≈ 1.386294 and base opacity is sigmoid(β) = 0.8. Select scale_0: stored ln(0.2) ≈ −1.609438 means world-space scale 0.2, not a negative width.下方选择字段 20:存储 β = ln(4) ≈ 1.386294,基准 opacity = sigmoid(β) = 0.8。选择 scale_0:存储 ln(0.2) ≈ −1.609438,意味着世界尺度 0.2,而不是负宽度。