Содержание
- 2. A Journey Through Implementing Multiscattering BRDFs & Area Lights Stephen McAuley
- 4. [Heitz16a]
- 5. [Kulla17]
- 6. If the energy reflected for a given BRDF f and a viewing direction is: Then find
- 7. The following BRDF fits that equation: Where:
- 8. In fact, that only holds for 100% reflective microfacets. Energy is lost between each bounce. Sum
- 9. Need to Calculate: For a given roughness 1-E(μ) Eavg Favg
- 10. std::fstream isotropicEnergyFile; isotropicEnergyFile.open("isotropic_reflected_energy.csv", std::ios_base::out); for (int j = 0; j { float s = float(j) /
- 11. float AverageEnergy(float alpha) { static const int NumBRDFSamples = 16384; float averageEnergy = 0.0f; for (int
- 12. float AverageEnergy(float smoothness) { float r = -0.0761947f - 0.383026f * smoothness; r = 1.04997f +
- 13. Multiscattering Specular Off Dielectrics
- 14. Multiscattering Specular On Dielectrics
- 15. Multiscattering Specular Off Metals
- 16. Multiscattering Specular On Metals
- 17. Multiscattering Diffuse
- 18. Goals: Improvements to Lambertian diffuse Multiscattering is taken into account Diffuse reacts to surface roughness Diffuse
- 19. Material Advances in Call of Duty: WWII [Chan18]
- 21. float MultiScatteringDiffuseBRDF(float lDotH, float nDotL, float nDotV, float nDotH, float smoothness) { // Burley to CoD
- 22. float MultiScatteringDiffuseBRDF(float lDotH, float nDotL, float nDotV, float nDotH, float smoothness) { // Burley to CoD
- 23. Lambert Diffuse
- 24. Multiscattering Diffuse
- 25. Difference x8
- 26. “Are we there yet?”
- 29. Problems: No multiscattering indirect specular No multiscattering specular on hair No multiscattering indirect diffuse No multiscattering
- 30. Problems: No multiscattering indirect specular No multiscattering wrapped diffuse No multiscattering diffuse on skin No multiscattering
- 31. Indirect specular
- 32. Split-Sum Approximation [Karis13]
- 33. Environment Map BRDF
- 34. Environment Map BRDF
- 35. Multiscattering Environment Map BRDF
- 36. Multiscattering Environment Map BRDF
- 37. Multiscattering Environment Map BRDF
- 38. Multiscattering Environment Map BRDF
- 39. Environment Map BRDF
- 40. Multiscattering Environment Map BRDF
- 41. [FdezAgüera19]
- 42. The paper observes that the single-scattering energy is in fact the sum of the red and
- 43. Given that Favg can be calculated analytically, and multiply-scattered light is diffuse, we get the following
- 44. Given that Favg can be calculated analytically, and multiply-scattered light is diffuse, we get the following
- 45. Single Scattering
- 46. Fdez-Agüera
- 47. Approximation to Fdez-Agüera
- 48. This gives a multiscattering formula for the environment BRDF as:
- 49. [Turquin19]
- 50. Approximation to Fdez-Agüera
- 51. Turquin
- 52. Multiscattered Specular [Kulla17]
- 53. Approximation to Fdez-Agüera
- 54. Turquin
- 58. Problems: No multiscattering indirect specular No multiscattering specular on hair No multiscattering indirect diffuse No multiscattering
- 60. Problems: No multiscattering indirect specular No multiscattering specular on hair No multiscattering indirect diffuse No multiscattering
- 61. Area Lights
- 62. Goals: Improve cinematic lighting: Softer light falloffs More realistic specular response: Broader, more visible highlights Artists
- 63. [Heitz16b]
- 64. Why LTCs? Fast to implement Full source code and demos available Flexibility in performance and light
- 65. Integrating a LTC over a A clamped cosine distribution can be analytically integrated over polygonal shapes
- 66. Integrating a LTC over a We can linearly transform this distribution to approximate BRDFs
- 67. Integrating a LTC over a Integrating a polygon over an LTC becomes integrating a polygon over
- 68. Integrating a LTC over a [Hill16] Q. LTCs always integrate to 1, but what about the
- 69. Integrating a LTC over a [Hill2016] Apply Schlick’s approximation to Fresnel to get two components:
- 70. Implementation: Offline, generate look up tables: Inverse matrix transform Magnitude and Fresnel In the shader: Calculate
- 71. Point Light
- 72. Quad Light
- 73. Disk Light
- 74. “Are we there yet?”
- 78. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 79. Source code available! https://github.com/selfshadow/ltc_code
- 80. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 81. Inverse Matrix LUT Magnitude and Fresnel LUT LTCs for Multiscattering Diffuse
- 82. Lambert Diffuse
- 83. Multiscattering Diffuse
- 84. Inverse Matrix LUT Magnitude and Fresnel LUT LTCs for Ashikhmin Cloth [Ashikhmin00]
- 85. Ashikhmin Cloth: Point Light
- 86. Ashikhmin Cloth: Area Light
- 87. Disney Sheen [Burley12]
- 88. Magnitude and Fresnel LUT for Multiscattering Diffuse Lambert Diffuse X
- 89. Disney Sheen: Point Light
- 90. Disney Sheen: Area Light
- 91. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 92. LTC magnitude and Fresnel relies on a linear dependency on F0: But our multiscattering BRDF has
- 93. [FdezAgüera19]
- 94. We have a formula for a multiscattering BRDF: E(μ) is the red channel in our magnitude
- 95. [Turquin19]
- 96. Single Scattering Specular
- 97. Approximation to Fdez-Agüera
- 98. Turquin
- 99. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 100. w = 0 w = 0.5 w = 1.0 Wrapped Lambertian Diffuse:
- 101. Rotate the normal towards the light
- 102. Axis-angle rotation Axis: Angle:
- 103. Axis: Sin Angle: Axis-angle rotation
- 104. float3 WrappedNormal(const float3 N, const float3 L, const float w) { float cosTheta = dot(N, L);
- 105. w = 0 w = 0.5 w = 1.0 Wrapping the lighting around the sphere adds
- 106. Surface area of spherical cap
- 107. Surface area of the extent of wrapped lighting on a unit sphere
- 108. Surface area of hemisphere: Surface area of the extent of wrapped lighting on a unit sphere
- 109. w = 0 w = 0.5 w = 1.0 Normalised lighting:
- 110. Multiscattering Diffuse, w = 0.0
- 111. Multiscattering Diffuse, w = 0.5
- 112. Multiscattering Diffuse, w = 1.0
- 113. Area Light, w = 0.0
- 114. Area Light, w = 0.5
- 115. Area Light, w = 1.0
- 116. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 117. cos theta curvature [Penner11] Pre-integrated scattering: Integrate Lambert diffuse over spheres of different curvatures
- 118. [Penner11] Pre-integrated scattering for multiscattering diffuse BRDF: 4D LUT required – adding view angle and roughness
- 119. [Jimenez12] Separable Screen-Space Subsurface Scattering
- 121. Problems: No implementation for cloth No implementation for multiscattering diffuse No implementation for multiscattering specular How
- 123. Remember this problem? No multiscattering indirect specular No multiscattering specular on hair No multiscattering indirect diffuse
- 124. We have a spherical harmonic projection for a clamped cosine distribution…
- 125. …and we have a mapping from an LTC to a clamped cosine distribution.
- 126. LTCs for Spherical Harmonics Treat SH bands as “area light source” Rotate SH bands by LTC
- 127. LTCs for Spherical Harmonics Treat SH bands as “area light source” Rotate cosine lobe by LTC
- 128. float2 uv = LTCTextureCoordinates(nDotV, smoothness); float4 t1 = LTCMSDiffuseInvMatrixTexture.SampleLevel(Clamp, uv, 0); float2 t2 = LTCMSDiffuseMagFresnelTexture.SampleLevel(Clamp, uv
- 129. Lambert Indirect Diffuse
- 130. Multiscattering BRDF Indirect Diffuse
- 131. Ground Truth*
- 132. Multiscattering BRDF Indirect Diffuse
- 133. Scaling by BRDF Magnitude Only
- 134. Problems Solved: Multiscattering diffuse Direct, indirect and wrapped lighting Multiscattering specular Direct and indirect lighting Area
- 135. Problems Remaining: Hair Area lighting Multiscattering diffuse and specular Skin Diffuse area lighting Multiscattering diffuse
- 136. What have we learned?
- 137. Takeaway #1: Source code is invaluable
- 138. Takeaway #2: Separate insight from implementation
- 139. Takeaway #3: Build on successful existing work
- 140. Takeaway #4: Never underestimate implementation time
- 141. Epilogue: Implementation Details for Area Lights
- 142. Goals: Control over performance Radius falloff Cone angle falloff Fall back to point lights Omni or
- 143. Goals: Control over performance Radius falloff Cone angle falloff Fall back to point lights Omni or
- 144. Windowing Function [Karis13] r
- 145. Cone Falloff θ = inner angle φ = outer angle
- 146. Inverse Square Law
- 147. Accounted for in integration over the hemisphere
- 148. Goals: Control over performance Radius falloff Cone angle falloff Fall back to point lights Omni or
- 149. Quad light falls back to spot light
- 150. projector distance Move projector position behind the light source
- 151. projector distance Use cone apex for cone angle fall off for spot and quad light
- 152. Calculate the projector distance p from outer angle and light source diameter
- 153. Worse fit for non-square light source shapes Cone fits around quad light source d d
- 154. Quad light, 100° outer angle, 90° inner angle
- 155. Fall back, 100° outer angle, 90° inner angle
- 156. Quad light, 120° outer angle, 110° inner angle
- 157. Fall back, 120° outer angle, 110° inner angle
- 158. Quad light, 140° outer angle, 130° inner angle
- 159. Fall back, 140° outer angle, 130° inner angle
- 162. Скачать презентацию