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
40
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 がむ
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
redflash renderer / Raytracing Camp 11
gam0022
0
71
GLSLでVJをした話
gam0022
0
100
距離関数を極める! / SESSIONS 2024
gam0022
0
740
redflash [portal] renderer / Raytracing Camp 10
gam0022
0
110
つぶやきGLSL解読! / Raytracing Camp 10
gam0022
0
870
LTC(Linearly Transformed Cosines)によるエリアライトのUnity URP実装
gam0022
1
240
redflash [4D] renderer / Raytracing Camp 9
gam0022
0
320
Object Space Raymarching in Unreal Engine 5.2
gam0022
0
620
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
47
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
680
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
GraphQLとの向き合い方2022年版
quramy
50
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
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