ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to make a stopwatch that can be controlled

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dave Martin
How to make a stopwatch that can be controlled
on Oct 11, 2015 at 3:23:47 pm
Last Edited By Dave Martin on Oct 11, 2015 at 8:54:43 pm

Hi there,

Part 1.

I need to make an on-screen timer that I can start & stop by key-framing a null
- E.G. When the null is at x=0 the time is stopped but, if x>1 the timers runs.

However, Once stopped again I want the timer to stay at that time and then continue counting up when the null is moved again.

Part 2 (Not essential but would be nice)

I would like to be able to read the timer value and subtract that from another value.
I.E. The length of the comp

Thinking caps on guys, I have no idea where to start :)

Cheers


Return to posts index

Tudor "Ted" Jelescu
Re: How to make a stopwatch that can be controlled
on Oct 12, 2015 at 7:29:11 am

Create a continuous animation of the timer and any other elements that need to be connected with it, precomp and enable Time Remap on the layer. Now you can create keyframes where needed to "stop and start" the timer and stretch that one frame for however long you need the timer stopped.

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index

Dave Martin
Re: How to make a stopwatch that can be controlled
on Oct 12, 2015 at 6:37:51 pm

"Old skool" Like it. If there's no other way of doing it, I guess I have to!

Thanks.


Return to posts index


Walter Soyka
Re: How to make a stopwatch that can be controlled
on Oct 13, 2015 at 9:18:02 am

The old-school approach is nice here, because expressions live in the moment. Expressions are evaluated for a given point in time, and have no "memory" of what's happened earlier on the timeline.

This gets tricky to code, and slow to evaluate. In order to create a running stopwatch like this, the expression would have to include code to evaluate all frames before the current point in time.

In other words, frame 10 must include a loop that starts at frame 1, evaluates every frame through frame 9, then evaluates frame 10. Frame 11 must include a loop that starts at frame 1, evaluates every frame through frame 10, then evaluates frame 11. Frame 1000 must include a loop that starts at frame 1, evaluates every frame through frame 999, then evaluates frame 1000.

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

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