Rcontrib can calculate the contributions of multiple sources at once. However, since the contribution of each light source requires the calculation of every ray’s contribution, employing the irradiance cache becomes impractical as it is impossible to store the contribution of each individual ray. However, is it possible to place a single light source in the scene at a time and repeat this process to calculate the contribution of each light source? This approach would allow calculating the contributions without disabling the irradiance cache. Additionally, utilizing multithread technology can accelerate the repeated calculations. I haven’t compared this method to the implementation in rcontrib, so I’m unsure which approach is faster. I’m asking this question to confirm the feasibility of my thoughts.
It’s possible. You could do this with regular rtrace or rpict commands. However, I would be surprised if that were faster than rcontrib, unless you have a number of cores equal to the number of light sources, and even then it is inefficient in terms of power usage. Furthermore, if you are summing the results of different simulations using irradiance caching, then you must contend with the fact that each simulation will cache a different set of points. That is not necessarily a problem, but it could lead to some rendering artifacts if you are trying to produce an image.
I used that method to calculate the sun coefficient (direct sunlight contribution in the five-phase method) and found it to be much faster than rcontrib. However, this conclusion may only be applicable to this specific condition. The computation time is shown as below:
Computation time (hours)
A Laptop with an eight-core/16-thread CPU (AMD Radeon, eight physical cores and 16 virtual cores, 3.2 MHz), 24G RAM (8G Samsung and16G Kingston), and 1T SSD hard disk
RADIANCE 5.4a 2022-05-28 LBNL (5.4.5ebb4a4559)
Windows Subsystem Linux (Ubuntu 20.04 LTS)
Only the sun coefficient method part is different with the 5-PM (rconbtrib).
Test model (specular blinds)
Test model (PDRF)
I will continue testing the daylight coefficient in the two-phase method for both methods and see which one is faster.
Hi “1112” (?),
the sequential calculation of daylight coefficientis is e.g. implemented in esp-r. However I doubt that it is a feasible option for image-based simulation. The 3.97 seconds for the direct sunlight calculation with rpict and mkillum look amazing - but is this really 145 runs of mkillum and 145 runs of rpict, and do you delete the ambient cache every time before proceeding to the next patch?
I am sorry, Lars. The unit of the computation time is hour. The calculation is only for the sun-coefficient calculation. The sun pathes are 5185 (MF:6), and the amient cache was deleted every time. Actually, the file name of ambient cache is unique for each patch.