motion vector for fluids in Maya / Mental Ray

a while ago, i did some tests for calculating motion vector from maya fluids and override the fluids color to render a motion vector pass in mental ray. i wrote python script and it work very well but the motion vector math in python took 15-40 minutes pre re.  on positiv side it works with all kind of renderer, even the old school hardware render buffer.

Th result itself was good, it Fluids looking much better in motion,  when they are motion blurred.