learning-based rendering - kaist

34
Learning-Based Rendering 2019.05.16. 20193138 Jaeyoon Kim 1

Upload: others

Post on 19-May-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learning-Based Rendering - KAIST

Learning-Based Rendering

2019.05.16.

20193138 Jaeyoon Kim

1

Page 2: Learning-Based Rendering - KAIST

Review for previous presentation

β€’ β€œMicrofacet Model and Material Appearance” by Hakyeong Kim

2

Page 3: Learning-Based Rendering - KAIST

Machine Learning in Rendering

From CheolMin’s slides From Saehun’s slides3

Page 4: Learning-Based Rendering - KAIST

Deep Scattering:Rendering Atmospheric Clouds withRadiance-Predicting Neural Networks

by S. Kallweit, T. MΓΌller, B. McWilliams, M. Gross, J. NovΓ‘k

Slides and images from β€œDeep Learning for Light Transport” by Jan NovΓ‘k, Disney Research 4

Page 5: Learning-Based Rendering - KAIST

Remind previous presentation

From Hyunsoo’s slides 5

Page 6: Learning-Based Rendering - KAIST

6

Page 7: Learning-Based Rendering - KAIST

7

Page 8: Learning-Based Rendering - KAIST

8

Page 9: Learning-Based Rendering - KAIST

9

Page 10: Learning-Based Rendering - KAIST

Rendering Clouds

𝐿𝐿 𝐱𝐱,𝑀𝑀 = οΏ½0

βˆžπ‘π‘ 𝐲𝐲|𝐱𝐱 𝛼𝛼�

𝑆𝑆𝑝𝑝 �𝑀𝑀|𝑀𝑀 𝐿𝐿 𝐲𝐲, �𝑀𝑀 d�𝑀𝑀d𝑦𝑦

Predict using a network

10

Page 11: Learning-Based Rendering - KAIST

Rendering Clouds

β€’ Scattered direct illuminationβ€’ Estimated using MC

11

Page 12: Learning-Based Rendering - KAIST

Rendering Clouds

β€’ Scattered direct illuminationβ€’ Estimated using MC

β€’ Scattered indirect illuminationβ€’ Predicted using NN

12

Page 13: Learning-Based Rendering - KAIST

Radiance Predicting MLP

β€’ Uses hierarchical stencil for sampling.β€’ for both local details and overall shape

β€’ Feeds into the network.

13

Page 14: Learning-Based Rendering - KAIST

Radiance Predicting MLP

β€’ Uses hierarchical stencil for sampling.β€’ for both local details and overall shape

β€’ Feeds into the network.β€’ One block with two layers for each stencil.β€’ Some FC layers at the end of the network.

14

Page 15: Learning-Based Rendering - KAIST

15

Page 16: Learning-Based Rendering - KAIST

16

Page 17: Learning-Based Rendering - KAIST

Slides and images from β€œBayesian online regression for adaptive direct illumination

sampling” by Petr at al. 17

Page 18: Learning-Based Rendering - KAIST

Noise in MC Rendering

18

Page 19: Learning-Based Rendering - KAIST

Noise in MC Rendering

Non-adaptive sampling[Wang et al. 2009]

Reference

19

Page 20: Learning-Based Rendering - KAIST

Noise in MC Rendering

Non-adaptive sampling[Wang et al. 2009]

Adaptive sampling[Donikian et al. 2006]

20

Page 21: Learning-Based Rendering - KAIST

Direct Illumination

Less important

Occluded

21

Page 22: Learning-Based Rendering - KAIST

Light Clustering

22

Page 23: Learning-Based Rendering - KAIST

Direct Illumination

β€’ 𝐿𝐿 𝐱𝐱,𝑀𝑀 = ∫𝐴𝐴 𝐹𝐹 𝐲𝐲 β†’ 𝐱𝐱 β†’ 𝑀𝑀 d𝐲𝐲

β€’ 𝐹𝐹 𝐲𝐲 β†’ 𝐱𝐱 β†’ 𝑀𝑀 = 𝐿𝐿𝑒𝑒 𝐲𝐲 β†’ 𝐱𝐱 𝐡𝐡 𝐲𝐲 β†’ 𝐱𝐱 β†’ 𝑀𝑀 𝑉𝑉 𝐲𝐲 ↔ 𝐱𝐱 𝐺𝐺 𝐲𝐲 ↔ 𝐱𝐱

β€’ 𝐿𝐿 𝐱𝐱,𝑀𝑀 = 𝐹𝐹 𝐲𝐲→𝐱𝐱→𝑀𝑀𝑝𝑝 𝐲𝐲|𝐱𝐱,𝑀𝑀

𝑀𝑀

𝐲𝐲 𝐱𝐱𝐴𝐴

23

Page 24: Learning-Based Rendering - KAIST

Probability Density Function

β€’ 𝑝𝑝 𝐲𝐲|𝐱𝐱,𝑀𝑀 = 𝑃𝑃 𝑐𝑐|𝐱𝐱 𝑃𝑃 𝑙𝑙|𝑐𝑐 𝑝𝑝 𝐲𝐲|𝑙𝑙,𝑀𝑀‒ 𝑃𝑃 𝑐𝑐|𝐱𝐱 : selecting a light cluster c ∈ Cβ€’ 𝑃𝑃 𝑙𝑙|𝑐𝑐 : selecting a light 𝑙𝑙 ∈ 𝑐𝑐, 𝑃𝑃 𝑙𝑙|𝑐𝑐 = 𝛷𝛷𝑙𝑙/βˆ‘π‘™π‘™β€™βˆˆπ‘π‘ 𝛷𝛷𝑙𝑙’

β€’ 𝑝𝑝 𝐲𝐲|𝑙𝑙,𝑀𝑀 : selecting a point 𝑦𝑦 ∈ 𝑙𝑙, using standard techniques in [Pharr et al. 2016; Shirley et al. 1996].

β€’ Only need to predict 𝑃𝑃 𝑐𝑐|𝐱𝐱 .

24

Page 25: Learning-Based Rendering - KAIST

Optimal Cluster Selection

β€’ 𝑉𝑉𝑉𝑉𝑉𝑉 𝐿𝐿 𝐱𝐱 = βˆ’πΏπΏ 𝐱𝐱 2 + βˆ‘π‘π‘βˆˆπΆπΆ1

𝑃𝑃 𝑐𝑐|𝐱𝐱 βˆ«π΄π΄π‘π‘πΉπΉ 𝐲𝐲→𝐱𝐱 2

𝑃𝑃 𝑙𝑙|𝑐𝑐 𝑝𝑝 𝐲𝐲|𝑙𝑙d𝐲𝐲

β€’ π‘šπ‘š2,𝑐𝑐 = βˆ«π΄π΄π‘π‘πΉπΉ 𝐲𝐲→𝐱𝐱 2

𝑃𝑃 𝑙𝑙|𝑐𝑐 𝑝𝑝 𝐲𝐲|𝑙𝑙d𝐲𝐲: second moment of 𝐿𝐿𝑐𝑐 𝐱𝐱 = 𝐹𝐹 𝐲𝐲→𝐱𝐱

𝑃𝑃 𝑙𝑙|𝑐𝑐 𝑝𝑝 𝐲𝐲|𝑙𝑙

β€’ π‘ƒπ‘ƒπ‘œπ‘œπ‘π‘π‘œπ‘œ 𝑐𝑐|𝐱𝐱 ∝ 𝐿𝐿𝑐𝑐2 𝐱𝐱 + 𝑉𝑉𝑉𝑉𝑉𝑉 𝐿𝐿𝑐𝑐 𝐱𝐱

25

Page 26: Learning-Based Rendering - KAIST

Bayesian Online Regression

β€’ 𝐃𝐃: training dataβ€’ πœƒπœƒ: parametersβ€’ 𝑝𝑝 𝐃𝐃|πœƒπœƒ : a model describing the likelihood of 𝐃𝐃 given πœƒπœƒ

β€’ Maximum likelihood (ML) estimateβ€’ Finding πœƒπœƒ maximizing 𝑝𝑝 𝐃𝐃|πœƒπœƒβ€’ Prone to overfit when data is scarceβ€’ Gives poor approximations in early stages of rendering

β€’ Maximum a posteriori (MAP) estimateβ€’ Finding πœƒπœƒ maximizing 𝑝𝑝 πœƒπœƒ|𝐃𝐃 ∝ 𝑝𝑝 𝐃𝐃|πœƒπœƒ 𝑝𝑝 πœƒπœƒβ€’ More robust than ML estimate

26

Page 27: Learning-Based Rendering - KAIST

Bayesian Online Regression

β€’ �̂�𝑒 = 𝐿𝐿𝑒𝑒 𝐲𝐲→𝐱𝐱 𝑉𝑉 𝐲𝐲↔𝐱𝐱 cosπœƒπœƒπ²π²π‘‘π‘‘2 𝐱𝐱,𝐲𝐲 𝑃𝑃 𝑙𝑙|𝑐𝑐 𝑝𝑝 𝐲𝐲|𝑙𝑙

, �̂�𝑒𝐱𝐱 = �̂�𝑒cosπœƒπœƒπ±π±

β€’ Data 𝐃𝐃 consists of tuples �̂�𝑒𝐱𝐱,𝑖𝑖 , �̂�𝑑𝑖𝑖 .

β€’ 𝑝𝑝(𝐃𝐃|πœƒπœƒ) = βˆπ‘–π‘–π‘π‘ 𝑝𝑝 �̂�𝑒𝐱𝐱,𝑖𝑖|�̂�𝑑𝑖𝑖 ,πœƒπœƒ

β€’ 𝑝𝑝 �̂�𝑒𝐱𝐱|�̂�𝑑,πœƒπœƒ = 𝛿𝛿 �̂�𝑒𝐱𝐱 𝑝𝑝0 + 1 βˆ’ 𝑝𝑝0 𝑁𝑁 �̂�𝑒𝐱𝐱| π‘˜π‘˜οΏ½π‘‘π‘‘2

, β„ŽοΏ½π‘‘π‘‘4β€’ πœƒπœƒ = 𝑝𝑝0, π‘˜π‘˜, β„Žβ€’ 𝑝𝑝 πœƒπœƒ = 𝐡𝐡 𝑝𝑝0| οΏ½π‘π‘π‘œπ‘œ, �𝑁𝑁𝑣𝑣 𝑁𝑁 βˆ’ π›€π›€βˆ’1 π‘˜π‘˜, β„Ž|πœ‡πœ‡0, �𝑁𝑁, �𝑁𝑁𝛼𝛼 ,𝛽𝛽

27

Page 28: Learning-Based Rendering - KAIST

Bayesian Online Regression

β€’ 𝐿𝐿𝑐𝑐 𝐱𝐱 β‰ˆ 1βˆ’π‘π‘0 π‘˜π‘˜οΏ½π‘‘π‘‘2

β€’ 𝑉𝑉𝑉𝑉𝑉𝑉 𝐿𝐿𝑐𝑐 𝐱𝐱 β‰ˆ 1βˆ’π‘π‘0 𝑝𝑝0π‘˜π‘˜2+β„ŽοΏ½π‘‘π‘‘4

β€’ π‘ƒπ‘ƒβˆ— 𝑐𝑐|𝐱𝐱 ∝ 1�𝑑𝑑2

1 βˆ’ 𝑝𝑝0 2π‘˜π‘˜2 + 1 βˆ’ 𝑝𝑝0 𝑝𝑝0π‘˜π‘˜2 + β„Ž

28

Page 29: Learning-Based Rendering - KAIST

Summary

β€’ Light preprocess (clustering)β€’ During each Next event estimation:

β€’ Obtain cached clustering.β€’ Compute distributions of estimates for each cluster. (mean, variance)β€’ Build distribution over clusters.β€’ Sample direct illumination.β€’ Record new data for sampled cluster.

29

Page 30: Learning-Based Rendering - KAIST

Results

30

Page 31: Learning-Based Rendering - KAIST

Results

31

Page 32: Learning-Based Rendering - KAIST

Reference

β€’ Simon Kallweit, Thomas Muller, Brian McWilliams, Markus Gross, and Jan Novak. 2017. Deep Scattering: Rendering Atmospheric Clouds with Radiance-Predicting Neural Networks. ACM Trans. Graph. 36, 6, Article 231 (November 2017), 11 pages.

β€’ J. NovΓ‘k at al. 2018. Deep Learning for Light Transport. Disney Research.

β€’ Petr Vevoda, Ivo Kondapaneni, and Jaroslav KΕ™ivΓ‘nek. 2018. Bayesian online regression for adaptive direct illumination sampling. ACM Trans. Graph. 37, 4, Article 125 (August 2018), 12 pages.

32

Page 33: Learning-Based Rendering - KAIST

Thank you!Any questions?

33

Page 34: Learning-Based Rendering - KAIST

Quiz

Fill in the blanks with words in the box.

1. In β€œDeep Scattering β€¦β€œ paper, scattered ( ) illumination is predicted using a neural network.

2. In β€œBayesian online regression …” paper, authors aim to reduce noise in ( ) illumination with Bayesian online learning.

(a) Direct(b) Indirect(c) Diffuse(d) Specular

34