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
Ray Tracing: Overview
Search
yumcyawiz
January 10, 2021
Programming
7
1.2k
Ray Tracing: Overview
lecture slides
yumcyawiz
January 10, 2021
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
fredholm(rtcamp9)
yumcyawiz
0
84
フォトンマッピングをパス空間から考える
yumcyawiz
0
320
fredholm
yumcyawiz
0
210
Introduction to volume rendering
yumcyawiz
0
1.8k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
240
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
390
Pybind11でC++とPythonのいいとこ取りをする
yumcyawiz
0
830
Path Tracing in 5 minutes
yumcyawiz
1
300
Lens Tracing
yumcyawiz
0
120
Other Decks in Programming
See All in Programming
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
LangChainでWebサイトの内容取得やGitHubソースコード取得
shukob
0
160
オートマトン学習しろ / Do automata learning
makenowjust
3
130
Architecture Decision Record (ADR)
nearme_tech
PRO
1
680
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
Rubyのobject_id
qnighy
6
1.3k
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
220
仮想ファイルシステムを導入して開発環境のストレージ課題を解消する
segadevtech
2
540
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
640
REXML改善のその後
naitoh
0
190
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
380
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
640
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
96
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
Infographics Made Easy
chrislema
239
18k
Building Applications with DynamoDB
mza
90
6k
What the flash - Photography Introduction
edds
67
11k
YesSQL, Process and Tooling at Scale
rocio
167
14k
The Cost Of JavaScript in 2023
addyosmani
42
5.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
BBQ
matthewcrist
83
9.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
Transcript
Ray Tracing: overview 2021/01/10 OSK#p-ray Lecture01
What is Ray Tracing? レイトレーシングの概要
Ray Tracing • レイ(光線)を再帰的に追跡する計算手法のこと • 写実的なCGをレンダリングできる
Ray Tracingの例 写実的なCGをレンダリングできる
Ray Tracingの活用場面 • 映画 https://renderman.pixar.com/robot-room オフラインレンダリングではメジャーな手法
Ray Tracingの活用場面 • ゲーム https://www.nvidia.com/ja-jp/geforce/news/minecraft-with-rtx-beta-out-now-download-play/ 近年はリアルタイム向けにも活用され始めている
Ray Tracingの活用場面 • 光学設計 レンズ設計, 照明解析など
Ray Tracingの特徴 • 計算量が非常に多い • アルゴリズム自体はシンプル • 写実的なCGを出すには理論的な理解が必須 • こだわれるポイントが無限にある
→ 沼
Physically Based Rendering(PBR) 物理的に正しくレンダリングする
What is PBR? • 物理的に正しくレンダリングすること • 光の伝達を数式で記述, それの数値計算を行う PBRによって写実的なCGが生成できる
放射輝度 • ある点にある方向から来る光の強さを表す量 • CGではRGBで表されることが多い PBRで最も重要な物理量
レンダリング方程式 • ある1点から別の1点に移る光の流れを記述する積分方程式 PBRで最も重要な式 PBRとはレンダリング方程式の数値計算
レンダリング方程式 から に出る放射輝度 発光部分 与えられた方向にどれだけ反射するか (BRDF) 入射放射輝度 コサイン項 反射部分 から
に出る放射輝度 入射放射輝度 コサイン項 BRDF 半球全体 半球全体
レンダリング方程式の解 • ノイマン級数展開によって解を表すことができる • 次元積分の無限級数となる これを数値計算すれば写実的なCGが得られる 1回反射 2回反射 k回反射
Monte Carlo Ray Tracing レンダリング方程式の数値計算手法
レンダリング方程式の数値計算 • 高次元積分を含むため, 通常の数値積分は困難(次元の呪い) • モンテカルロ積分を利用する → Monte Carlo Ray
Tracing
モンテカルロ積分 • 被積分関数の評価点をランダムに生成し, 評価値/確率密度の平均を取る • 大数の法則により, サンプル数を増やせば求めたい積分値に収束 • 収束が遅い (
1 ) モンテカルロ積分
レンダリング方程式の数値計算 • パス ҧ = 0 1 ⋯ をランダムに生成してモンテカルロ積分 ≈
パスをいかにして生成するか?
Path Tracing • 視点からランダムに方向をサンプリングしていくことでパスを生成 • 光源に衝突しなかった場合は寄与が0
Next Event Estimation(NEE) • 光源上の点をサンプリングし, パスをその点とつなげる • パスが寄与を持ちやすくなる
Bidirectional Path Tracing(BDPT) • 視点と光源の両方からサブパスを生成し, それらを繋げてパスを作る • NEEの一般化
Metropolis Light Transport(MLT) • 寄与の大きいパスをMarkov Chain Monte Carlo(MCMC)を用いて重点的にサ ンプリング
Other Methods • Primary Sample Space Metropolis Light Transport(PSSMLT) •
Gradient Domain Path Tracing(GDPT) • Matrix Bidirectional Path Tracing(M-BDPT) • Stochastic Progressive Photon Mapping(SPPM) • Vertex Connection and Merging(VCM) • and more…
Related Technologies モンテカルロレイトレーシング周りの技術
Quasi Monte Carlo(QMC) • 準乱数を用いてモンテカルロ積分する方法 • 収束が通常のモンテカルロ積分より早い ( log )
Sobol列 QMC
BSDF • アーティストが操作しやすい様々なBSDF(BRDF + BTDF)が提案されている Physically-Based Shading at Disney, Brent
Burley, Walt Disney Animation Studios, 2012
Volume Rendering • 媒質内での光の吸収, 散乱, 発光も考慮したレンダリング https://github.com/sakanaman/kumo_viewer
Spectral Rendering • 物理的な波長を考慮してレンダリングする方法 • 光の分散を表現できる @sakanaoki181
Realistic Camera Model • 視点からのレイの生成にレンズを組み込む • 現実の写真レンズによる写り方を再現する
Bounding Volume Hierarchy(BVH) • レイとシーンの交差計算を効率化する空間分割法 • ポリゴンを含むようなシーンでは必須
The Latest Topics 最近の話題 https://www.minecraft.net/ja-jp/article/render-dragon-and-nvidia-ray-tracing
GPU Ray Tracing • Optix, Direct X Ray Tracing(DXR), Vulkan
Ray Tracing(VKR) • GPUの並列計算の強みを利用 • CPUより圧倒的に計算が早い https://devblogs.microsoft.com/directx/announcing-microsoft-directx-raytracing/
Realtime Ray Tracing • レイトレ専用回路を持つRTXの登場 • デノイザーと組み合わせることで部分的には実現している(e.g. Minecraft RTX) https://www.nvidia.com/ja-jp/geforce/news/minecraft-with-rtx-beta-out-now-download-play/
Path Guiding • 各点の入射放射輝度まで考慮した重点的サンプリング手法 • 機械学習の活用 https://github.com/Tom94/practical-path-guiding
Differentiable Rendering • シーンが微小に変化した時の放射輝度の変化を計算 • 機械学習と組み合わせることで, 画像からシーンの逆構築ができる (Inverse Rendering) https://mitsuba2.readthedocs.io/en/latest/src/inverse_rendering/diff_render.html
Thank you for listening.