Lightcuts: week 9

UncleZeiv's picture

Textured area lights turned out hugely popular, so now it’s hard to live up to expectations I guess!
This week’s work was indeed far less exciting: I worked on supporting more material features, as so far only lambertian diffuse and phong specular where supported. Now, all diffuse shaders are supported.
Every single shader must be specifically supported as we need to be able to answer this question: what’s the maximum value that a specific pixel, shaded this way, may assume over a bounding box of point lights? You don’t really need the exact maximum value, so a ridiculously large number would always be a “viable” answer. On the other hand, you want the bounding value to be as tight as possible, because if the error turns out to be very low, you may decide to skip all the lights further down in the light tree, thus saving rendering time.
I also added support for all falloff types (except custom curve falloffs). The default falloff type for Blender lamps is “inverse linear”, while only “inverse square” was supported so far: this could lead to very incorrect renderings, especially when testing existing scenes.
Now, for instance, this hangar scene (featuring a lot of dupliverted “inverse linear” point lights plus a couple of additional area lights) looks a bit better:
 233.08 (6.07%)Tree creation time: 00:02.27 Number of (point) lights: 3841 (1476l + 0s + 2365o) Requested error rate: 0.020 Average cut size: 239.44 Shadow rays: 233.08 (6.07%)
Hangar (False colour)Hangar (False colour)
(Thanks Gillan for pointing me to this model).
◊ ◊ ◊
On the textured area light side, Italian Blenderhead Lusque has performed an interesting experiment. If you bake direct lighting coming from a light source (e.g. an area light) onto the walls of a Cornell-like box, and then you use the baked textures as textured area lights, you basically have a simple indirect lighting pass.
Here you can see a test, where the indirect lighting has been exaggerated on purpose:

I’ll post Lusque’s blend file here as soon as we sort the remaining issues out.
(Please note that this is just an experiment and that it has nothing to do with the “Instant Radiosity” scheme I would like to implement; I am also perfectly aware that it has limited applicability, but it’s still very clever in my opinion).

Organization: Blender Foundation Original: Source