Open iaomw opened 4 years ago
Problems with clarity in Light Scattering are well known, see #277
My understanding of your issue is Why is sin and cos both using the same theta?
The integration is over the half-sphere above the plane.
So theta from 0 to pi/2 And phi from 0 to 2pi
It's not entirely clear what's happening in that paragraph, but the point is to normalize the PDF to 1.
We know that for a lambertian, the PDF should scale with cos(theta). So, we integrate over the half-sphere (scaled with cos(theta)), to determine the are over the surface.
Once we find this (pi). We then scale the PDF by this factor (pi).
The cos(theta) * sin(theta) is because integrating over spherical polar coordinates means
dA = sin(theta) dtheta dpi
So
Integral integral cos(theta) dA
Or
Integral integral cos(theta) sin(theta) dtheta dphi
I checked the previous scatter
function for lambertian
. It's pointing to somewhere in the unit sphere over the hit point. That's not the full range of cos(theta). If we change to half-sphere, I can imagine it becoming something proportional to cos(theta), but not convinced. Otherwise, maybe it's still not the full rang of cos(theta) due to total reflection when theta become too large.
If cos(theta) is PDF, then the integral of it is the area of PDF. I was thinking about the area of hemisphere, that's why it's misleading for me. Now, it make sense.
if PDF = const * cos(theta)
Area of PDF = const * PI = 1.0
then, const = 1.0/PI
The third book has been largely rewritten, and changes reside in branch dev-major
. I believe that the confusion here has been resolved in changes made, but I'll refer back to this when we do a final validation pass over book 3 on release (see #863)
Hi, Why does the sin using the same theta as cos? What's the physical meaning? I never seen any sphere area integral like. After alot google search, I didn't find this equation from anywhere.
@iaomw in #1537 you can find a brief explanation where the sine of theta came from.
Hi, Why does the sin using the same theta as cos? What's the physical meaning? I never seen any sphere area integral like. After alot google search, I didn't find this equation from anywhere.