Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
redflash revolution renderer / Raytracing Camp 8
レイトレ合宿8の本戦プレゼン資料です。
https://gam0022.net/blog/2022/10/17/rtcamp8/
がむ
September 03, 2022
More Decks by がむ
See All by がむ
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
520
redflash renderer / Raytracing Camp 11
gam0022
0
120
GLSLでVJをした話
gam0022
0
620
距離関数を極める! / SESSIONS 2024
gam0022
0
880
redflash [portal] renderer / Raytracing Camp 10
gam0022
0
160
つぶやきGLSL解読! / Raytracing Camp 10
gam0022
0
1.3k
LTC(Linearly Transformed Cosines)によるエリアライトのUnity URP実装
gam0022
1
390
redflash [4D] renderer / Raytracing Camp 9
gam0022
0
380
Object Space Raymarching in Unreal Engine 5.2
gam0022
0
730
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
How GitHub (no longer) Works
holman
316
150k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
310
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Building Applications with DynamoDB
mza
96
7.2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Bash Introduction
62gerente
615
220k
Un-Boring Meetings
codingconduct
0
410
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
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