A tutorial that shows how to use the motion_vector shader can be found here.

A video tutorial about how to create a custom motion vector AOV can be found here.

Raw

Time 0

Time 1

Max Displace