Previous | Next --- Slide 11 of 72
Back to Lecture Thumbnails
kayvonf

Question: Imagine we are rendering a scene with only point light sources. How would this code change?

kapalani

If we have a point light source then would wi just be a vector from the point light source to the hit point and the Li should just be of the form constant/(4pir^2) where r is distance to the light source?

skygao

@kapalani You are on the right track but I'm not sure where you got $c / 4 \pi r^2$ from. The attenuation of a normal, unmodified light entity is preset to be 100% quadratic. While this is typical real world attenuation (accordng to inverse-square law), this rate is often too fast for virtual environments, creating unnatural glares on nearby textures (like the ceiling). In that regard we usually adopt the constant-linear-quadratic model.

kapalani

I just thought a point light source emits light in all directions around a sphere and it has constant intensity. So the intensity falls off as r^2 because area of the sphere is 4pir^2