Random sampling is no way to integrate the sun, even if we can account for any complex redirection to the interior with a BSDF.
In the latter case, all contributions are fed through the BSDF and resampled to create a luminous intensity distribution in a mkillum-specific polar coordinate system for treating the window as if it were a luminaire.
In the final mkillum stage, as we pass this light through our BSDF and redistribute the output into a luminous intensity table, we subtract source light that passes straight through the BSDF and continues in the same direction.
While the calculation of luminance distributions for CFS characterized with BSDF data is fairly efficient using mkillum, it still takes some time to sample the exterior environment, account for interreflections and so on, then considerably longer to render a final image using the computed secondary light sources.
This vector dot product is quick to evaluate, making the DC precomputation well worth the effort, but the standard approach must be altered substantially to handle BSDF data and operable systems.
BSDF patches that see only sky will get a contribution from a few sky patches, whereas BSDF patches that see other surfaces in the scene will receive an integration of many sky patches.
For a given sky condition, we could quickly compute the outgoing luminance on the window interior from a BSDF matrix.
Identifying the BSDF matrix as T, we can write our combined matrix formula for a single window group thus:
If we are computing 100 interior illuminances from a Tregenza sky subdivision with 146 patches (including ground), then the s vector will be 146x1, the D matrix will be 145x146, the T matrix using a full Klems BSDF basis will be 145x145, the V matrix will be 100x145, and the resultant i vector will be 100x1.
Once again, we have lost information for the slat shadows, but in this case, we have no convenient remedy as we are relying completely on the BSDF to transfer external radiation to the interior.
To ensure that the Window 6 BSDF data coordinate system was properly interpreted within Radiance, we ran a simple check to validate input and output directions by reproducing BSDF output using mkillum.
As described above, with the mkillum '1+' option, the specular component is determined from the BSDF data.