Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
redflash revolution renderer / Raytracing Camp 8
Search
がむ
September 03, 2022
0
31
redflash revolution renderer / Raytracing Camp 8
レイトレ合宿8の本戦プレゼン資料です。
https://gam0022.net/blog/2022/10/17/rtcamp8/
がむ
September 03, 2022
Tweet
Share
More Decks by がむ
See All by がむ
距離関数を極める! / SESSIONS 2024
gam0022
0
660
redflash [portal] renderer / Raytracing Camp 10
gam0022
0
76
つぶやきGLSL解読! / Raytracing Camp 10
gam0022
0
600
LTC(Linearly Transformed Cosines)によるエリアライトのUnity URP実装
gam0022
1
150
redflash [4D] renderer / Raytracing Camp 9
gam0022
0
290
Object Space Raymarching in Unreal Engine 5.2
gam0022
0
530
IFSによるフラクタルのモデリング
gam0022
0
560
Transcendental Cube / グラフィックス解説
gam0022
1
190
redflash renderer / Raytracing Camp 7
gam0022
1
6.8k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Why Our Code Smells
bkeepers
PRO
339
57k
For a Future-Friendly Web
brad_frost
179
9.9k
How to train your dragon (web standard)
notwaldorf
96
6.2k
BBQ
matthewcrist
89
9.8k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Producing Creativity
orderedlist
PRO
347
40k
Gamification - CAS2011
davidbonilla
81
5.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Designing for Performance
lara
610
69k
Documentation Writing (for coders)
carmenintech
73
5k
Transcript
redflash revolution 2022-09-03 レイトレ合宿8 @gam0022 / Sho HOSODA
基本機能 • Unidirectional Path Tracing ‣ implemented in NVIDIA® OptiX
• Disney BRDF • Next Event Estimation (Direct Light Sampling) • Multiple Importance Sampling • Primitives ‣ Sphere ‣ Mesh ‣ Distance Function (Raymarching ) • ACES Filmic Tone Mapping • Deep Learning Denoising 2
revolution? 3 redflash redflash revolution 2019年 2022年 バージョンアップ
レンダラーの出力設定 • 解像度 ‣ 1920x1080 • フレーム数
‣ 300フレーム • 30FPS • 10秒(今回の上限) 4 1フレーム2秒 で1920x1080描画!
10秒の尺に詰め込んだ要素 3つのアニメーション 5 ライト レイマーチングの ジオメトリー マテリアルの
パラメーター
ライトのアニメーション ライトのAcceleration構造を毎フレーム更新 6
レイマーチングのジオメトリーの変形アニメーション 距離関数のパラメーターをアニメーション 7
マテリアルのアニメーション マテリアルのパラメーターを上書きするCallableProgramを指定可能に edge検出などをしてEmissiveをアニメーションさせた 8
急激に変化するカメラワーク対応 レイマーチングの衝突したとみなす距離の epsをアダプティブに調整 カメラとオブジェクトの距離が急激に変化するカメラワークに対応 9
カメラワークの工夫 10 手ぶれ Easingによる緩急 映像としての品質や説得力を多少は向上できた
ポストエフェクト • Vignette ‣ 周辺減光 • Fade
In / Fade Out ‣ 暗転で終了 11
レイマーチングの高速化 • 速度比較!レイマーチングvsレイキャスティング | gam0022.net 12
レイマーチング はレイキャストより15~20倍くらい重い (MengerSpongeで計測した場合)
レイマーチングの高速化 • 通常のレイマーチング ‣ カメラの座標からレイマーチングをスタートする •
少し工夫したレイマーチング ‣ AABBの表面からスタート(少し高速化できる) • 今回のレイマーチング ‣ 1サンプリング目のDepthを保存 ‣ 2サンプリング以降は、カメラからレイをDepthだけ進めた座標からスタート ‣ プライマリレイの交差判定は劇的に高速化 • 1回目のmarching loopで衝突判定が終了 • marching loopが300回→1回であれば、300倍に高速化 ‣ セカンダリレイの交差判定には効果なし • roughnessが0に近い完全鏡面のようなマテリアルなら セカンダリレイのDepthを保存するのは意味があるかもしれない 13
[デバッグ機能] 軽量レンダラー DirectionalLight + PointLightのDirectLight + Emissive リアルタイムにアニメーションを確認可能になった
14
[デバッグ機能] WASD移動 • 個人的にマウスよりカメラを調整しやすい • WASDでカメラワークのあたりをつけた 15
レンダリングの戦略 • 1フレームあたり2回OptiXのlaunch ‣ 1回目のlaunch • シーンの重さとGPU性能をベンチマーク • 1フレームあたりのサンプリング数を決定
‣ 2回目のlaunch • 制限時間ギリギリのサンプリング数でレンダリング • 1回目のlaunchの描画結果も平均値に加算 16 どんな環境でも制限時間以内にレンダリング完了
PNG保存の並列化 • PNG保存とレンダリングは並列実行 ‣ main-thread: 現在フレームのレンダリング ‣ sub-thread: 前フレームのPNGエンコードとファイル保存
• 余談 ‣ stb_image + 4K解像度 • レンダリングよりPNG保存がボトルネックになった 17
END. 18