Sanity Testing BSDFs

When simulating light transport with light-backwards raytracing, complex macro- or micro-geometry that obfuscates light sources -- especially a small, intense light source such as the sun -- generally cause the alrogithm to break down, leading to gross error.

In other words, when doing a lighting calculation, nasty bits at the window can cause the calculation program to take a shit.

In recent years, the Radiance lighting simulation system has been adapted to support lighting simulation of complex fenestration systems (a.k.a. nasty bits at the window), by way of the so-called Radiance Three Phase Method. At work, my co-workers and I are integrating this simulation method into OpenStudio, to allow designers and engineers to more accurately simulate the effects of thoughtful daylighting design.

We do this by using genBSDF to make some general bidirectional scattering distribution functions (BSDFs) to describe the effect of a few different window systems:

Basically, in our case, the BSDF describes to the simulation what a given hole in the wall does to the light hitting it.

In the case of clear glass, it's pretty simple. First off, some of the light is reflected (bounces off), some is absorbed into the glass, and the rest goes right through (this bit gets bent a little bit, but gets bent back again as it exits the pane).

In the other cases, you either have a rough surface or translucent material, or some other geometry (slats of a venetian blind, for example) that do more things to the light than simply allow it to pass straight through, and this is where things get shitty for a light-backwards ray tracer like Radiance.

But by moving the ray tracing origin from the point of interest to the window, we can trace rays through those nasty bits and have a better view of the light sources on the other side (like the sun and the sky); this is what genBSDF does. You end up with an XML file that describes, for a bunch of incoming angles, what happens to light. That's really all it is.

This is a rough draft, but might be useful even in its current state. Note the program also adds some "impostor geometry" to represent wall thickness, since OpenStudio does not automatically support thick walls in its model paradigm. This is a major hack, because the effect of the wall thickness is essentially baked into the BSDF, and since the BSDF is unitized for a 1M square glazing unit, the effect of the wall thickness geometry diminishes as you apply the BSDF to ever larger windows. Feel free to edit the script to suit your particular needs.

Getting to the title of the post, here are some renderings of the generated BSDFs, applied to a simple window in a simple room, so you can see (sanity test!) the distribution and -- via the falsecolor mapping -- the intensity of the light after it passes from outside, through the window (and whatever bits are in there (blinds, light redirecting louver, or sandblasted surface), and into the space:

Some notable things to, uh, note, are:

The renderings are all normalized so it's impossible to compare relative intensities, just the distribution

The falsecolor scales are all the same, so here you can compare the relative intensities.

The venetian blinds were set to block all direct sun, so all you get is a splash of light bounced up onto the ceiling.

The Lightlouver does an awesome job of taking all that direct sun and flinging it up onto the ceiling (most ends up onthe wall in this test model since it's such a shallow space)

The direct sun patch in the clear glass model is very obviously distorted; this is the result of the direct solar radiation being spread out across three patches of the sky, instead of being concentrated in a tiny disc that subtends half a degree in the sky; this is just the way it's done with the Three Phase Method (and why the Five Phase Method was developed).