Tracking a Mask

You can track a mask in your scene from the GMask object's Tracking tab. You can track the mask vertices in the Tracker, and track splines using the GMask object's own planar tracker.

Tracking Mask Vertices

To track mask vertices:

  1. From the Action GMask menu's Tracking tab, select the media to be tracked from the Use Media field (to track the Back media, select 0).
  2. In the image window, select the vertices you want to track.
  3. Select a tracking mode:

    Two types of vertex tracking are available:

    • Each Vertex: Trackers are available for each selected vertex of the GMask.
    • Cluster: Tracker1 represents the selected vertices, and Tracker2 represents rotation and scale (if selected).

    If you select Cluster, enable Rotation, Scale or both, as needed.

  4. Adjust any other Tracking Settings, as needed.
  5. Click Enter Tracker.

    The Tracker menu is displayed.

  6. In the Tracker menu, enable Context to use the Action scene as the reference.
  7. Gang the trackers.
  8. Enable Auto Update Reference.
  9. Click Analyze to generate the tracking data.
    Note: You can fine-tune the tracking data if necessary. See Tracking Difficult Shots and Correcting Errors.
  10. After the analysis is complete, click Return.

    The GMask menu in Action reappears. The tracking data is automatically applied to the GMask media.

  11. Enable Edit Track in the GMask Vertices menu to edit tracking data directly from the image window without having to switch to the Animation channel. The vertices are displayed in blue when Edit Track is enabled.
    Tip: If you want to add new vertices to your tracked GMask, make sure to enable Edit Track before selecting Add Points, so that the new points also follow the tracking data.

Planar Tracking

Planar tracking in Action uses tracking algorithms along with combinations of settings to perform the track. Results can vary depending on the footage, as well as settings applied. See Getting Better Results with the Planar Tracker.

To apply planar tracking to a mask:

  1. Select the mask you want to track.
  2. In the GMask menu's Tracking tab, set the Use Media field to assign the back or front/matte media (select 0 if you want to track the Back media).
  3. Adjust any Tracking Settings, as needed (such as Rotation and Scale).
  4. Select an option from the Direction box to determine if the frames before or after the current frame will be used for analysis.
    Tip: When tracking a shape that cuts off during analysis (for example, a person walking into or out of the frame), begin shape tracking when the whole shape is apparent, and track in the direction of the frames at which the shape begins to disappear.
  5. Set any Analysis Constraints, if needed.
  6. Click the Analyze button to perform the planar tracking analysis.
  7. To perform additional analysis in a different direction from the first frame of the analysis, toggle the Direction box and click Analyze again.
Tip: The tracking data is stored as keyframes in the track_shape channel of the Channel Editor. You also have access to a shape channel that you can use to fine tune or add additional deformation to the existing tracking animation, without affecting the tracking keyframes. The shape channel also holds any keyframe user data prior to the tracking, so if you reset your track_shape channel, you can recover your state before the tracking had been performed.

Motion Warp

Motion Vector-based tracking, or more precisely, Motion Vector-based warping, is available when a Motion Vectors map is parented to the GMask. In this case, it is not the GMask's vertices that are tracking, but rather its result that is being warped by the motion.

To use motion to warp a mask:

  1. Select the mask to track.
  2. Right-click the node and select Add Motion Vectors Map.
  3. Right-click the Motion Vectors map, and Assign Media > Media to use.

    The media you select is the media that is analysed to create the warping. This is typically the media that is parented to the mask using a GMask-link.

  4. Double-click the mask to display its menu.
  5. Display the Trackingtab, and set the Mode to Motion Warp.
  6. Using the timebar, go to a frame to use for reference, and position the vertices needed.
  7. In the GMask's Tracking menu, click Add.

    This creates a snapshot of the mask, snapping it to the underlying UV of the Motion Vector map. As you go forward and backward on the timebar, the mask warps (not the GMask's vertices) to conform to the movement of the UV.

  8. Optional: If the mask drifts, add more reference frames using Add; Action interpolates between different reference frames.
Tip: The tracking data is stored as keyframes in the frames channel of the Channel Editor, in the GMask's motion_warp group.