Fast Occlusion scripts

Fast AO A: 3.8 seconds
Fast AO B: 4.4 seconds
a good Friend, Gespertino, had the idea to use four spot lamps (only shadow) in the camera position, to generate a fast AO effect, from the view point of the camera.

These two scripts were created for making a fast and simple set of spotlights with buffered shadows in the camera position that create a sort of ambient occlussion effect, with fast render times.
With this method you only have to light your image with a simple setup (for instance a key light and a hemi) and then just run the script.

They use almost the same principle that the well know “light dome” technique (que icosphere with dupliverted spots facing the center of the sphere) but using only four spots for faster render.

This is how to use the scripts.

1- Select the camera

2- Go to “scripts - Misc” and you will find two scripts (of course you need to copy them first to the scripts folder in the blender folder, as a regular script)

3- The script will automatically locate four lamps (shadow only) wich create an effect roughly similar to the oclussion shadows of AO, taking account of the camera position

The script Fast_OcclussionB is a little variation of the first script, adds one additional spot lamp on the top of the array and another spot in the camera position, to improve the results.


  • Created Lamps only affect the objects located in their same LAYER

  • All the set moves when moving or rotate the camera, so you can easily relocate the camera without having to re-run the script or relocate the spots.

  • Spots track the position of an Empty (Empty_Focus) located in the center of the scene, according to the viewpoint of the camera. This Empty can be moved with local coordinates to move this away or near to the camera.

  • There is another Empty (Empty_Lamps) in the camera position, if scale this, we can scale the position of the 4 spots. This allows to control the coverage of the effect.

  • You can vary the energy and other properties of spots to change the results.

  • When modifying the properties and values of any of the four spots of the basic array the rest of the spots are adjusted automatically to the same values. (notice that only aplies to the 4 spots of the basic array and not to the other spots added by Fast_OcclussionB)

  • In the Outliner you will find all the set within the selected camera.
You can change the energy and others properties of spots to change the results.

The script turned out great!
Cheers, Alex! :slight_smile:

nice, very very nice, love the quick render speeds