1. Render your scene without motion blur. Recommended to use float point image format (for example exr or tif).
2. Enable 'Motion Blur' in Render Settings
3(mental ray 3.4, Maya 7).
Set following attributes:
- Shutter = 1
- Shutter Delay = 1
- Custom Motion Offset = On
- Motion Back Offset = 1
3(mental ray 3.5, Maya 8 and 8.5).
Set following attributes:
- Shutter Open = 1
- Shutter Close = 1
- Custom Motion Offset = On
- Motion Back Offset = 1
4. Set frame buffer type to any that support float point data, for example 3x32 (float) or 3x16 (half). You may use format without alpha channel, we need only RGB.
5. Select appropriate image format, for example 'tif' or 'exr'.
6. Assign p_motion_to_rgb shader to all objects and select 'Raster Space' mode in it.
7. Render...
Using Nuke Vector Blur
Open your image and motion vectors in Nuke and create network like this: