Upcoming SlideShare
×

# ゲームグラフィックス特論 第１２回

1,301 views
1,272 views

Published on

3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
1,301
On SlideShare
0
From Embeds
0
Number of Embeds
48
Actions
Shares
0
82
0
Likes
3
Embeds 0
No embeds

No notes for slide

### ゲームグラフィックス特論 第１２回

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