Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
39
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 がむ
redflash renderer / Raytracing Camp 11
gam0022
0
57
GLSLでVJをした話
gam0022
0
77
距離関数を極める! / SESSIONS 2024
gam0022
0
720
redflash [portal] renderer / Raytracing Camp 10
gam0022
0
91
つぶやきGLSL解読! / Raytracing Camp 10
gam0022
0
770
LTC(Linearly Transformed Cosines)によるエリアライトのUnity URP実装
gam0022
1
230
redflash [4D] renderer / Raytracing Camp 9
gam0022
0
310
Object Space Raymarching in Unreal Engine 5.2
gam0022
0
590
IFSによるフラクタルのモデリング
gam0022
0
670
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Prompt Engineering for Job Search
mfonobong
0
120
The Language of Interfaces
destraynor
162
25k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
200
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
140
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Navigating Weather and Climate Data
rabernat
0
50
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
25
Faster Mobile Websites
deanohume
310
31k
For a Future-Friendly Web
brad_frost
180
10k
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