Unexpected behaviour with SVF calculation

Hello all,

tl;dr Runtime for sky view factor calculation faster when scene.rad is added to oct

I am putting together some sky view factor calculations and ran into an unexpected comparison of run times. Background, I am using the helpful notes from this post: Any method to calculate sky view factor in Radiance?. Thanks @Compagnon_Raphael1!

So In running the most basic formulation of SVF calculation on my 5761 points without a scene file, the runtime is about 4 seconds…
oconv uni.rad > uni_no_scene.oct
cat points | rtrace -h -ab 1 -I uni_no_scene.oct | rcalc -e 'SVF=$1;$1=SVF;' > result_no_scene.txt

THEN, when I add my scene file into it the runtime drops down to less than a second…
oconv uni.rad scene.rad > uni_with_scene.oct
cat points | rtrace -h -ab 1 -I uni_with_scene.oct | rcalc -e 'SVF=$1;$1=SVF;' > result_with_scene.txt

The scene and the points are not necessarily near each other. I am just testing something out while I wait for a sensor point file to be written. Any thoughts on if this is a genuine speed up due to some behaviour with the oct or am I missing an error? The scene file contains three pieces of geometry. Each has different materials: 2 plastic and 1 glass. This brings me to my second question. Will the transparency of the glass be taken into account for this SVF calculation?

Thanks for any help out there!

Depending on how the sky is defined, it’s possible that evaluating sky points is more expensive than evaluating on-geometry points, but it really depends on the point positions, the geometry, and the sky definition. You need to share those files for anyone to tell you.

Regarding glass panes, they will affect the SVF results.

Best,
-Greg

1 Like

Thanks @Greg_Ward.

The files for any curious eyes:
https://drive.google.com/drive/folders/1yex6-i1zHklkHonzWcbEVxyUbv4CUB9A?usp=share_link

I think I’ve figured it out. Without the scene objects, you have no size to your octree and this disables the ambient cache. That is why the scene with objects is a faster calculation – adding the surfaces gives the scene a size, and the ambient cache works as normal. Since it’s not really usual to compute an array of points in a geometry-free scene since they all come out the same, I don’t really count this as a “bug.”

Cheers,
-Greg

1 Like

Thank you for the clarity and explanation @Greg_Ward!