VectorGenerator allows you to produce images containing motion vector fields. A vector field for an image in a sequence has the same dimensions as the image, but contains an (x,y) offset per pixel. These offsets show how to warp a neighboring image onto the current image. Clearly, as most of the images in a sequence have two neighbors, each can have two vector fields:
1. | The backward vector field: the x and y offsets per pixel that, when applied to the previous frame in the sequence, allow you to reconstruct an approximation to the current frame. |
2. | The forward vector field: the x and y offsets needed to transform the next frame into an approximation to the current one. |
The output from VectorGenerator is stored in the vector channels. The images below show the different vector images for a clip.
|
|
The source sequence. | Forward and backward motion vectors for the sequence. |
|
|
Forward motion vectors. | Backward motion vectors. |
When viewing 'forward' or 'backward' motion vectors, the Viewer represents the x values as amounts of red and y values as amounts of green. Motion vectors can be positive or negative, where zero represents no motion.
In general, once you have generated a sequence of motion vector fields that describe the motion in a particular clip well, they are suitable for use in any nodes which can take vector inputs. These include Kronos and MotionBlur. If you are going to be using more than one of these effects in your project, it might be worth generating the vector fields beforehand with VectorGenerator, so that they can be reused.
|