ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

shuffling frames and controlling rate

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Clayton Fordshuffling frames and controlling rate
by on Nov 12, 2014 at 7:06:34 pm

I'm trying to figure out a way to perfectly shuffle my frames together and possibly control the amount of shuffled frames from two different videos. For example, take n1 frames from the first video and n2 frames from the second video and order them sequentially in a new layer. Can this be done with a script or an expression?

Thanks


Return to posts index

Walter SoykaRe: shuffling frames and controlling rate
by on Nov 12, 2014 at 7:57:37 pm

Sure, this is doable via expressions.

How do you want it to work? Like this?

Given two layers, A and B, do you want to see all frames from each as follows (assuming n1 for A is 2 and n2 for B is 3):

A1 A2 B1 B2 B3 A3 A4 B4 B5 B6

Or do you want to see cuts as follows:

A1 A2 B3 B4 B5 A6 A7 B8 B9 B10

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Clayton FordRe: shuffling frames and controlling rate
by on Nov 12, 2014 at 8:21:30 pm

Well, I supposed I'd like to know both ways for future projects, but for my current purpose I need to keep the overall clip time and switch between the two as in the second method you have outlined: A1 A2 B3 B4 B5 A6 A7 B8 B9 B10.

Thank you


Return to posts index


Walter SoykaRe: shuffling frames and controlling rate
by on Nov 13, 2014 at 12:21:45 pm

[Clayton Ford] " I supposed I'd like to know both ways for future projects"

They require totally different approaches. For the first way, you'd have to use opacity (to hide the top layer when it's not supposed to show) plus time-remapping (to show the "skipped" frames, not just the current frame).



[Clayton Ford] "for my current purpose I need to keep the overall clip time and switch between the two as in the second method you have outlined: A1 A2 B3 B4 B5 A6 A7 B8 B9 B10"

Put two clips in a comp. The top clip is A, the bottom clip is B. Alt+click the opacity stopwatch for the A layer and enter the following expression:

// how many frames of the "A" layer should we show before switching to "B"
n1 = 2;

// how many frames of the "B" layer should we should before switching to "A"
n2 = 3;

// total number of frames in a cycle
n = n1 + n2;

// get the current time in frames and use the modulus operator ("clock arithmetic") to get
// the time in the cycle (between 0 and n frames)
t = timeToFrames();
cycleTime = t % n;

// show the "A" layer for the first n1 frames of the cycle
if (cycleTime < n1) 100 else 0;


If you have audio, you'll have to adapt this to mute layers when they are inactive.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Clayton FordRe: shuffling frames and controlling rate
by on Nov 13, 2014 at 7:19:39 pm

Very cool! I see how this works.. I'll play with it a little to get exactly what I want.

Thank you


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]