...

講義資料

by user

on
Category: Documents
1

views

Report

Comments

Transcript

講義資料
12
2
3
(Ambient Occlusion)
• 
• 
• 
• 
• 
• 
• 
• 
• 
4
0.5s
1.4s
5
1.4s
37.2s
6
• 
• 
E (p, n) =
∫
Ω
LA cosθi dωi = π LA
• 
E (p, n) = LA ∫ v (p, l) cosθi dωi
Ω
{
0
1
1
kA (p) =
π
∫
v (p, l) =
Ω
v (p, l) cosθi dωi
E (p, n) = kA (p) π LA
7
p0
p2
p0
p2
p1
p0
p1
p1
kA
(bent normal)
8
• 
n
&
cdiff #
Lo (v) =
⊗ %kA π LA + ∑ v (lk ) ELk cosθik (
π
$
'
k=1
•  BRDF
n
camb
Lo (v) = kA
π LA + ∑ v (lk ) f (lk , v) ⊗ ELk cosθik
π
k=1
•  bent normal
nbent =
∫
∫
Ω
v (l) l cosθi dωi
Ω
v (l) l cosθi dωi
9
•  Eind
kind
n
& n
camb #
Lo (v) = kA
⊗ %Eind + kind ∑ ELk ( + ∑ v (lk ) f (lk , v) ⊗ ELk cosθik
π
$
' k=1
k=1
•  bent normal nbent
n
' n
camb $
Lo (v) = kA
⊗ &Eind + kind ∑ ELk cosθi"k ) + ∑ v (lk ) f (lk , v) ⊗ ELk cosθik
π
%
( k=1
k=1
•  θ’ik bent normal nbent
lk
10
(Visibility)
(Obscurance)
• 
• 
d
ρ(l) = d
max
(Obscurance)
• 
ρ(l)
• 
1
kA =
π
∫ Ω ρ (l) cosθi dωi
dmax
l
d
11
• 
• 
• 
Li
• 
kA
kA! =
1− camb (1− kA)
Lo
Li
Lo
12
• 
• 
kA
bent normal nbent
• 
kA
bent normal nbent
• 
• 
• 
13
• 
[Bunnell, GPU Gems 2, 2005]
•  ILM
Pirates of the Caribbean
14
Bunnel
R
• 
1−
E
r cosθE max (1, 4 cosθR)
4 2
+r
π
E
E
• 
kA
R
15
• 
• 
• 
• 
• 
•  Crytek
• 
Crysis
16
Crytek
• 
• 
• 
kA
• 
• 
kA =1
P
17
Crytek
18
Crytek
19
Volumetric
Obscurance
20
Luft
•  Image Enhancement
z
by Unsharp Masking
the Depth Buffer
y
•  SIGGRAPH 2006
x
z
• 
x
z
• 
• 
x
z
• 
x
x
21
Luft
22
Luft
24
25
• 
• 
• 
n
p
26
• 
27
•  n:
•  p:
•  R(u, v):
u
v
•  T(p): p
•  S(x, y, z):
x, y, z
F = R (n, (0,1, 0)) T (−p)
M = F−1S (1, −1,1) F
n = (0,1, 0)
⇓
M = T (p) S (1, −1,1) T (−p)
28
Environment Map Bump Mapping
29
30
n1 sin (θ1) = n2 sin (θ2)
i
θ1
n
t = ri + (w − k) n
r = n1 n2
w = − (i ⋅ n) n
surface
k = 1+ (w − r) (w + r)
t = −cn + i
c ≈ 1.0
θ2
t
31
32
33
• 
• 
• 
• 
• 
• 
• 
• 
34
35
• 
• 
• 
36
•  Whitted [1980]
• 
• 
• 
• 
37
38
• 
• 
• 
• 
• 
• 
• 
• 
39
40
Cook[1984]
42
• 
• 
• 
• 
• 
43
44
45
• 
• 
• 
• 
• 
• 
• 
46
47
• 
• 
• 
• 
• 
• 
• 
48
49
• 
• 
• 
• 
• 
• 
• 
50
51
52
53
Precomputed Radiance Transfer
•  Sloan[2002]
•  Microsoft
•  Direct X9.0c
• 
• 
• 
• 
• 
• 
• 
• 
→2011
Disney
54
55
DirectX
PRT
PRT
56
DirectX
PRT
57
PRT
Precomputed Local Radiance Transfer for Real-Time Lighting Design
Kristensen[2005]
58
PRT
Local, Deformable Precomputed Radiance Transfer
Sloan [2005]
59
All-Frequency Shadows Using Non-linear Wavelet Lighting Approximation
Ng[2003]
60
Instant Radiosity
光源の配置
光源から光を放射して
各点の陰影付け
各点を点光源にして
陰影計算
61
SiliconStudio YEBIS
62
• 
•  https://github.com/tokoik/ggsample12
•  mirror.vert
simple.vert
• 
main.cpp
mirror.vert
n = (0, 1, 0)
p = (0, 0, 0)
• 
• 
• 
mirror.vert
•  main.cpp
• 
mirror.vert
[email protected]
63
Fly UP