Great info for someone who needs a quick boiler-plate fix, but the video really doesn't explain what exactly is going on under the hood for deeper insights about how the expression works. As someone who has struggled to learn java and expressions, I am always looking to understand better in order to use that knowledge to modify/create for my own purposes. Definitely useful though and I can figure it out for myself with what I have learned.
Hi Joseph, thanks for your feedback. It was my intention to make a more in-depth tutorial, breaking down the expression and how it works in the future, but I knew the majority of people would benefit from the expression itself and how to use it in a quick run-through. I'm glad you found it useful though and I'll be sure to create a more in-depth tutorial at a later date. Thanks
This works fine. but I found that the animations linked are linear, the expression doesn't recognizes the speed curves, is there a way to fix that? Thank you!
The quickest way would be to change any words inside the expression from 'linear' to 'ease'. This would however still only use the basic easing rather than any curve adjustments you made inside the Graph Editor. If you wanted to keep you're adjusted easing, the best option might be to precompose your animation and then use this method on the time-remap keyframes. If the standard easing is succicient for what you're looking for, here's is the updated expression for you: L = thisLayer; KF1 = key(2).time - key(1).time; KF2 = key(4).time - key(3).time; M1 = L.marker.key(1).time; M2 = L.marker.key(2).time; if (time < L.marker.key(2).time) ease(time,M1,M1+KF1,key(1).value,key(2).value) else if (time > L.marker.key(1).time) ease(time,M2,M2+KF2,key(3).value,key(4).value) else value;
Great info for someone who needs a quick boiler-plate fix, but the video really doesn't explain what exactly is going on under the hood for deeper insights about how the expression works. As someone who has struggled to learn java and expressions, I am always looking to understand better in order to use that knowledge to modify/create for my own purposes. Definitely useful though and I can figure it out for myself with what I have learned.
Hi Joseph, thanks for your feedback. It was my intention to make a more in-depth tutorial, breaking down the expression and how it works in the future, but I knew the majority of people would benefit from the expression itself and how to use it in a quick run-through. I'm glad you found it useful though and I'll be sure to create a more in-depth tutorial at a later date. Thanks
This works fine. but I found that the animations linked are linear, the expression doesn't recognizes the speed curves, is there a way to fix that? Thank you!
The quickest way would be to change any words inside the expression from 'linear' to 'ease'. This would however still only use the basic easing rather than any curve adjustments you made inside the Graph Editor.
If you wanted to keep you're adjusted easing, the best option might be to precompose your animation and then use this method on the time-remap keyframes.
If the standard easing is succicient for what you're looking for, here's is the updated expression for you:
L = thisLayer;
KF1 = key(2).time - key(1).time;
KF2 = key(4).time - key(3).time;
M1 = L.marker.key(1).time;
M2 = L.marker.key(2).time;
if (time < L.marker.key(2).time)
ease(time,M1,M1+KF1,key(1).value,key(2).value)
else if (time > L.marker.key(1).time)
ease(time,M2,M2+KF2,key(3).value,key(4).value)
else
value;