This script renders an ambient occlusion pass with VRay from any scene, without changing anything. There is no need to prepare the scene in any way either.
Requires:
3dsmax 5.0 or higher.
Autodesk VIZ 5 or higher.
VRay 1.5 or higher.
Stay in touch and tough,
Moritz