levers

Back to All Results

Motion Vectorization

Input video: levers

Output SVG motion program code

Output SVG motion program

Motion Program Transformation

Retiming

Retiming to music beats

Input SVG motion program

MPTransformer(P, args):
    // OBJECT SELECTOR: Query for all shapes with the "all" propType.
    // No matchCriteria is needed, hence an empty array [].
    selObjs = objSelector(P, propQuery, "all", [], [0, P.endFrm])

    // OBJECT TRANSFORMER: Retime periods of collisions in the video
    // to match with the music beats by specifying the event type
    // as "collisionFrames".
    retimeToBeatsObjTransformer(selObjs, "levitating.wav", 
                                "collisionFrames", [0, P.endFrm])

Motion program transformer code. Here we retime the shapes bouncing and rotating at different rates to all match the beats of the music by querying for collision frames, using retimeToBeatsObjTransformer.

Output SVG motion program