A couple of months ago I started playing with a script to allow G(eometry) Buffer information to be extracted from Blender. You can follow the old thread here (last page especially):
I’m afraid that I’ve not had the time to complete the script yet, but I thought that some of you may benefit if I made the predefind materials that it will use available. For the uninitiated, G Buffers are often used by compositing and image editing programs.
You can grab the .blend here:
Hope this is useful to someone. I’ll finish that script one day I promise