Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Possible to offset Expressions based on frames?

  • Possible to offset Expressions based on frames?

    Posted by Roger Averdahl on October 9, 2006 at 6:59 pm

    Hi! 🙂

    I am working with PAL Compositions (25fps) in AE7 and wonder if it is possible to offset Expressions based on frames instead of time?

    Example:
    Layer 1 change its Opacity from 0 > 100 at frame 10
    Layer 2’s opacity is driven with an Expression that has been pick whipped to Layer 1’s Opacity

    So now Layer 1 and 2 changes its Opacity at the same time, frame 10, as expected.

    But, if i want Layer 2 to change its Opacity from 0 > 100 at frame 11 i use the following Expression on Layer 2’s Opacity:
    thisComp.layer(“footage.psd”).transform.opacity.valueAtTime(time – .04)

    My cuestion is if there is possible to use frames instead of time, ie 1 instead of .04?

    AFAIK, Expressions never work on frame basis, only on time basis but wanted to ask here for an answer! 🙂

    /Roger

    Premiere Pro User Group Sweden – http://www.pproug.se

    Roger Averdahl replied 19 years, 7 months ago 3 Members · 6 Replies
  • 6 Replies
  • Mylenium

    October 9, 2006 at 7:05 pm

    Sure, use thisComp.layer(“footage.psd”).transform.opacity.valueAtTime(framesToTime(1)) for instance. AE will do all the rest of the math itself.

    Mylenium

    [Pour Myl

  • Roger Averdahl

    October 9, 2006 at 8:10 pm

    Mylenium, if i use that Expression and paste it to Layer 2 its Opacity changes 0 and stays there forever.

    Do you have any clues to what i have done wrong?

    /Roger

    Premiere Pro User Group Sweden – http://www.pproug.se

  • Roland R. kahlenberg

    October 10, 2006 at 6:05 am

    [Averdahl] “My cuestion is if there is possible to use frames instead of time, ie 1 instead of .04?

    AFAIK, Expressions never work on frame basis, only on time basis but wanted to ask here for an answer! :)”

    Time is always calculated on a decimal basis. If you wanted to work in terms of frames then it is very easy – just type, 1/25, if you wanted a 1-frame differential. And 7/25 if you wanted a 7-frame differential.

    It’s actually a lot easier and it works for different people – there may be those that prefer to work with decimals/integers and there are those like yourselves who prefer to think in terms of frames.

    HTH
    Roland Kahlenberg
    broadcastGEMs
    customizable animated backdrops with Adobe After Effects project files

  • Mylenium

    October 10, 2006 at 6:06 am

    Well, this is a static expression. You still need to add “time” as a driving factor:

    thisComp.layer(“footage.psd”).transform.opacity.valueAtTime(time-framesToTime(11))

    in that case you need to subtract everything to make the expression look backward. If your offset is supposed to be the same for all layers, you should automate a little


    ref_offset=10;
    ref_opa=thisComp.layer(“footage.psd”).opacity

    new_opa=ref.opa.valueAtTime(time-framesToTime(ref_offset*index))

    [new_opa]

    With that you only need to clone your layer as often as you need.

    Mylenium

    [Pour Myl

  • Roger Averdahl

    October 10, 2006 at 12:36 pm

    Thank you very much Mylenium! 🙂

    It works like a charm and i am going to look into how to automate the Expression with the script you provided. I am new to Expressions so your help is very valuable for me! 🙂

    /Roger

    Premiere Pro User Group Sweden – http://www.pproug.se

  • Roger Averdahl

    October 10, 2006 at 12:46 pm

    Thank you very much Roland! 🙂

    It worked like a charm! I am new to Expressions so your help is very valuable to me!

    /Roger

    Premiere Pro User Group Sweden – http://www.pproug.se

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