ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Speed up/down along a mask path

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Duane Garnett
Speed up/down along a mask path
on May 2, 2018 at 12:51:44 pm

Hi all,

So i got this project, it has 2 binary stars that will come into screen slowly, then start to orbit eachother and eventually collide... thing is, if I mask the path, the animation will be at the same speed throughout. Thats when i copy the mask shape and paste it to the position of the star.

My question is, is there an expression or a way to control the speed of the stars along a mask path? Or is it a matter of adjusting keyframes? because that is rather time consuming.

TIA


Return to posts index

Cassius Marques
Re: Speed up/down along a mask path
on May 2, 2018 at 8:03:31 pm

Usually is by pre-composing and enabling time remap. But it will be almost the same as creating keyframes at times and giving them influence. Its easier because with time remmap you can just say "I want the two-second mark's position now" by creating a keyframe and typing 02;00.

Cassius Marques
http://www.zapfilmes.com


Return to posts index

Walter Soyka
Re: Speed up/down along a mask path
on May 2, 2018 at 8:32:21 pm

Precomposing as Cassius mentions is a great option.

I also sometimes use an expression to give me progress along the motion path. Add a Slider Control effect to your layer, and rename it "Progress". Then Alt+click the stopwatch and paste the following expression:

valueAtTime(linear(effect("Progress")("Slider"), 0, 100, key(1).time, key(numKeys).time));

That gives you a single slider representing the completion percentage across the motion path that you can animate and ease from 0 to 100.

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


dave green
Re: Speed up/down along a mask path
on Feb 25, 2019 at 2:31:37 pm

This script looks perfect but it seems to be cut short. Is there any chance you could add the rest ☺ many thanks in advance, Dave.


Return to posts index

Walter Soyka
Re: Speed up/down along a mask path
on Feb 26, 2019 at 2:42:31 pm

Hi Dave,

The whole expression is there -- it's just one line -- but because of the way CreativeCOW handles formatting for code, it scrolls horizontally. You should be able to select the whole thing, either by triple-clicking it or by drag-selecting from left to right.

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

dave green
Re: Speed up/down along a mask path
on Feb 26, 2019 at 3:56:08 pm

Hi Walter, thanks for your reply ☺ I did figure that out just after hitting the post button, and felt kinda silly, and I really wanted to delete the post but because i’m A newbie here my post wasn’t uploaded straight away, so I couldn’t .
Could you clarify for me where the slider (with the expression) needs to go, should it be on the layer with the animated object? Or should it be applied to a precomp holding the animated object (with a time remap added) or somewhere else? i’ve Tried both add I get the error that there is no keyframe 1.
Many thanks in advance, Dave


Return to posts index


Walter Soyka
Re: Speed up/down along a mask path
on Feb 26, 2019 at 4:47:58 pm

The slider should be added to the layer you wish to control. Once you've done that, you can select it in the Effects Control Panel and hit Enter to rename it "Progress".

The expression should be added to the position property that has the motion path on it. With the layer selected, press P to reveal the Position property, then Alt+click its stopwatch and paste the expression.

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

dave green
Re: Speed up/down along a mask path
on Feb 27, 2019 at 7:23:39 am

Genius!! That worked perfectly. Many thanks, and have a great day.


Return to posts index

Adam Mall
Re: Speed up/down along a mask path
on Jul 5, 2019 at 2:14:01 am

I've tried this expression on the position of my motion path, but I am getting an error: function effect is undefined. I've added the slider to the layer that is moving ... not sure why this happening


Return to posts index


Tomas Bumbulevičius
Re: Speed up/down along a mask path
on Jul 5, 2019 at 7:53:16 am

Adam, make sure you renamed the slider to 'Progress'.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Adam Mall
Re: Speed up/down along a mask path
on Jul 5, 2019 at 6:29:09 pm

unfortunately still not working ...

I have a shape layer as my object (a planet) moving around the motion path (elliptical orbit) .. in order for the object to move around the motion path I pick whipped the position of the object to the motion path position... could that have something to do with it ?

I added the slider to the shape layer planet .. renamed it Progress ..then I added the expression to the motion path .. still same error. I know it has to be something relatively simple I've done wrong :(


Return to posts index

Adam Mall
Re: Speed up/down along a mask path
on Jul 11, 2019 at 7:17:24 pm

anyone ha ?


Return to posts index


Walter Soyka
Re: Speed up/down along a mask path
on Jul 11, 2019 at 7:19:35 pm

Can you post your AEP (or a reduced AEP) that shows the problem so I can take a look?

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

Adam Mall
Re: Speed up/down along a mask path
on Jul 11, 2019 at 7:36:36 pm

trying to upload file


Return to posts index

Adam Mall
Re: Speed up/down along a mask path
on Jul 11, 2019 at 7:53:14 pm

I've uploaded it but it doesn't show up on the thread at all ..


Return to posts index


Adam Mall
Re: Speed up/down along a mask path
on Jul 11, 2019 at 8:13:23 pm

13521_wooverlayversion1withplanetsforreduced.aep.zip


Return to posts index

Walter Soyka
Re: Speed up/down along a mask path
on Jul 18, 2019 at 2:32:02 am

Adam, your example is more complicated because you are using expressions to drive multiple position properties from one single location.

Something like this ought to work for you:
motionLayer = thisComp.layer("Motion Path 1");
keyframeLayer = thisLayer;

keyframeEffectProp = keyframeLayer.effect("Progress")("Slider");
motionLayer.transform.position.valueAtTime(linear(keyframeEffectProp, 0, 100, keyframeEffectProp.key(1).time, keyframeEffectProp.key(keyframeEffectProp.numKeys).time));


The first two lines are important. They set up where the expression will look for position values and our keyframed "Progress" slider.

As written above, leave motionLayer set as it is, and put the animated Progress slider control on each individual layer. If you want to refer to one Progress slider from multiple layers, modify that keyframeLayer reference (line 2) to indicate whatever layer actually has the Progress effect.

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

Adam Mall
Re: Speed up/down along a mask path
on Jul 18, 2019 at 9:59:57 pm

Thanks for all of that. I appreciate it.... unfortunately it's still not working.. but it's getting far too complicated for me/skill set.

I am now looking at the total speed of the actual planet from a CVS data file that I have converted to JSON (this is the preferred method). I am hoping I can reference that data to drive the planet at the correct speed around the ellipse ... but this will be complicated too no doubt


Return to posts index


Walter Soyka
Re: Speed up/down along a mask path
on Jul 22, 2019 at 2:38:06 pm

If you can share the data, I will try to help you.

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 >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]