Custom Motion Vector AOV with Motion Vector shader

Another way to create a motion vector pass is to use a custom AOV and assign an Ai Motion Vector shader to the default 'Shader' attribute.

Info: More information about motion vectors is available here.

The scene file can be downloaded here.

Do not name the Custom AOV 'motionvector' as it may cause conflicts with the built-in 'motionvector' AOV.

Ai Motion Vector shader. Encode_raw_vector enabled.

aiAOV_mblur

Compositing the Motion Vector

The final output should look like the image below left. It looks pretty close when compared to the same scene rendered with true motion blur. There are, however, subtle differences. This is due to the limitations of rendering out 2d motion vectors.