Input video: hype1
Output SVG motion program code
Output SVG motion program
Input SVG motion program
MPTransformer(P, args):
// OBJECT SELECTOR: Get all the shapes. Since no matchCriteria is
// specified, pass in an empty array [].
selObjs = objSelector(P, propQuery, "all", [], [0, P.endFrame])
// OBJECT TRANSFORMER: Make copies of the objects and delay them.
for i in range(3):
copyObjs = {}
for obj in selObjs:
objCopy = copy(obj)
copyObjs.insert(objCopy)
changeAppearance(copyObj, “low_opacity.png”, [0, P.endFrame])
linearRetimeObjTransformer(copyObjs, 4 * (i + 1), [0, 1])
Motion program transformer code. Create a motion trail for the text by copying it and increasingly delaying the time for each set of copies by using linearRetimeObjTransformer.
Output SVG motion program
Input SVG motion program
MPTransformer(P, args):
// OBJECT SELECTOR: Get all the shapes. Since no matchCriteria is
// specified, pass in an empty array [].
selObjs = objSelector(P, propQuery, "all", [], [0, P.endFrame])
// OBJECT TRANSFORMER: Set the new rotation to the old y-values after
// frame 20. Before frame 20 linearly interpolate the rotation from 0 to
// the value at frame 20.
function rotateTex(t, [theta, y, N]):
if t < thresh:
return 3 * t * (t - N) * (y[N] - 0.5) / (N * P.endFrame)
else:
return (y[t] - 0.5) * 3 * (t - N) / P.endFrame
motionTextObjTransformer(selObjs, rotateTex, [0, P.endFrame])
// OBJECT TRANSFORMER: Fix z values from the beginning.
function fixZ(t, [z]):
return z[0]
for obj in selObjs:
adjGlobalMotion(obj, fixZ, [0, P.endFrame])
// OBJECT TRANSFORMER: Make copies of the objects which are (1) slightly
// larger, (2) shifts right and down, and (3) strictly behind.
for obj in selObjs:
objCopy = copy(obj)
function constantScale(t, [s]):
return s[t] * 1.1
function constantShift(t, [x, y])
return [x[t] + 0.025, y[t] + 0.025]
function lowerZ(t, [z]):
return z[t] - 0.1
adjGlobalMotion(obj, constantScale, [0, P.endFrame])
adjGlobalMotion(obj, constantShift, [0, P.endFrame])
adjLocalMotion(obj, lowerZ, [0, P.endFrame])
Motion program transformer code. This motion program transformer creates an interlocking 3D effect by duplicating objects and offsetting them with a local adjustment. We use motionTexObjTransformer to rotate the letters based on their y-positions.
Output SVG motion program