As you show, the solid angle is not the same for every Tregenza patch. This routine seems to introduce a slight bias towards smaller sky patches, though I don’t imagine the error amounts to much. Maybe @Jan_Wienold or @Wendelin_Sprenger would care to comment.
In my understanding working only with phi should lead to the fact that the maxium irradiance when raytracing for example a half sphere is at the wrong azimuth angle.
the answer to my question is that in gendaylit.c only the Normalization gets calculated therefore the azimuth_sun orientation doesnt matter. In perezlum.cal the luminance is calculated for every ray direction. In here the right angle is used.
But maybe the right angle and right surface area should be used for the Normalization in gendaylit too because even if the deviation may be small, the change is not complex.
However, I also dont understand why in perezlum.cal the skybrightness is not the perez-luminance (called intersky in perezlum.cal), but a weighted average value between intersky and ground brightness. Is the ground brightness not automatically taken into account, due to reflections during ray tracing.
Ah – this question I actually do know the answer to! The “wmean” interpolation is borrowed from skybright.cal to soften the edge between the sky and the ground. It has little to no effect well above and below the horizon, but at the horizon makes a smooth blend between the ground level and calculated sky intensity.
Without this smoothing function, the horizon is a sharp line, which can show up in certain simulation conditions and is extremely unnatural. It would have to be a perfectly clear day on the ocean for there to be such a sharp distinction between sky and ground (or water in this example).
Thanks for the answer @Greg_Ward . In the last few weeks I played a bit around with radiance and today I found something which I dont quite get. When using the following sky file:
This roughly 2% error could be introduced by the Perez sky model or the way it’s calculated, or it could be from the rtrace random sampling. I would try the following command instead:
Without the “-lw” setting, your number of “-ad” samples is curtailed to 10,000 rays with the default rtrace settings (which are available using “rtrace -defaults”).