ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Using Comp's timecode for Time-Remap keyframe to freeze the frame at current time.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David O'Dwyer
Using Comp's timecode for Time-Remap keyframe to freeze the frame at current time.
on Sep 18, 2017 at 2:14:34 pm
Last Edited By David O'Dwyer on Sep 23, 2017 at 1:57:33 pm

EDIT: I've thought of a better way to do this if anyone might be able to help out... Essentially what I'm after is a way to use the Comp's timecode to feed a keyframe on a time-remapped layer. So if the keyframe is on 00:01:23 of the Comp's timeline, that keyframe value on the Time-Remapped layer will become 00:01:23 and hold on that as a freeze frame. Then if 10 frames down the line on that layer there's another keyframe, that keyframe would jump from 00:01:23 to 00:02:09 (on a 24p timeline) and again hold on that frame as a freeze frame until that layer ends.

Does anyone have any ideas of ways to use the Comp's time to dictate the exact time of a freeze frame?

Many thanks!

Original Request:

Hi all,
I've been a ghost here for many years and have always found the answers to my questions being asked by someone else, so much appreciated!
I decided to sign up as I have a dilemma I can not for the life of me figure out a way around, and I'd really appreciate some help from you geniuses.
So here's some context: I'm working on a glitch template based on one of the tutorials I made on YouTube, as there's been some demand for something users can just drop into a comp and plug and play with. The glitch template has a section called "freeze frames" where the source footage is duplicated, and part of that frame is masked off. Then, using Time Remapping, that duplicated layer freezes on a keyframe at time A, for say 5 frames, and then another keyframe at time B for 2 frames, before the layer ends and the freeze frame disappears. The result is that the original video is playing, then there's a section of the frame that freezes while the background video continues to play, then just before the freeze frame ends, it skips to a different frame in the video, then the FF layer ends and background plays on.

Now it's fine for me to set the in and out of that layer, then manually copy the TC of the comp and insert it into that remap keyframe's TC, and do the same for the second keyframe with a different TC, but it's meant to be easy plug and play so expecting users to have to copy paste timecodes etc isn't great. So what I was wondering is if there's an elegant solution whereby the first keyframe of that layer will reflect the current TC of the Comp, no matter where it gets dragged to, so the frame freezes on that image and the second keyframe of the Comp could reflect the current timecode, so the image would jump ahead and hold for another few frames before that layer ends. That way all a user would need to do is drag the layer segment along the timeline and the time remap keyframes would update accordingly. There are only ever 2 keyframes per layer.

Sorry this isn't the best way of explaining it! You can see the effect I'm talking of in my video here from 00:44 during that glitching segment:





I don't know if this is possible, but I would sure appreciate the help! (or suggestions for better ways to achieve the same look without the complication!)

Cheers,
David


Return to posts index

David O'Dwyer
Re: Using Comp's timecode for Time-Remap keyframe to freeze the frame at current time.
on Sep 23, 2017 at 1:58:00 pm

Anyone?


Return to posts index

Dan Ebberts
Re: Using Comp's timecode for Time-Remap keyframe to freeze the frame at current time.
on Sep 23, 2017 at 5:00:04 pm

Like this maybe?


n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (time < key(n).time) n--;
}
if (n > 0) key(n).time else value



Dan



Return to posts index


David O'Dwyer
Re: Using Comp's timecode for Time-Remap keyframe to freeze the frame at current time.
on Sep 25, 2017 at 7:45:34 am

It's perfect! Thank you so much Dan!! I'm trying to understand the math but it's so beyond me. Just glad it works! 😅
Now I can drag the freeze frame section anywhere in the comp and it will act above that section.
If you're ever in Oxford, I'm buying you a steak!

Cheers,
David


Return to posts index

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