Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using an expression, how do I add a frame counter to a comp?

  • Using an expression, how do I add a frame counter to a comp?

    Posted by Thomas Rydberg on May 19, 2005 at 1:31 pm

    I’m a total newbie when it comes to using expressions.

    For review purposes, I need to be able to display a frame counter on my rendered comp when it plays.

    What expression can I use for this? How do I get it to appear on my comp?

    Thank you,

    – Tom

    Thomas Rydberg replied 21 years, 2 months ago 4 Members · 5 Replies
  • 5 Replies
  • Sam Young

    May 19, 2005 at 1:41 pm

    why not just use the Timecode effect instead?

  • Lars Bunch

    May 19, 2005 at 2:08 pm

    Hi,

    The timecode effect is probably the best way to do a “window burn” but a simple expression to place a frame counter on the window would be this:

    Using the TEXT tool, put a “1” where you want your counter to be in the frame. Actually it can be any character, but 1 is sort of intuitive.

    Twirl down the text’s options in the time line and then twirl down “text” Option click on the clock to create an expression for Sourcetext. add the following expression…

    text.sourceText = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

    You don’t actually have to type all this in. Just add an = sign just after “text.sourceText” and then click on the arrow next to the pickwhip for that expression.

    Select Global>timeToframes( etc…) You may need to add a ; after the expression.

    Click outside the expression box to make the expression active and you should have a simple counter.

    What is nice here is you can make it any size you care to by changing the text atributes and you can move it to any location etc.

    Hope this helps,

    Lars

  • Thomas Rydberg

    May 19, 2005 at 2:42 pm

    Thanks Lars and ugg, I’ll try both methods. I need to display the frame numbers without seconds, so if I’m using 30pfs, at 2 seconds, I need to display the value 60 as the frame number.

    I’ll play around with this later on today.

    Thanks again,

    – Tom

  • Dan Ebberts

    May 19, 2005 at 3:11 pm

    Or, you can just use the Numbers effect with the expression

    timeToFrames(time)

    entered for Value/Offset. You’ll probably also want to set Decimal Places to zero.

    Dan

  • Thomas Rydberg

    May 20, 2005 at 1:20 pm

    Yeah, I ended up using the numbers effect with the expression: time*30

    Very simple!

    Thanks everyone,

    – Tom

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy