TEST_18 までのレンダは spp=1024 固定で,大きいキャビティほど生の輝度が低く相対ノイズが 7〜26% に達していた(指標はノイズ補正で救っている).研究室サーバの GPU で 1 条件 5 秒に なったので,spp を 256〜8192 で振り,(1) 計算時間のうち GPU が何秒か,(2) ノイズが 1/√spp で下がるか,(3) 各指標がどの spp で安定するかを測って今後の標準 spp を決めた (2026-09-14).結論: GPU 時間は spp に厳密に比例し固定費は 0.8 秒.ノイズは 1/√spp 則に 正確に乗る.構造 CoV は 1024 で十分,画像全体 min/max 比を暗い条件で比べるなら 2048〜4096.
関連:
--workers: ENV_04 開発コマンド「研究室サーバでの実行」mi.render / 保存 / 評価).
mi.render は dr.sync_thread() で GPU の完了を待ってから測る(投げっぱなしで短く見える
ことを防ぐ).GPU 率 = mi.render ÷ 全体SM_DRJIT_THREADS=16・逐次実行6 条件 × 2 seed の平均.
| spp | 全体 s | GPU(mi.render)s | CPU 固定費 s | GPU の割合 |
|---|---|---|---|---|
| 256 | 2.0 | 1.2 | 0.8 | 60% |
| 512 | 3.2 | 2.5 | 0.8 | 76% |
| 1024 | 5.9 | 5.1 | 0.8 | 87% |
| 2048 | 11.1 | 10.3 | 0.8 | 93% |
| 4096 | 20.9 | 20.1 | 0.8 | 96% |
| 8192 | 40.6 | 39.8 | 0.7 | 98% |
| 条件 | 生 mean | ノイズ CoV(1024) | ノイズ × √spp(6 段階の範囲) |
|---|---|---|---|
| 球 φ340 軸上 | 0.355 | 0.092 | 2.93〜2.99 |
| 球 φ340 θ=90° | 0.323 | 0.145 | 4.63〜4.67 |
| 立方体 L=234 軸上 | 0.387 | 0.104 | 3.30〜3.32 |
| 立方体 L=234 θ=90° | 0.356 | 0.156 | 4.97〜5.08 |
| 球 φ500 θ=90° | 0.153 | 0.189 | 5.84〜6.05 |
| 立方体 L=340 θ=90° | 0.174 | 0.200 | 6.23〜6.38 |
spp_noise.png 下段.誤差棒は seed 2 つの差の半分.
| 指標 | 1024 での状態 | 安定する spp |
|---|---|---|
| 構造 CoV | 256→1024 で 5〜15% 低下後ほぼ一定.seed 差 ≤0.0005 | 1024 で十分(8192 との差 ≤0.002) |
| 画像全体 min/max(補正あり) | 明るい条件は安定(seed 差 0.003).暗い φ500・L=340 は 0.93〜0.94 で seed 差 0.01 | 2048〜4096(暗い条件が 0.95〜0.96 に収束し seed 差 0.002) |
| 画像全体 min/max(補正なし) | どの条件も spp とともに上昇し続ける | 8192 でも収束しない(ノイズ補正は必須) |
| 輪帯平均 min/max | θ=90° で 0.97〜0.99 に張り付き,seed 差 0.003〜0.01 | spp では改善しない(方位平均の問題) |
発表スライドで「6 種類の形状の平均」と書くと,上の 6 条件は実際には 4 形状 × LED 位置 2 通り (θ=0°/90°)の混在なので説明と合わない.そこで LED を θ=0°(軸上)にそろえ,形状だけを 6 種類に 変えて計算時間を測り直した(2026-10-05).
sweep_spp_noise.py --set shapes6 で実行.出力は output/spp_noise_shapes6/(本編の結果は上書きしない)平均±標準偏差(n=12=6 形状 × seed 2).
| spp | 全体 s | GPU(mi.render)s | CPU 固定費 s | GPU の割合 |
|---|---|---|---|---|
| 256 | 1.9±0.3 | 1.2±0.1 | 0.8±0.2 | 60% |
| 512 | 3.1±0.2 | 2.4±0.2 | 0.7±0.1 | 77% |
| 1024 | 5.7±0.5 | 5.0±0.4 | 0.7±0.1 | 88% |
| 2048 | 10.7±1.1 | 10.0±1.0 | 0.7±0.1 | 93% |
| 4096 | 20.4±1.9 | 19.7±1.9 | 0.7±0.1 | 97% |
| 8192 | 40.1±3.2 | 39.4±3.1 | 0.7±0.1 | 98% |
shapes6_geometry_panel.png)とレンダ結果(shapes6_render_panel.png,
spp=8192)を 2×3 で並べた図を作った.配置図は各形状が自動で拡大されるので,サイズの違いはラベルで示すpkill がサンプラー自身を止めたため記録が無い.
GPU 時間は dr.sync_thread() で同期した実測で取れているので結論には影響しない--workers 2 では 1 条件あたり 1 割ほど短くなる(ENV_04)mi.render の時間は同期してから測る.cuda variant では非同期に GPU へ投げられるので,
dr.eval + dr.sync_thread() を挟まないと数十 ms に見える--only scripts だけだと足りないことがある.新しい src モジュール
(evaluation/fullimage.py)を使うスクリプトは,全体を push してから回すpkill -f は再起動時に自分も殺す.サンプラーを再起動するなら先に止めてから
起動する順序を守るか,PID ファイルで管理する# YAML 生成(TEST_18 の _tmp_led_placement を流用するので先に sweep_led_placement.py --prepare-only) uv run python scripts/sweep_spp_noise.py --prepare-only # サーバで実行(GPU 0).spp を絞るなら --spps 256 512 1024 uv run sm-remote push uv run sm-remote run --name spp --gpu 0 --threads 16 -- python scripts/sweep_spp_noise.py uv run sm-remote pull spp_noise_sweep # 解析(図と表) uv run python scripts/build_spp_noise_comparison.py
出力: output/spp_noise_sweep/(レンダ別 72 ディレクトリ + summary.csv + spp_summary_table.csv +
spp_noise.png).
追試(6 形状):
# YAML 生成(本編と同じく _tmp_led_placement が前提)
uv run python scripts/sweep_spp_noise.py --set shapes6 --prepare-only
# サーバで実行(_tmp は push 対象外なので --include で送る)
uv run sm-remote push --include configs/_tmp_led_placement --include configs/_tmp_spp_noise_shapes6
uv run sm-remote run --name shapes6 --gpu 0 --threads 16 -- python scripts/sweep_spp_noise.py --set shapes6 --spps 256 512 1024 2048 4096 8192
uv run sm-remote pull spp_noise_shapes6
# 配置図の撮影(6 形状.c = sphere_d270 sphere_d340 sphere_d500 cube_L187 cube_L234 cube_L340)
uv run sm-visualize --scene configs/_tmp_spp_noise_shapes6/scene_${c}_th000_spp1024_s0.yaml --no-bake --style slide --screenshot output/spp_noise_shapes6/geometry/${c}.png
# 表(平均±標準偏差)とパネル図
uv run python scripts/build_spp_shapes6_summary.py
出力: output/spp_noise_shapes6/(レンダ別 72 ディレクトリ + summary.csv + spp_time_table_mean_sd.csv +
shapes6_geometry_panel.png + shapes6_render_panel.png + geometry/).
--workers