Generate Motion Vectors

../_images/GenerateMotionVectors.png

Requirements

Input Streams: Mesh stream and Compress Mesh Data stream (REQUIRED)

Output Streams: Mesh metadata

Overview

The generate motion vectors stage computes the movement for each vertex from the end of one stabilized segment to the next. It does this by deforming the last frame of the previous segment with the first frame of the current segment, then computes the vertex deltas between those frames. This data is used in Unreal to compute TAA (temporal anti-aliasing) and motion blur.

Parameters

  • Closest Point Refinement This setting will use a shrink wrap operation to ensure the motion vectors are as accurate as possible. There is a small possibility that this can cause artifacts in the motion vectors, so if you are getting poor motion vector results you can try disabling this and re-running generate motion vectors.

Working with Generate Motion Vectors

Generate Motion Vectors must be run after the Compress Mesh Segments stage, and should generally be the last stage in your composition.

Once Generate Motion Vectors is finished you can view its results using the mesh metadata tool in the top left of the viewport.

../_images/mesh-metadata-tool.png

This will show you the last frame deformed to sit on top of the current frame. This data is only avaliable on the first frame of a segment. If the meta data looks like the below image, then you have good motion vectors. You are looking to have an even distribution of red and green. This indicates that the deformation was able to find a good match, and the motion vectors were generated.

../_images/MotionVectorMetaData.png

If instead you are seeing large islands of red or green then you may want to try running Generate Motion Vectors stage again with closest point refinement disabled.