transforms

Back to All Results

Motion Vectorization

Input video: transforms

Output SVG motion program code

Output SVG motion program

Motion Program Transformation

Spatial Motion Adjustment

Anticipation and follow-through

Input SVG motion program

MPTransformer(P, args):
  // OBJECT SELECTOR: Select all shapes visible in the 'MOVE' portion.
  // is_visible(visibility, t_lo, t_hi) is a function that checks if an object is visible 
  // at some point in a specified frame range [t_lo, t_hi].
  selObjs = objSelector(P, propQuery, "visible", is_visible, [0, 93])
  // OBJECT TRANSFORMER: Add anticipation and follow-through
  // to selObjs with amplitude=15 and sigma=3.
  // Because this animation has significant changes in both position
  // and scale, anticipation and follow through will be most visible
  // in those transformations.
  anticipateFollowThruObjTransformer(selObjs, [0, 93], 15, 3)

  // Repeat to objects in 'SKEW' portion.
  selObjs = objSelector(P, propQuery, "visible", is_visible, [94, 159])
  anticipateFollowThruObjTransformer(selObjs, [94, 159], 15, 3)

  // Repeat to objects in 'ROTATE' portion.
  selObjs = objSelector(P, propQuery, "visible", is_visible, [160, 248])
  anticipateFollowThruObjTransformer(selObjs, [160, 248], 15, 3)

  // Repeat to objects in 'BREAK' portion.
  selObjs = objSelector(P, propQuery, "visible", is_visible, [249, 285])
  anticipateFollowThruObjTransformer(selObjs, [249, 285], 15, 3)

  // Repeat to objects in 'CONDENSE' portion.
  selObjs = objSelector(P, propQuery, "visible", is_visible, [286, P.endFrm])
  anticipateFollowThruObjTransformer(selObjs, [286, P.endFrm], 15, 3)

Motion program transformer code. Here we add anticipation and follow-through to the letters with anticipateFollowThruObjTransformer. Because the letters have significant changes in both position and scale, the effects will be most visible in those transformations.

Output SVG motion program