lecture 16 big picture
play

Lecture 16 - Big Picture Welcome! , = (, ) , - PowerPoint PPT Presentation

INFOMAGR Advanced Graphics Jacco Bikker - November 2019 - February 2020 Lecture 16 - Big Picture Welcome! , = (, ) , + , , ,


  1. INFOMAGR – Advanced Graphics Jacco Bikker - November 2019 - February 2020 Lecture 16 - “Big Picture” Welcome! 𝑱 𝒚, 𝒚 ′ = 𝒉(𝒚, 𝒚 ′ ) 𝝑 𝒚, 𝒚 ′ + න 𝝇 𝒚, 𝒚 ′ , 𝒚 ′′ 𝑱 𝒚 ′ , 𝒚 ′′ 𝒆𝒚′′ 𝑻

  2. Today’s Agenda: Monte Carlo ▪ Sampling an Area Light with One Ray ▪ Sampling Multiple Area Lights with One Ray ▪ Difficult Cases: Spherical Lights, Occluded Lights ▪ The Random Walk ▪ Random Walk with Next Event Estimation ▪ Russian Roulette ▪ Example Exam Questions

  3. Advanced Graphics – Grand Recap 3 Lights Light arriving at 𝑞 from a point light at distance 𝑒 : 𝑂∙𝑀 Case 1: Point Light 𝐽 4π𝑒 2 per unit surface area. This is the irradiance from the 𝒇 Situation: light at 𝑓 arriving at point 𝑞 . ▪ surface point: location 𝒒 , normal 𝑶 ; ▪ point light: location 𝒇 , intensity 𝑱 (in Watt, or joule per second); ▪ distance between 𝒒 and 𝒇 : 𝑒 . The contribution ▪ unit vector from 𝒒 to 𝑓 : 𝑴 . of multiple lights is summed. Flux leaving 𝒇 : 𝑱 joules per second. Flux arriving at a sphere, radius 𝑠 , surface 4𝜌𝑠 2 around 𝒇 : 𝑱 𝑱 4𝜌𝑠 2 ( 𝑋/𝑛 2 ) Irradiance arriving on that sphere: 𝑶 𝑴 𝑱 Flux arriving per steradian: 4𝜌 Steradians for a unit area surface patch at location 𝒒 : ~ 𝑂∙𝑀 𝑒 2 This is the solid angle of the unit area surface patch as seen from 𝒇 , or: The area of the patch projected on the unit sphere around 𝒇 . 𝒒

  4. Advanced Graphics – Grand Recap 4 Lights Case 2: Area Light Situation: 𝒇 ▪ surface point, location 𝒒 , normal 𝑶 𝒒 ; ▪ single-sided area light, intensity 𝑱 , area A, normal 𝑶 𝒇 . 𝐵 𝑂 𝑓 ∙−𝑀 Steradians for the area light, as seen from 𝒒 : (approximately) . 𝑒 2 𝑶 𝒇 𝐵 𝑂 𝑓 ∙−𝑀 The energy arriving at 𝒒 is: 𝑱 𝑻𝑩, 𝑻𝑩 ≈ 𝑒 2 𝑶 𝒒 𝑴 𝐵 𝑂 𝑓 ∙−𝑀 𝑂 𝑞 ∙𝑀 The irradiance (joules per second per unit area) is: 𝑱 . 𝑒 2 𝒒

  5. Advanced Graphics – Grand Recap 5 Lights Sampling an Area Light 𝒇 𝐵 𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑂 𝑓 ∙−𝑀 𝑂 𝑞 ∙𝑀 The irradiance (joules per second per unit area) is: 𝑱 . 𝑒 2 Here, 𝐵 𝑤𝑗𝑡𝑗𝑐𝑚𝑓 is the visible area of the light source. 𝐵 𝑤𝑗𝑡𝑗𝑐𝑚𝑓 may be smaller than 𝐵 in the presence of occluders. We send 1 million rays to the light source. 𝑂 rays reach the light source. 𝑶 𝒇 𝑂 The visible area is estimated as 𝐵 𝑤𝑗𝑡𝑗𝑐𝑚𝑓 = 𝐵 1,000,000 . Now, we send a single ray to the light source. The probability of a ray 𝑶 𝒒 𝑴 reaching the light source is 𝜍 . Now, 𝐵 𝑤𝑗𝑡𝑗𝑐𝑚𝑓 = 𝐵 𝜍 . For this single ray, the answer is usually wrong. However, on average the answer is correct. 𝒒

  6. Today’s Agenda: Monte Carlo ▪ Sampling an Area Light with One Ray ▪ Sampling Multiple Area Lights with One Ray ▪ Difficult Cases: Spherical Lights, Occluded Lights ▪ The Random Walk ▪ Random Walk with Next Event Estimation ▪ Russian Roulette ▪ Example Exam Questions

  7. Advanced Graphics – Grand Recap 7 Lights Generalized: If we have 𝑂 lights, and we sample each with a 1 probability 𝜍 𝑗 , we scale the contribution by 𝜍 𝑗 to Sampling Multiple Lights get an unbiased sample of the set of 𝑂 lights. “To sample 𝑂 lights with a single ray, chose a random Any 𝜍 𝑗 is valid, as long as σ 𝜍 𝑗 = 1 and 𝜍 𝑗 > 0 light, and multiply whatever the ray returns by 𝑂 ”. unless we know the sample will yield 0. Situation: two lights . Mental steps: ▪ If the lights would have been point lights, we would have sampled both and summed the results. ▪ We can sample an area light with a single ray. So, we sample both using a single ray, and sum the results. ▪ Using one ray, we could sample alternating lights. Since each light is now sampled in half the cases, we should increase the result we get each time by 2. ▪ Or, we can sample a randomly selected light. On average, each light is again sampled in half of the cases, so we scale by 2. 𝒒 ▪ In other words, we scale by 1/50%=2, where 50% is the probability of selecting a light.

  8. Today’s Agenda: Monte Carlo ▪ Sampling an Area Light with One Ray ▪ Sampling Multiple Area Lights with One Ray ▪ Difficult Cases: Spherical Lights, Occluded Lights ▪ The Random Walk ▪ Random Walk with Next Event Estimation ▪ Russian Roulette ▪ Example Exam Questions

  9. Advanced Graphics – Grand Recap 9 Lights Sampling a Spherical Light “Any 𝜍 𝑗 is valid, as long as σ 𝜍 𝑗 = 1 and 𝜍 𝑗 > 0 unless we know that the sample will yield 0.” Situation: spherical light source . Selecting points on the sphere: ▪ We can skip points on one hemisphere (i.e., 𝜍 = 0) ▪ This does not affect σ 𝜍 𝑗 ▪ Therefore it doesn’t affect the other probabilities Similar situation: when evaluating the Lambertian BRDF, we the hemisphere below the surface without accounting for the omission in any way. 𝒒

  10. Advanced Graphics – Grand Recap 10 Lights The only difference between situation 1 and 2 is variance: in situation 1, we get twice the energy each time we sample light 1, but it gets sampled in only Sampling Occluded Lights 50% of the cases. In situation 2, we get a much more even amount of energy for each sample. Situation 1: We have no information about occlusion. NEE probes each light with 50% probability. 1 2 ▪ samples are scaled up by 1/50%=2; ▪ rays to light 2 always yields 0; ➔ poi oint 𝒒 receives ene energy from li light 1 1 in in 50 50% of th of the cas cases, bu but th the li light is is mult ultiplied by 2. 2. Situation 2: We know light 2 is occluded. NEE probes light 1 with 100% probability. ▪ samples are scaled by 1; ➔ poi point 𝒒 receives ene energy from li light 1 1 in in 𝒒 10 100% of of the the ca cases, , mul ultiplier is is 1. 1.

  11. Today’s Agenda: Monte Carlo ▪ Sampling an Area Light with One Ray ▪ Sampling Multiple Area Lights with One Ray ▪ Difficult Cases: Spherical Lights, Occluded Lights ▪ The Random Walk ▪ Random Walk with Next Event Estimation ▪ Russian Roulette ▪ Example Exam Questions

  12. Advanced Graphics – Grand Recap 12 Walk The Random Walk How much light gets transported to the eye? 1. The light that 𝒒 emits towards the eye (typically: nothing); 2. The light that 𝒒 reflects towards the eye. The answer to 2: Light (irradiance) coming from all directions, reflected in a single direction; i.e: BRDF: න 𝑔 𝑠 𝑞, 𝜄 𝑝 , 𝜄 𝑗 cos 𝜄 𝑗 𝑔 𝑠 (𝑞, 𝑀, 𝑊) 𝛻 𝒒

  13. Advanced Graphics – Grand Recap 13 Walk Regarding 2b: ▪ The further away a point, the The Random Walk lower the probability that a random ray from 𝑞 strikes it. ▪ The probability is also How much light gets transported to the eye? proportional to 𝑂 𝑡,𝑞,𝑟 ∙ −𝑀 . ▪ At 𝑞 , we scale by 𝑂 𝑞 ∙ 𝑀 to 1. The light that 𝒒 emits towards the eye (typically: nothing); compensate for the fact that we 2. The light that 𝒒 reflects towards the eye: sample radiance, while in fact we a) That is: the light that q, r, s emit towards p, plus gather irradiance. b) The light that q, r, s (and all other scene surface points) reflect towards p. 𝒔 𝒕 𝒓 𝒒

  14. Advanced Graphics – Grand Recap 14 Walk Sampling the Hemisphere using a Single Ray The light being reflected towards the eye is the light arriving from all directions over the hemisphere, scaled by the BRDF: ׬ 𝛻 𝑔 𝑠 𝑞, 𝜄 𝑝 , 𝜄 𝑗 . Sampling the integral using a single random ray: Scale up by 2𝜌 . 𝒒

  15. Advanced Graphics – Grand Recap 15 Walk Random Walk 𝒇 Point 𝒒 reflects what point 𝒓 𝒔 reflects, which is what point 𝒔 emits. 𝒓 𝑶 𝒇 𝒒

  16. Advanced Graphics – Grand Recap 16 Walk Random Walk 𝒇 If we leave the scene, the path returns no energy. 𝑶 𝒇 𝒒

  17. Today’s Agenda: Monte Carlo ▪ Sampling an Area Light with One Ray ▪ Sampling Multiple Area Lights with One Ray ▪ Difficult Cases: Spherical Lights, Occluded Lights ▪ The Random Walk ▪ Random Walk with Next Event Estimation ▪ Russian Roulette ▪ Example Exam Questions

  18. Advanced Graphics – Grand Recap 18 NEE Next Event Estimation 𝒇 At each vertex, we sample the light source using an explicit light ray. 𝑶 𝒇 𝒒

  19. Advanced Graphics – Grand Recap 19 NEE Next Event Estimation Why does this work? “The light arriving via point 𝒒 is the light reflected by point 𝒒 , plus the light emitted by point 𝒒.” And thus: The light reflected by point 𝒒 is the light arriving at 𝒒 originating from light sources (1), plus the light reflected towards 𝒒 (2). 1: Direct light at point 𝒒 . 2: Indirect light at point 𝒒 .

Recommend


More recommend