Color Occlusion by Spherical Area Lights
January 19th, 2007 by Stefano Jannuzzo - Viewed 5776 times - Popularity: 16% [?]Yes, yet another occlusion technique.
The game is pretending no occlusion nor FG/GI tool is shipping with XSI, and do it with what is left, in particular area lights.
In the end, the result is less accurate than the standard ambient occlusion and FG, but, in some ways, more intuitive and flexible.
As we know, the standard techniques sample the hemisphere centered above the normal of a point.
The main idea is to provide ourselves the hemisphere through a large spherical area light surrounding the scene, or just the objects that must be occluded.
Any standard illumination node applied to the objects will sample the light all over the light virtual sphere, regardless of the light center.
Setting the light color to white and the shadow color to black, the light intensity hitting a point is actually the ratio of samples “seen” by the point and those hidden by other objects toward the sample location.
In other words, for a large enough light radius, ambient occlusion.
In order to get the pure light color, we apply a flat light node as the surface shader to the receiving objects, with diffuse set to white and ambient to black.
In these tests the light has 20×20 samples, with white color and intensity set to 2, just to average the fact that only half of the samples are visible from any opaque point.
This is the render, before any optimization.
The shadow is black, because the torus does not have any shadow shader on.
If we connect the checkerboard color as shadow shader, we magically have color occlusion, which can also be seen as a cheap (but very easy to tune) color bleeding.
A couple of advanced notes:
You may want to define your own brdf, in order to have the samples shading the surface.
Instead of having the illumination model attached to the objects, we do it at the light level.
For a standard lambertian model, you just need to take the direction to the current light sample, and dot-product it by the point normal, as shown here.
This may be enough, but we can also add some glossiness to the model, by using the dot product as input to a gradient node, so allowing us to weight the samples depending on their incoming direction.
This setting for instance will give more weight to the samples over the point, zero instead for those with a large angle about the normal.
Note that the sphere radius must be large, compared to the scene extent.
In fact, if an object is close to the sphere surface, the number of samples visible from the object is smaller, depending on the sphere cap defined by the current rendering point and its normal.
A further adjustment can be made to raise the light intensity as much as the cap area gets smaller.
The same technique may be used for other purposes, for instance for performing a basic image based lighting because the light color can be textured based on the sample position over the light sphere surface.
Popularity: 16% [?]









Hi,
I can’t seem to reproduce the effect above using a point light, but it works with an infinite light. Could u post just a simple readme type instructions? I’m using xsi6 foundation on linux.
TIA
Posted a scene here:
http://web.tiscali.it/stefanoj/HowTo/OccByAreaLight/OccByAreaLight.scn
Interesting technique
Ma quante ne sai ?!?!.
English translation:
But how much do you know ?!?!.
Fabio