EDIT: You can even use the built-in "mip_motion_vector" Output shader,
(you have to manually install it first from "C:\Softimage\Softimage_XXXXXX\Application\phenolib\spdl\mibase\mip_motion_vector.spdl",
where XXXXXX is the version you use)
XSI:
*Make a new pass (name it something like "MotionVectors")
*In the Render Channels Output, use a file format with either 16-bit or float precision, with RGB channels (no alpha)
*Enable MotionBlur
*Disable "Apply Display Gamma Correction"
*Set the Scene MotionBlur to "Start on Frame", so that you can have motion blur from the 1st frame.
*Set the "Shutter" and "Delay" on all passes to 1
*on the motionvector pass, set the Aliasing Min/Max to 0
*Set the Sample Filter to Box, with Size 1
*Disable "Premultiply with Alpha"
*Set the "Color Channel Clipping" to "No Clip"
*Disable "Desaturate color when clipping"
*Make a material and connect it to "lm2DMV_v2" or "p_motion_to_rgb" with Mode set to "ReelSmart"
*Drag-n-drop the material onto the "Background_Objects_Partition" of the pass
*Choose a frame where objects move the most, enable MentalRay->Diagnostics->Information, and do a preview render.
Open the Script editor and somewhere there will be a "Max Displace" value,
use that as the "Normalize" value in the shader.
AE:
*For the MotionVector file sequence, this is VERY IMPORTANT,
from "Interpret Footage->Main->Color Management"
enable the "Preserve RGB".
otherwise AE will do some funky automatic color correction
and ReelSmart will motion blur everything, even static objects.
*Apply ReelSmart, and use the "Normalize" value of the shader as the "Max Displace" value. That's it!
NOTE: If you want the object's edges to motion blur you have to render it (in XSI) separately from static ones.
Reelsmart doesn't blur them if they are all together.
Hope it saves you of some headaches.
Cheers