I've been reading some ray-tracing book and stumbled upon something that really intrugued me. The author derives the simple dot(N, L) equation for an ideal directional light (assume white light (1,1,1)).
But let's start from the top. The direct illumination formula is this:
http://www.HostMath.com/Show.aspx?C..._o) L_i(p, \omega_i) \cos(\theta_i) d\omega_i
The final formula for (directional light) L_o is:
http://www.HostMath.com/Show.aspx?Code=L_o(p, \omega_o) = f_r(p, l, \omega_o) \cos(\theta_l)
(where l is light'd direction)
The author states that in order for the equation to end up like this, L_i must be:
http://www.HostMath.com/Show.aspx?C...os\theta_i-cos\theta_l) \delta(\phi_i-\phi_l)
I was curious enough to verify it and indeed:
http://www.wolframalpha.com/input/?...dtheta+)+from+0+to+Pi/2+)+dphi+from+0+to+2*Pi
A is cos(theta_l), B is phi_l. Note that I skipped BRDF f function.
Now my simple question is: why is L_i the way it is? How was it derived?
But let's start from the top. The direct illumination formula is this:
http://www.HostMath.com/Show.aspx?C..._o) L_i(p, \omega_i) \cos(\theta_i) d\omega_i
The final formula for (directional light) L_o is:
http://www.HostMath.com/Show.aspx?Code=L_o(p, \omega_o) = f_r(p, l, \omega_o) \cos(\theta_l)
(where l is light'd direction)
The author states that in order for the equation to end up like this, L_i must be:
http://www.HostMath.com/Show.aspx?C...os\theta_i-cos\theta_l) \delta(\phi_i-\phi_l)
I was curious enough to verify it and indeed:
http://www.wolframalpha.com/input/?...dtheta+)+from+0+to+Pi/2+)+dphi+from+0+to+2*Pi
A is cos(theta_l), B is phi_l. Note that I skipped BRDF f function.
Now my simple question is: why is L_i the way it is? How was it derived?