Understanding raytracing algorithm for daylight studies

Dear Radiance Community,

I’m trying to gain a deeper understanding of how indoor daylight studies are carried out. Assuming there are no optimizations such as irradiance caching, would the following be true?

1. With perfect, mirror-like specularity, we could simply consider energy losses due to reflectance to arrive at the final result:

2. For 100% diffuse materials with no specularity, we need to cast secondary rays to understand the radiance values at the intersection point

3. We need to repeat this step for each ray as long as one of the 2 conditions are satisfied:

Now, how much radiance does each of these indirect rays have? Do each of them inherit 100% of the parent radiance, or is it divided by the amount of diffuse rays cast from a given intersection point? In the following example, would each of the blue rays carry 2.000 lx, or assuming 10 rays, would each of them carry 200 lx?

How is the illuminance at the sample point calculated? Is it a sum of values from all outgoing rays divided by the number of rays?

Is the amount of secondary rays cast from each intersection point always the same, or should it be gradually increased/decreases with each subsequent step? Are there any rules of thumb for what makes a ‘good’ amount of rays to begin with?

I’d appreciate if you could help me understand this process better!

Thanks,
Mariusz

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

That’s fantastic, thanks a lot @Greg_Ward!

For anyone who is interested, I found this lecture by Keenan Crane quite helpful in understanding the maths behind energy transfer in ray tracing:

I’ll keep digging deeper!