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
CGと機械学習
Search
Kaito
May 04, 2021
Programming
0
150
CGと機械学習
CGと機械学習の入門
Kaito
May 04, 2021
Tweet
Share
More Decks by Kaito
See All by Kaito
ASGIについて
kaitolucifer
0
170
Other Decks in Programming
See All in Programming
Goのmultiple errorsについて (2024年4月版)
syumai
3
870
Anthropic Cookbook のおすすめレシピ
schroneko
7
970
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
340
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
Fragment Composition of GraphQL
quramy
7
1k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
PHPはいつから死んでいるかの調査
chiroruxx
1
400
ONE WEDGE_company_guide
1wedge_one
0
480
Fast JSX: Don't clone props object #28768
yossydev
1
100
Rethinking UI building strategies @ SFI 2024
letelete
0
270
Milestoner
bkuhlmann
1
410
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Side Projects
sachag
451
41k
Into the Great Unknown - MozCon
thekraken
10
990
Become a Pro
speakerdeck
PRO
11
4.5k
The Language of Interfaces
destraynor
151
23k
Rails Girls Zürich Keynote
gr2m
91
13k
Adopting Sorbet at Scale
ufuk
68
8.6k
Embracing the Ebb and Flow
colly
80
4.1k
Automating Front-end Workflow
addyosmani
1356
200k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Transcript
CGと機械学習(⼊⾨)
⽬次 2 Ø CGレンダリングの紹介 Ø ラスタライゼーション (Rasterization) Ø レイトレーシング (Ray
Tracing) Ø Deep Denoising Ø Deep Denoising (Nvidia) Ø Denoising (Pixar/Disney) Ø DeepShading Ø Super Sampling Ø MSAA Ø チェックボード (Sony) Ø DLSS (Nvidia) Ø Differentiable Rendering
CGレンダリングの紹介 3
ラスタライゼーション (Rasterization) 4
Rasterization 5 Rasterization
Graphics Pipeline 6 Rasterization
Graphics Pipeline 7 Rasterization
Graphics Pipeline 8 Rasterization
Graphics Pipeline 9 Rasterization
Graphics Pipeline 10 Rasterization
Graphics Pipeline 11 Rasterization
12 Rasterization Graphics Pipeline
13 Rasterization Blinn-Phong Reflectance Model Ø 局所的な反射モデル Ø 反射を3種類に分ける Ø
「鏡⾯反射」(specular reflection) Ø 「拡散反射」(diffuse reflection) Ø 「環境反射」(ambient reflection)
14 Rasterization Diffuse Reflection Ø ランバート反射を使⽤ Ø カメラの位置と関係ない
15 Rasterization Diffuse Reflection
16 Rasterization Specular Reflection Ø カメラの位置と関係ある Ø ⼊射⾓=反射⾓ Ø 反射光の⽅向とカメラの⽅向が近ければ近いほど明るい
17 Rasterization Specular Reflection Ø viewベクトル(カメラ⽅向)と⼊射光ベクトルのハーフベクトルを計算 Ø ハーフベクトルとshading pointの法線ベクトルのドット積を計算
18 Rasterization Specular Reflection
19 Rasterization Ambient Reflection Ø カメラや光源に依存しないコンスタントな発光 Ø shading pointが真っ暗になるのを防ぐ
20 Rasterization Blinn-Phong Reflectance Model
21 Rasterization Shading Type
レイトレーシング (Ray Tracing) 22
Why Ray Tracing? 23 レイトレーシング (Ray Tracing) Ø ラスタライゼーションは速いが、品質が悪い Ø
グローバルイルミネーションの処理が難しい Ø 影などは別途処理必要(shadow mapping) Ø 光沢反射の実現が難しい
Emission Theory of Vision? 24 レイトレーシング (Ray Tracing)
Recursive (Whitted-Style) Ray Tracing 25 レイトレーシング (Ray Tracing) J. Turner
Whitted - Wikipedia
26 レイトレーシング (Ray Tracing) Recursive (Whitted-Style) Ray Tracing Spheres and
Checkerboard, T. Whitted, 1979
Radiometry 27 レイトレーシング (Ray Tracing) Ø Whitted-Style Ray Tracing Ø
結局はBlinn-Phong modelを使っている Ø 正しくない Ø Radiometry (放射測定)が必要 Ø Path Tracingの基礎となる
Radiometry 28 レイトレーシング (Ray Tracing) Radiant Energyとして定義する Radiant Flux (power)
として定義する 単位時間内に放出、吸収、反射または伝播したpower
Radiometry 29 レイトレーシング (Ray Tracing)
Radiometry (Radiant Intensity) 30 レイトレーシング (Ray Tracing) 定義︓Unit Solid Angle
(単位⽴体⾓) 毎に放出したpower
Radiometry (Radiant Intensity) 31 レイトレーシング (Ray Tracing) Ø ⾓度 (angle)
Ø 𝜃 = ! " Ø 円のラジアン (radian) は2𝜋 Ø ⽴体⾓ (solid angle) Ø Ω = # "! Ø 球のステラジアン (steradian) は4𝜋
Radiometry (Irradiance) 32 レイトレーシング (Ray Tracing) 定義︓単位投影エリア (unit project area)
毎に吸収したpower
Radiometry (Irradiance) 33 レイトレーシング (Ray Tracing)
Radiometry (Radiance) 34 レイトレーシング (Ray Tracing) 定義︓単位投影エリア、且つ単位⽴体⾓毎に放出、吸収、反射または伝播したpower
Radiometry (Radiance) 35 レイトレーシング (Ray Tracing)
BRDF 36 レイトレーシング (Ray Tracing) Ø Bidirectional Reflectance Distribution Function
Ø ⼊射光を特定の⽅向にどれぐらい反射するのかを定義する⽅程式(Material Model)
Reflection Equation 37 レイトレーシング (Ray Tracing) Ø Refletion Equation
Rendering Equation 38 レイトレーシング (Ray Tracing) Ø Refletion Equation Ø
Rendering Equation Ø ⾃発光の物体もカバーできるよう発光項𝐿$ を追加
Monte Carlo積分 39 レイトレーシング (Ray Tracing)
Monte Carlo積分 40 レイトレーシング (Ray Tracing)
Monte Carlo積分 41 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 42 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 43 レイトレーシング (Ray Tracing) Ø 直接照明のみ考える場合
Ray Tracing (Global Illumination) 44 レイトレーシング (Ray Tracing) Ø 間接照明の場合は︖
Ø ⼤域照明 (Global Illumination) Ø P点をカメラと仮定してQ点の直接照明を計算するのと同じ
Ray Tracing (Path Tracing) 45 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 46 レイトレーシング (Ray Tracing) Ø 問題点1
– 指数爆発 Ø 𝑏𝑜𝑢𝑛𝑐𝑒𝑠 = 1の場合のみ指数爆発が起こらない
Ray Tracing (Path Tracing) 47 レイトレーシング (Ray Tracing) Ø Path
Tracing Ø 𝑁 ≠ 1の場合はDistributed Ray Tracingと呼ぶ
Ray Tracing (Path Tracing) 48 レイトレーシング (Ray Tracing) Ø 𝑁
= 1の場合はノイズが⼤きすぎる Ø ピクセル毎に複数本の光線を⾶ばす
Ray Tracing (Path Tracing) 49 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 50 レイトレーシング (Ray Tracing) Ø 問題点2
– 再帰の停⽌条件に⼊る確率が⼩さすぎる
Ray Tracing (Path Tracing) 51 レイトレーシング (Ray Tracing) 3回跳ね返る
Ray Tracing (Path Tracing) 52 レイトレーシング (Ray Tracing) 17回跳ね返る
Ray Tracing (Path Tracing) 53 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 54 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 55 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 56 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 57 レイトレーシング (Ray Tracing)
Ray Tracing (Path Tracing) 58 レイトレーシング (Ray Tracing) 完成︕︕︕
Ray Tracing (Path Tracing) 59 レイトレーシング (Ray Tracing) The Cornell
box — http://www.graphics.cornell.edu/online/box/compare.html 写真 Path Tracing Global Illumination
Deep Denoising 60
Deep Denoising 61 Deep Denoising 1 sample per pixel rendering
Deep Denoising (Nvidia) 62 Deep Denoising Interactive Reconstruction of Monte
Carlo Image Sequences using a Recurrent Denoising Autoencoder
Deep Denoising (Depth) 63 Deep Denoising
Deep Denoising (Surface normal) 64 Deep Denoising
Deep Denoising (Nvidia) 65 Deep Denoising Interactive Reconstruction of Monte
Carlo Image Sequences using a Recurrent Denoising Autoencoder
Deep Denoising (Pixar/Disney) 66 Deep Denoising Kernel-Predicting Convolutional Networks for
Denoising Monte Carlo Renderings
Deep Denoising (Pixar/Disney) 67 Deep Denoising Kernel-Predicting Convolutional Networks for
Denoising Monte Carlo Renderings
Deep Denoising (Pixar/Disney) 68 Deep Denoising
Deep Shading 69 Deep Denoising Deep Shading: Convolutional Neural Networks
for Screen Space Shading
スーパーサンプリング 70
MSAA 71 スーパーサンプリング
MSAA 72 スーパーサンプリング ピクセル毎にN×Nサンプルを取る
MSAA 73 スーパーサンプリング ピクセル内で平均する
MSAA 74 スーパーサンプリング
MSAA 75 スーパーサンプリング 4×4 Super Sampling (MSAA 4X)
チェックボード 76 スーパーサンプリング Ø Sonyが採⽤した技術 Ø 各フレームは交替に半分のピクセルずつをレンダリングする Ø 残りの半分はbilinearまたはBicubic補完 Ø
画⾯上に出⼒するフレームは現在フレームと1コマ前のものの融合 Ø 問題点 Ø 髪の⽑など信号の変化が激しい部位はバレる Ø 運動する時は残影を残してしまう
DLSS 1.0 77 スーパーサンプリング Ø Nvidiaが考案した技術 Ø 深層学習スーパーサンプリング (Deep Learning
Super Sampling) Ø スーパーサンプリングによるアンチエイリアシング Ø 問題点 Ø 運動すると違和感を感じることがある(残影や点滅) 訓練済みモデル 特化したモデル 64枚以上8K画像 1080P画像 超解像度 8K画像 スーパーサンプリング 4K画像
DLSS 2.0 78 スーパーサンプリング Ø Nvidiaが考案した技術 Ø 完全に作り直し Ø 時間軸の導⼊
Ø 問題点 Ø 反射は補完されない (低解像度のまま) 出典︓NVIDIA DLSS 2.0: AI レンダリングの⼤きな⾶躍
DLSS 2.0 79 スーパーサンプリング
DLSS 2.0 80 スーパーサンプリング Native 4K DLSS 2.0 (quality) CyberPunk
2077 キアヌ・リーブズ
Differentiable Rendering 81
Differentiable Rendering 82 Differentiable Rendering Ø レンダリングの中の微分不可能の処理を微分可能な処理に置き換える Ø 3Dシーンを理解する (Inverse
Rendering)
Differentiable Rendering 83 Differentiable Rendering … … カメラの位置最適化 facebookresearch/pytorch3d: PyTorch3D
is FAIR's library of reusable components for deep learning with 3D data
Differentiable Rendering 84 Differentiable Rendering 6dof回転を予測 tensorflow/graphics: TensorFlow Graphics: Differentiable
Graphics Layers for TensorFlow
Differentiable Rendering 85 Differentiable Rendering Meshセグメンテーション tensorflow/graphics: TensorFlow Graphics: Differentiable
Graphics Layers for TensorFlow