I used the enhanced two-phase method to calculate vertical illuminance and found that some results were biased compared with the HDR-derived values rendered using rpict. At first, I assumed that this discrepancy was caused by the approximate sun positions used in the sun-coefficient method, so I replaced them with the exact sun positions in the direct calculation. However, the biased values still remained.
After further investigation, I found that the main reason was that the direct solar contribution was not captured at certain time steps. For example, at time step 7813, the solar disk was partially blocked by the blinds. If only the center of the sun was sampled, the solar contribution became zero. I tried reducing -ds to 1e-10 to force finer subdivision of the light source, but this did not solve the problem.
I then found that when -dj was set to a larger value, the contribution could sometimes be captured after repeatedly executing the ray tracing. This is because the increased jitter raises the probability that some rays will hit the solar source. Finally, I decided to run the ray tracing 10,000 times and compute the averaged value using -c 10000. With this approach, the results matched the HDR-derived values very well, but the computation time increased significantly.
One possible acceleration strategy may be to repeat only the direct calculation with -ab 0, and then add the averaged direct contribution to the difference between the single-sample results obtained with -ab 1 and -ab 0. My question is: is this treatment reasonable, or is there a more efficient and direct way to obtain accurate results in this situation?
My command:
gendaymtx -u -of -D suns.rad -M suns.mode -m 1 weather/shanghai.wea > shanghai.smx
awk ‘NR==1{for(i=0;i<10000;i++) print}’ views/v1.pts | rcontrib -n 16 -I+ -c 10000 -y 1 -dj 1 -dt 0 -V+ -ab 1 -lw 0.0005 -M suns.mod modelb.oct > sunm_avg.mtx
