FORUMS: list search recent posts

Time Remapping: Loop with Ping-Pong but also progress forward

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Potvin
Time Remapping: Loop with Ping-Pong but also progress forward
on Feb 28, 2013 at 4:06:13 am

I'm looking to have a clip play to a specific pattern of 3 frames forward, 2 frames back, 3 forward, 2 back, etc. so that the net gain in frames forward is actually only 1 for every 5 frames. (You could also look at it this way: the footage plays normally for 1 frame, then ping-pongs for 4 frames [2 forward, 2 back]). My composition's framerate is 23.976.


Here's a chart to help you visualize what I'm trying to accomplish:

TIME (in frames)(1/23.976 seconds) > Frame # from original footage

0 > 0
1 > 1
2 > 2
3 > 3
4 > 2

5 > 1
6 > 2
7 > 3
8 > 4
9 > 3

10 > 2
11 > 3
12 > 4
13 > 5
14 > 4


I'd like to use an Expression to create this effect. The pattern follows a series of 5: a, b, c, d, c. Then 1 is added to all values, and the pattern repeats. So I created the following Expression:


timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false); //converts timecode to integer in frames

var a = 0;
var b = 1;
var c = 2;
var d = 3;
var s = 0; //s represents the # of the frame from the original footage
var g; //g will be the # of the frame from the original footage converted back to timecode format


if(t % 5 == 0) {
s = a;
}
if(t % 5 == 1) {
s = b;
}
if(t % 5 == 2) {
s = c;
}
if(t % 5 == 3) {
s = d;
}
if(t % 5 == 4) {
s = c;
}

timeToTimecode(g = s + thisComp.displayStartTime, timecodeBase = 23.976, isDuration = false); //converts s into timecode format
[g]; //states the value (in timecode format) of the original footage frame value

if(t % 5 == 4) {
a++; b++; c++; d++; //adds 1 to each variable once for every 5 frames
}



AE doesn't take issue with any of the syntax, but it's still not working. Where have I messed up?

Thanks in advance for any insight or reworking anyone can offer!


Return to posts index

Vishesh Arora
Re: Time Remapping: Loop with Ping-Pong but also progress forward
on Feb 28, 2013 at 8:52:19 am

David

Post this question to Adobe After Effects Expressions Forum. You would get your answer quickly there.

Vishesh Arora
3D and Motion Graphics Artist
Films Rajendra

Blog:
http://digieffects.wordpress.com

2011 3D Demo Reel:








Return to posts index

David Potvin
Re: Time Remapping: Loop with Ping-Pong but also progress forward
on Feb 28, 2013 at 5:57:23 pm

Thanks Vishesh!


Return to posts index


Vishesh Arora
Re: Time Remapping: Loop with Ping-Pong but also progress forward
on Feb 28, 2013 at 11:46:00 pm

Glad to help

Vishesh Arora
3D and Motion Graphics Artist
Films Rajendra

Blog:
http://digieffects.wordpress.com

2011 3D Demo Reel:








Return to posts index

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