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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
がむ
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
250
redflash renderer / Raytracing Camp 11
gam0022
0
63
GLSLでVJをした話
gam0022
0
91
距離関数を極める! / SESSIONS 2024
gam0022
0
730
redflash [portal] renderer / Raytracing Camp 10
gam0022
0
97
つぶやきGLSL解読! / Raytracing Camp 10
gam0022
0
830
LTC(Linearly Transformed Cosines)によるエリアライトのUnity URP実装
gam0022
1
230
redflash [4D] renderer / Raytracing Camp 9
gam0022
0
320
Object Space Raymarching in Unreal Engine 5.2
gam0022
0
610
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
440
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Designing for Timeless Needs
cassininazir
0
120
The Curse of the Amulet
leimatthew05
1
7.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
150
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
160
Navigating Team Friction
lara
192
16k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
120
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Rails Girls Zürich Keynote
gr2m
96
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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