Understanding raytracing algorithm for daylight studies

Hi Mariusz,

For the first mirror-like reflection, depending on the sun angle and geometry, you may end up with multiple images of the sun, all visible from your measurement point, and this will add to your result. Radiance can model this situation and compute all reflections using the “mirror” material type.

For the diffuse case, you can see the 1988 paper for a full description of the irradiance caching method:

In this method, the diffuse sampling rays each carry equal weight, which is pi/N for N samples. They must be distributed in a proper way for this to work, as described in the paper.

If you are doing a strict path tracing method, as happens when you set -aa 0 in Radiance, then rays carry a weight corresponding to their contribution to the final result, and this weight becomes less and less the deeper you go in the tree.

Semester-long courses have been developed to cover this topic, so it is difficult to condense into a single post. People were working on this for years in the 1980’s and 90’s, and I was just one of them. There is a wealth of material out there, and here is a SIGGRAPH course by some of the experts as a good place to start.

Best,
-Greg

2 Likes