Slide 1

Slide 1 text

~Reservoir Spatio-Temporal Importance Resampling~

Slide 2

Slide 2 text

https://www.youtube.com/watch?v=AQXRiP6XQdo

Slide 3

Slide 3 text

https://www.youtube.com/watch?v=Tk7Zbzd-6fs

Slide 4

Slide 4 text

https://dl.acm.org/doi/10.1145/3478512.3488613

Slide 5

Slide 5 text

• •

Slide 6

Slide 6 text

• •

Slide 7

Slide 7 text

• •

Slide 8

Slide 8 text

• •

Slide 9

Slide 9 text

• •

Slide 10

Slide 10 text

Slide 11

Slide 11 text

• • Big Wave

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

• 𝐼 𝐼 𝜀 • 𝜖 𝔼 𝐼 − 𝐼 = 𝜀

Slide 14

Slide 14 text

𝐿𝑜 𝑥, 𝜔 = 𝐿𝑒 𝑥, 𝜔 + න Ω 𝑓𝑟 𝑥, 𝜔′, 𝜔 𝐿𝑖 𝑥, 𝜔 cos 𝜃 𝑑𝜔 Emissive BSDF =BRDF+BTDF Light 解析解が無い(答えが一意に定まらない)。 再帰的に書きなおすことが出来る。

Slide 15

Slide 15 text

• • • 𝐼 = 1 𝑁 ෍ 𝑖=1 𝑁 𝑓 𝑥𝑖 𝜌 𝑥𝑖 𝑓 𝑥𝑖 :被積分関数 𝜌 𝑥𝑖 :確率密度関数 𝑁:サンプル数

Slide 16

Slide 16 text

• • Importance Sampling • Stratified Sampling ( ) • Multiple Importance Sampling • Quasi Monte Carlo Method ( ) •

Slide 17

Slide 17 text

• • 𝑓 𝑥 𝜌 𝑥 𝑃 𝑋 ≤ 𝑥 𝑃 𝑥 𝑃−1 𝑢 𝑓 𝑥 ※レンダリングにおける具体的な例は[Pocol 2021]を参照。

Slide 18

Slide 18 text

• • • 𝑥 𝑓 𝑥 𝑎 𝑏 strata 0

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

• • • • • •

Slide 24

Slide 24 text

• • • • • 𝑤𝐵𝑆𝐷𝐹 𝑥 = 𝑝𝐵𝑆𝐷𝐹 𝑥 𝑝𝐵𝑆𝐷𝐹 𝑥 + 𝑝𝑙𝑖𝑔ℎ𝑡 𝑥 𝑤𝑙𝑖𝑔ℎ𝑡 𝑥 = 𝑝𝑙𝑖𝑔ℎ𝑡 𝑥 𝑝𝐵𝑆𝐷𝐹 𝑥 + 𝑝𝑙𝑖𝑔ℎ𝑡 𝑥

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

• • 𝑝 𝑀 𝑀 ≥ 1 𝐗 = 𝑋1 , ⋯ , 𝑋𝑀 𝑤𝑗 3. 𝐗 𝑤1 , ⋯ , 𝑤𝑀 𝑌 𝑤𝑗 = ො 𝑝 𝑋𝑗 𝑝 𝑋𝑗 を 𝑌 Ƹ 𝑝

Slide 28

Slide 28 text

• • 𝐼 = 1 𝑁 ෍ 𝑖=1 𝑁 𝑓 𝑌𝑖 Ƹ 𝑝 𝑌𝑖 ∙ 1 𝑀 ෍ 𝑗=1 𝑀 Ƹ 𝑝 𝑋𝑖𝑗 𝑝 𝑋𝑖𝑗 • 𝑓が Ƹ 𝑝 𝑝 • 𝑀 𝑁 補正項がくっついている

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

𝑀

Slide 34

Slide 34 text

𝑓 = 𝐹𝑟 𝐺 𝑉 𝐿𝑒 Ƹ 𝑝 = 𝐹𝑟 𝐺 𝐿𝑒 𝐹𝑟 𝐺 𝑉 𝐿𝑒 • • • 比較的軽量な候補サンプルが生成できる!!

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

• • • 𝑀 •

Slide 37

Slide 37 text

• • • • •

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

• 𝑀 • 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑀 • 𝑀 • 𝑥1

Slide 40

Slide 40 text

• 𝑥1 𝑚 𝑥𝑚 • 𝑥𝑖 • 𝑥𝑖 𝑥𝑚+1 𝑤 𝑥𝑖 σ 𝑗=1 𝑚 𝑤 𝑥𝑗 𝑤 𝑥𝑚+1 σ 𝑗=1 𝑚+1 𝑤 𝑥𝑗

Slide 41

Slide 41 text

• 𝑥𝑚+1 𝑥𝑖 𝑤 𝑥𝑖 σ 𝑗=1 𝑚 𝑤 𝑥𝑗 1 − 𝑤 𝑥𝑚+1 σ 𝑗=1 𝑚+1 𝑤 𝑥𝑗 = 𝑤 𝑥𝑖 σ 𝑗=1 𝑚+1 𝑤 𝑥𝑗 𝒎 𝒎 + 𝟏

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

• •

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

• • •

Slide 53

Slide 53 text

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

𝑝 𝑥𝑖 𝑤𝑖 𝑀 = 32

Slide 56

Slide 56 text

• 𝑀 Ƹ 𝑝 • 𝑓 𝑀

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

• •

Slide 65

Slide 65 text

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

• • • • • • •

Slide 74

Slide 74 text

• 𝐿 𝑟𝑖𝑠 1,𝑀 = 𝑓(𝑦) Ƹ 𝑝(𝑦) ∙ 1 𝑀 ෍ 𝑗=1 𝑀 𝑤 𝑥𝑗 = 𝑓 𝑦 ∙ 1 Ƹ 𝑝 𝑦 1 𝑀 ෍ 𝑗=1 𝑀 𝑤 𝑥𝑗 = 𝑓 𝑦 𝑊 𝐱, 𝑧 𝑊 𝐱, 𝑧 = 1 Ƹ 𝑝 𝑥𝑧 1 𝑀 ෍ 𝑖=1 𝑀 𝑤𝑖 𝑥𝑖

Slide 75

Slide 75 text

• 𝑊 𝐱, 𝑧 Τ 1 𝑝 𝑦 • 𝑊 𝐱, 𝑧 𝔼 𝑊 𝐱, 𝑧 = 1 𝑝 𝑦 𝑍 𝑦 𝑀 𝑍 𝑦 = 𝑖 | 1 ≤ 𝑖 ≤ 𝑀 and 𝑝𝑖 𝑦 > 0 𝑝𝑖 𝑦 > 0 𝑦 𝑖 𝑝𝑖 𝑦 = 0の 𝑦

Slide 76

Slide 76 text

• 𝔼 𝑀 𝑍 𝑦 𝑊 𝐱, 𝑧 = 1 𝑝 𝑦 𝐼 = 1 𝑁 ෍ 𝑖=1 𝑁 𝑓 𝑌𝑖 Ƹ 𝑝 𝑌𝑖 ∙ 1 𝑍 𝑌𝑖 ෍ 𝑗=1 𝑀 Ƹ 𝑝 𝑋𝑖𝑗 𝑝 𝑋𝑖𝑗

Slide 77

Slide 77 text

• 𝑍 • 𝑍 • • • if 𝑝 𝜔 > 0 when 𝑓 𝜔 > 0 if Ƹ 𝑝 𝜔 > 0 and 𝑞𝑗 𝜔 > 0 when 𝑓 𝜔 > 0 if Ƹ 𝑝𝑖 𝜔 > 0 and 𝑞𝑗 𝜔 > 0 when 𝑓 𝜔 > 0 𝑍 𝜔 𝑀

Slide 78

Slide 78 text

• Ƹ 𝑝 Ƹ 𝑝 Ƹ 𝑝𝐴 𝑎 > 0 but Ƹ 𝑝𝐵 𝑎 = 0 Ƹ 𝑝𝐴 𝑑 = 0 Ƹ 𝑝𝐵 𝑎 = 0

Slide 79

Slide 79 text

• •

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Slide 82

Slide 82 text

• • • •

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

• • •

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

• • •

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

• • • •

Slide 103

Slide 103 text

• •

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

• • •

Slide 107

Slide 107 text

Slide 108

Slide 108 text

• • • •

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

No content

Slide 111

Slide 111 text

No content

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

No content

Slide 114

Slide 114 text

Slide 115

Slide 115 text

No content

Slide 116

Slide 116 text

• • •

Slide 117

Slide 117 text

Slide 118

Slide 118 text

No content

Slide 119

Slide 119 text

No content

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

No content

Slide 122

Slide 122 text

No content

Slide 123

Slide 123 text

• • • • • • •

Slide 124

Slide 124 text

𝑋𝑖 𝑓 Ω 𝑝 𝑝𝑖 𝑋 𝑚𝑖 𝑋𝑖 𝑊𝑖 Τ 1 𝑝𝑖 𝑋𝑖 Ω𝑖 𝑋𝑖 𝑝𝑖 𝑓 𝑓 𝑌 𝑊𝑌

Slide 125

Slide 125 text

• 𝑋𝑖 Ω𝑖 𝑊𝑖 ∈ ℝ Τ 1 𝑝𝑖 𝑋𝑖 • 𝑓 Ω 𝑇𝑠 : Ω𝑠 → Ω 𝑋𝑠 ∈ Ω𝑠 Ω • Τ 𝜕𝑇𝑖 𝜕𝑥 • 𝑇𝑖 𝑤𝑖 = 𝑚𝑖 𝑇𝑖 𝑋𝑖 Ƹ 𝑝 𝑇𝑖 𝑋𝑖 𝑊𝑖 ∙ 𝜕𝑇𝑖 𝜕𝑋𝑖

Slide 126

Slide 126 text

• • • •

Slide 127

Slide 127 text

• • • •

Slide 128

Slide 128 text

No content

Slide 129

Slide 129 text

• • • 𝐱𝑖 , 𝐱𝑖+1 𝐲𝑖 𝐲𝑖+1 = 𝐱𝑖+1 •

Slide 130

Slide 130 text

• • 𝐲𝑖+1

Slide 131

Slide 131 text

• • 𝐲𝑖+1 •

Slide 132

Slide 132 text

• 𝑦𝑖+1 •

Slide 133

Slide 133 text

• • •

Slide 134

Slide 134 text

No content

Slide 135

Slide 135 text

No content

Slide 136

Slide 136 text

• • • • •

Slide 137

Slide 137 text

𝐱3 𝐱4 𝐱4 𝐱1 𝐱2 𝐲1 𝐲2 𝐲3 𝐱4 𝐲1 𝐱2 𝐲1 ↔ 𝐱2 ↔ 𝐱3

Slide 138

Slide 138 text

• • • 𝐱𝑖+1 − 𝐱𝑖 ≥ 𝑑𝑚𝑎𝑥 𝐱𝑖 , 𝐱𝑖+1 , 𝐲𝑖 𝑦𝑖+1 𝑥𝑖+1 𝑥𝑖+1 − 𝑦𝑖 ≥ 𝑑𝑚𝑎𝑥

Slide 139

Slide 139 text

No content

Slide 140

Slide 140 text

No content

Slide 141

Slide 141 text

No content

Slide 142

Slide 142 text

No content

Slide 143

Slide 143 text

• 𝑖 𝑋𝑖 𝑡 𝑊 𝑋𝑖 𝑡 𝑌𝑖 𝑡−1 𝑋𝑖 𝑡 𝑍𝑖 𝑗 𝑍𝑖 𝑍𝑗 𝑌𝑖 𝑡 𝑍𝑖 ≔ 𝑌𝑖 𝑡 𝐼𝑖 𝑡 ≈ 𝑓𝑖 𝑌𝑖 𝑡 𝑊 𝑌𝑖 𝑡 ※𝑌𝑖 𝑡−1を 𝑡 − 1 𝑖

Slide 144

Slide 144 text

No content

Slide 145

Slide 145 text

• 𝑀𝑟 𝑀𝑐 • • 𝑀𝑟

Slide 146

Slide 146 text

No content

Slide 147

Slide 147 text

Slide 148

Slide 148 text

No content

Slide 149

Slide 149 text

No content

Slide 150

Slide 150 text

No content

Slide 151

Slide 151 text

No content

Slide 152

Slide 152 text

No content

Slide 153

Slide 153 text

No content

Slide 154

Slide 154 text

• • • •

Slide 155

Slide 155 text

• • • • • •

Slide 156

Slide 156 text

• LightingPasses::RenderDirectLighting() • ExecuteRayTracingPass(…, …, “GenerateInitialSamples”, …, …); • ExecuteRayTracingPass(…, …, “TemporalResampling”, …, …); • ExecuteRayTracingPass(…, …, “SpatialResampling”, …, …); • ExecuteRayTracingPass(…, …, “ShadeSamples”, …, …);

Slide 157

Slide 157 text

• LightingPasses::RenderBrdfRays() • ExecuteRayTracingPass(…, …, “BrdfRayTracingPass”, …, …); • ExecuteRayTracingPass(…, …, “ShadeSecondarySurfaces”, …, …); • ExecuteRayTracingPass(…, …, “GITemporalResampling”, …, …); • ExecuteRayTracingPass(…, …, “GISpatialResampling”, …, …); • ExecuteRayTracingPass(…, …, “GIFinalShading”, …, …);

Slide 158

Slide 158 text

• •

Slide 159

Slide 159 text

Slide 160

Slide 160 text

• ReSTIRPT/Source/RenderPasses/ReSTIRPTPass • C++ ReSTIRPTPass.cpp • Slang • Shift.slang

Slide 161

Slide 161 text

No content

Slide 162

Slide 162 text

• [Talbot 2005] Justin F. Talbot, Davit Cline, Parris Egbert, “Importance Resampling fo Global Illumination”, ESGR’05, pp.139-146, 2005 • [Bitterli 2020] Benedikt Bitterli, Chris Wyman, Matt Pharr, Peter Shirley, Aaron Lefohon, Wojciech Jarosz, “Spatiotemporal reservoir resampling for real-time ray tracing with dynamic direct lighting”, ACM Transactions on Graphics, Vol.39, No.4, 2020. • [Wyman 2021] Chris Wyman, Alexey Panteleev, “Rearchitecting Spatiotemporal Resampling for Production”, High-Performance Graphics 2021. • [Ouyang 2021] Y.Ouyang, S.Liu, M.Kettunen, M.Pharr, J.Pataleoni, “ReSTIR GI: Path Resampling for Real-Time Path Tracing”, High- Performance Graphics 2021. • [Lin 2022] Daqi Lin, Markus Kettunen, Benedikt Bitterli, Jacopo Pantaleoni, Cem Yukesel, Chris Wyman, “Generalized Resampled Importance Sampling”, SIGGRAPH 2022. • [Veach 1997] Eric Veach, “Robust Monte Carlo Methods for Light Transport Simulation”, Ph.D. dissertation, Standford University, 1997. • [Shocker 2022] Shocker, “ (Path Tracing)”, memoRANDOM, https://rayspace.xyz/CG/contents/path_tracing/, 2022. • [Pocol 2021] Pocol, “Direct3D 12 ”, , 2021. • [KiNaNkomoti 2022] KiNaNkomoti, “Pathtracing Caustics ”, 8 , 2022. • [Hirai 2022] , , “ 7 ”, CEDEC KUSYU 2022 • [NVIDIA 2023] NVIDIA, “ 2077 4 11 ”, https://www.nvidia.com/ja-jp/geforce/news/cyberpunk-2077-ray-tracing-overdrive-update-launches-april-11/, 2023. • [Capcom 2019] Capcom, “Devil May Cry5 Special Edition”, https://www.devilmaycry.com/5se/jp/, 2019. • [EmbarkStudios 2023] EmbarkStudios, “kajiya”, https://github.com/EmbarkStudios/kajiya, 2023. • [Halen 2021] Henrik Halen, Andres Brinck, Kyle Hayward, Xiangshun Bei, “Global Illumination Based on Surfels”, SIGGRAPH 2021 Advances in Real-Time Rendering in Games course, 2021. • [Boksansky 2021] Jakub Boksansky, Paula Jukarainen, Chris Wyman, “Rendering Many Lights With Grid-Based Reservoirs”, Ray Tracing Gems 2, Chapter 23, pp.351-365, 2021.

Slide 163

Slide 163 text

No content