How do I bake a Bent Normal Map in Blender
I managed to write an Open Shading Language script that provides an ambient amount output (AO) and a direction vector from which the most ambient light came from. This can be used to create the bent normal map.

To use it, switch render engine to Cycles and enable the Open Shading Language checkbox.

For the object from which you want to bake the Bent Normals add a material if there isn't one yet. In the Material Node Editor add a Script Node and select this script:
AmbientOcclusionDirection.osl

Make sure the input Normal node is connected to the Normal from a Geometry input node. And the output NonOccludedDirection node to the Normal node of the shader.



Then bake as you would bake a normal normal map :-)

To check if the Distance and Samples settings are reasonable before baking, connect the AmbientOutput to the color and make sure the AO gradient is nice.