# Lambertian surfaces and Monte-Carlo

+ 1 like - 0 dislike
1359 views

I'm writing a ray tracer (actually to learn rust).
During this project I'm learning a lot about optics/physics.

Here is a problem for which I have no nice solution:

Take a plane surface and assume it reflects lambertian ("diffuse", AOI independent).
Question: What is the probability distribution function (psd) of the reflected light? How does it integrate?

Example:

Assume that the surface is the x-y-plane and that light incidences from above.
Then light is reflected by the cosine-law, and hence the scattered intensity is given by cos(theta)*sin(theta) (where the cosine is the lambertian reflectance and the sin is due to spherical coordinates).
So a reflected ray is generate as follows:
phi is uniform distributed between 0 and 2pi.
theta is given by asin(sqrt(a)), where a is a uniform random number between 0 and 1
(integrate to get the cfd (cumulative distribution function), then invert)

If I try to do the same thing for an inclined surface - even for easy examples like with normal (1/sqrt(2),0,1/sqrt(2)) - then I fail at integrating the psd to get the cfd.
The psd is given by the inner product between a sample ray and the surface normal (set to 0 if it's negative - the plane reflects only to one side) - of course multiplied with sin(theta) (to correct for spherical coordinates.

+ 1 like - 0 dislike

Here are some pointers to formulas used for diffuse ray tracing:

C.M. Goral et al., Modeling the interaction of light between diffuse surfaces, ACM SIGGRAPH Computer Graphics 18 (1984). http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S10/papers/goral.pdf

G.J. Ward, F.M. Rubinstein, and R.D. Clear. "A ray tracing solution for diffuse interreflection." ACM SIGGRAPH Computer Graphics 22 (1988):,85-92. https://eetd.lbl.gov/sites/all/files/publications/22789.pdf

T. Whitted, An improved illumination model for shaded display, ACM Siggraph 2005 Courses. ACM, 2005. https://www.cs.drexel.edu/~david/Classes/CS586/Papers/p343-whitted.pdf

X.D. He, et al., A comprehensive physical model for light reflection, ACM SIGGRAPH computer graphics 22 (1991). https://hal.archives-ouvertes.fr/file/index/docid/510144/filename/HTSG91.pdf

answered Dec 10, 2016 by (15,488 points)

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysi$\varnothing$sOverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.