Expression Timeline 2
  • Expression Timeline 2
    Expression Timeline 2

    https://aescripts.com/expression-timeline/

    Apply several expressions to a property such that each expression is active only for a certain period of time. Instead of an abrupt change between the expressions you can also smoothly transition from one expression to the next. Furthermore, you can specify time intervals in which no expression is active such that the keyframed motion is considered.

  • Looks like a really useful script - was just thinking - would it be a good feature to enable the use of markers for the start/end of the expression sections as well as frame numbers? I guess the error trapping code may be a little tricky though if markers are in the wrong place.

    Might be a good future request???

  • Hi Paul,

    I like this idea. Only when you fade between two expressions, I am not sure whether you would like to have just one marker in the middle of the transition (or at the beginning or end?) or whether you want to have two markers - one at the beginning and one at the end of the transition.

    Cheers,
    Mathias
  • This seems a very useful script but I can't get it to behave correctly. I have a wiggle I want to start on frame 235 and go to the end. with a fade in of 40 frames.
    When I apply it as in the video nothing happens after frame 235. No wiggle. If I apply it to the first frame it works as expected. Does it not function after a certain number of frames?
  • Hi Jamie,
    this should be very easy to do with ExpressionTimeline. Can you send me your project or at least a screenshot of the Expression Timeline showing your setup?
    You can send open a support ticket to send it.
    Cheers
    Mathias
  • I'll see if I can up load it this week. I have been busy working on that same show I mentioned. Thanks for the reply.
  • Hi Mathias,

    Today I've downloaded the trial version of Expression Timeline 2 and I really like it.

    I will buy it within a couple of days ..

    I have some suggestions in order to improve this script

    It would be wonderful if you make the script automatically know the number frames based on keyframes, and it will be true time saver if you could add a feature to the script to grab the written expression directly to the expression box.

    Thank you so much.

  • Hi Basem,

    thanks a lot for your feedback. How should this keyframe idea look like exactly? Would if be sufficient to have a dropdown to choose either "frame" or "keyframe" where it currently just says "frame" in the UI. Such that when you choose "keyframe 5" instead of "frame 5", the transition will happen exactly at the 5th keyframe. Or do you need something like "make the transition 30 frames after the 5th keyframe"? This would be much more complicated to add to the UI without making it feel too complicated.
    Cheers,
    Mathias
  • What I mean is there any possibility to improve the script to give it the ability to calculate the value of the selected keyframe automatically based on its location or based on the location of the markers on the time line.
  • Well, if you place the current time indicator on a particular frame, you can read the current frame number in the upper left corner of the timeline window. Do you mean you want to save typing this number by hand?
  • Hi Mathias,
    I want the script to type the number of frames by it self, in order to save our time , especially when I have a lot of keyframes
  • OK, I see. I will put it on my list of feature requests. But I have to think more about it, since it is not clear how this should work: Currently, by entering a new number instead of "infinity" you tell the timeline to create a new expression box. If the numbers should be guessed automatically, there needs to be some other mechanism for the user to tell the timeline to create these new boxes.
  • Hi! Im searching for a script that will help me do this:

    Animate character (rigged with rubber hose) who starts waking, then loop the 24 frames walk cycle using a loop expression say 10 times, then have the loop stop so that I animate the character stop walking and continue do something else - all in same comp. Would your script be helpful? Grateful for fast reply! :D
  • Hi Camilla,

    the best solution for this is using iExpressions:
    It has a built-in walk cycle, but can also work with custom walk cycles.
    You get it here

    iExpressions is of course a much bigger investment than ExpressionTimeline, since it comes with a ton of other functions.
    Expression Timeline can use any expression, so you can also use it to transition from keyframes to a loop expression and vice versa. The problem is that the normal "loopOut" expressions of Ae always starts after the last keyframe, so if you want to add keyframes after the region where you want to loop, it will actually stop looping because the loop is aware that there are keyframes at later points in time and hence thinks it is not yet time to loop. You could write your own loop function that loops a custom range of time and then use your custom loop expression with Expression Timeline. Actually, iExpression has a loop function that supports a custom loop range:
    Say you want custom keyframes from frame 0-100 and then from 100 to 200 the walk cycle and then custom keyframes again. Then you could keyframe your 24 frame loop at frames 100-123, tell the expression to loop frames 100-123 and use Expression Timeline to use this expression only at frames 100 to 200.
    Also note that a simple no expressions at all solution is to split your layer into multiple layers such that you can apply an expression to only some of them.

    I recommend that you experiment with the trial versions of iExpressions and Expression Timeline to see what works for you.


    Hi! Im searching for a script that will help me do this:

    Animate character (rigged with rubber hose) who starts waking, then loop the 24 frames walk cycle using a loop expression say 10 times, then have the loop stop so that I animate the character stop walking and continue do something else - all in same comp. Would your script be helpful? Grateful for fast reply! :D

  • Update:
    @Camilla here is such a custom loop expression that you could use with ExpressionTimeline

    This one loops the frames from 12 to 22 (excluding 22, so 22 should have the same keyframe as 12 to get a seamless loop). Simply adjust the two numbers in the expression to set the loop region you need and then use Expression Timeline, to run this loop only on some parts of your comp.

    -------------
    var startFrame = 12;
    var endFrame = 22;

    var myStartTime = framesToTime(startFrame);
    var myEndTime = framesToTime(endFrame);
    var loopDuration = myEndTime-myStartTime;
    valueAtTime((((time-myStartTime)%loopDuration)+loopDuration)%loopDuration+myStartTime)
    -------------

    Hi! Im searching for a script that will help me do this:

    Animate character (rigged with rubber hose) who starts waking, then loop the 24 frames walk cycle using a loop expression say 10 times, then have the loop stop so that I animate the character stop walking and continue do something else - all in same comp. Would your script be helpful? Grateful for fast reply! :D

  • Hi, I'm interested in your script.
    Would it be possible to add the following in an update?
    I know this has been proposed before, but it would save tremendous time.

    Instead of using framenumbers, have an option to use the keyframes from the timeline.
    Maybe a toggle in your script, framenumbers vs keyframes.

    1. you select a pair of 2 keyframes
    2. press some button in your script, and it reads the first keyframe 'out', and second keyframe 'in'
    //edit it won't revert back to framenumbers, instead something like key[0] and key[1], so you can adjust them later.
    3. add script, and apply.

    This would save time having to punch in framenumbers, 
    but more importantly, you would be able to adjust the keyframes on the timeline, and still keep the expression going.

    Thanks
  • Thank you for your suggestion!
    I wonder if it would not be better to use markers in that case (like an expression being active from the beginning to the end of a particular layer marker). The problem I see with keyframes is that if an expression is active from keyframe 10 to keyframe 11, whenever you insert additional keyframes before that, the numbers shift again.
    Hi, I'm interested in your script.
    Would it be possible to add the following in an update?
    I know this has been proposed before, but it would save tremendous time.

    Instead of using framenumbers, have an option to use the keyframes from the timeline.
    Maybe a toggle in your script, framenumbers vs keyframes.

    1. you select a pair of 2 keyframes
    2. press some button in your script, and it reads the first keyframe 'out', and second keyframe 'in'
    //edit it won't revert back to framenumbers, instead something like key[0] and key[1], so you can adjust them later.
    3. add script, and apply.

    This would save time having to punch in framenumbers, 
    but more importantly, you would be able to adjust the keyframes on the timeline, and still keep the expression going.

    Thanks

  • Yes, markers could work as well!
    I was thinking about that same adding keyframes problem, though adding keyframes should be a fair penalty, in having to set it back up.
    Most important feature would be able to adjust the expression in length and position without having to re-enter the framenumbers.
    I'd prefer keyframes because they're a little easier to move around, especially when you're dealing with multiple layers.
    Thanks for the reply.

    //there's probably a way to link a keyframe to a marker, so it might be possible to adjust those markers with keyframes.
  • i user after effect 2023. whenever I open your script the after effect is exited with the message "Sorry, an error occurred...". Can you check and fix this error? Thank you very much
  • Hi Vuong,

    yes, there seems to be a bug in the most recent Ae version, which causes this crash on some machines. Since it is a bug on Adobe’s end, there is nothing I can do about it, unfortunately. I reported the issue to an Adobe quality engineer already and he said he will try to reproduce it and then create a ticket for the developers internally.

    I highly recommend that you report this bug, too.  Because the more people complain, the faster Adobe is going to solve the issue.


    i user after effect 2023. whenever I open your script the after effect is exited with the message "Sorry, an error occurred...". Can you check and fix this error? Thank you very much

  • UPDATE:

    I just got this info about the Expression Timeline crash bug from Adobe:

    "Good news; this is fixed in After Effects Beta 23.6 build 37, and will be included in the next release."


    Hi Vuong,

    yes, there seems to be a bug in the most recent Ae version, which causes this crash on some machines. Since it is a bug on Adobe’s end, there is nothing I can do about it, unfortunately. I reported the issue to an Adobe quality engineer already and he said he will try to reproduce it and then create a ticket for the developers internally.

    I highly recommend that you report this bug, too.  Because the more people complain, the faster Adobe is going to solve the issue.


    i user after effect 2023. whenever I open your script the after effect is exited with the message "Sorry, an error occurred...". Can you check and fix this error? Thank you very much