Highlighted

Continuing with a new expression where a previous one left off.

Participant ,
Apr 03, 2020

Copy link to clipboard

Copied

Using AE 2020.  I am using an expression on a shape layer (wiggle on position for example).

Duplicate layer 1 and have it (layer 2) start on frame 20.

I want to wiggle the position of layer 1 for 20 frames. Frame 20 will be in a random position.

Layer 2 should start in the exact same position as layer 1, but continue with key frames or a different expression.

How can I do this?

 

(PS.  I am using more complex expressions than wiggle but on position.  ~25 layers involved)

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

You can use if-else statements based on time or layer markers or keyframes to disable an expression. If you wanted a layer's rotation to wiggle 6 times a second with a value change of 90º and then stop at one second and then you wanted to use keyframes to rotate the layer for four seconds, then wanted the layer to wiggle 10 times a second with a random value change of 60º you could do this:

 

 

 

if (time < 1)
	t = wiggle(6, 40)
else if (time > 4)
	t = wiggle (10, 60)
else value

 

 

 

 The sudden jump in values at 1 second and 4 seconds could be reduced using the graph editor:

Screenshot_2020-04-04 09.45.52_366lOM.png

Or you could assign the wiggle amount and even the wiggle frequency to a slider control to get a curve that looks like this:

Screenshot_2020-04-04 10.03.36_8KlWHl.png

 

 

 

amp = effect("Slider Control")("Slider");
if (time < 1)
	wiggle(6, amp)
else if (time > 4)
	wiggle (10, amp)
else value

 

 

 

Just animating slider value won't give you the break in the timeline like the if-else statements can. 

 

If you wanted to save something like this as an animation preset you could add expression controls for the time as well any other values in the expression you wanted to animate using keyframes.

 

If you wanted to start or stop and expression based on the in or out point of Null 1 added to the timeline, you could just change the time in the expression to the inPoint and outPoint of the null like this:

 

 

ctrl = thisComp.layer("Null 1");
amp = effect("Slider Control")("Slider");
if (time < ctrl.inPoint)
	wiggle(6, amp)
else if (time > ctrl.outPoint)
	wiggle (10, amp)
else value

 

 

I hope that helps.

Topics

Expressions, How to

Views

267

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Continuing with a new expression where a previous one left off.

Participant ,
Apr 03, 2020

Copy link to clipboard

Copied

Using AE 2020.  I am using an expression on a shape layer (wiggle on position for example).

Duplicate layer 1 and have it (layer 2) start on frame 20.

I want to wiggle the position of layer 1 for 20 frames. Frame 20 will be in a random position.

Layer 2 should start in the exact same position as layer 1, but continue with key frames or a different expression.

How can I do this?

 

(PS.  I am using more complex expressions than wiggle but on position.  ~25 layers involved)

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

You can use if-else statements based on time or layer markers or keyframes to disable an expression. If you wanted a layer's rotation to wiggle 6 times a second with a value change of 90º and then stop at one second and then you wanted to use keyframes to rotate the layer for four seconds, then wanted the layer to wiggle 10 times a second with a random value change of 60º you could do this:

 

 

 

if (time < 1)
	t = wiggle(6, 40)
else if (time > 4)
	t = wiggle (10, 60)
else value

 

 

 

 The sudden jump in values at 1 second and 4 seconds could be reduced using the graph editor:

Screenshot_2020-04-04 09.45.52_366lOM.png

Or you could assign the wiggle amount and even the wiggle frequency to a slider control to get a curve that looks like this:

Screenshot_2020-04-04 10.03.36_8KlWHl.png

 

 

 

amp = effect("Slider Control")("Slider");
if (time < 1)
	wiggle(6, amp)
else if (time > 4)
	wiggle (10, amp)
else value

 

 

 

Just animating slider value won't give you the break in the timeline like the if-else statements can. 

 

If you wanted to save something like this as an animation preset you could add expression controls for the time as well any other values in the expression you wanted to animate using keyframes.

 

If you wanted to start or stop and expression based on the in or out point of Null 1 added to the timeline, you could just change the time in the expression to the inPoint and outPoint of the null like this:

 

 

ctrl = thisComp.layer("Null 1");
amp = effect("Slider Control")("Slider");
if (time < ctrl.inPoint)
	wiggle(6, amp)
else if (time > ctrl.outPoint)
	wiggle (10, amp)
else value

 

 

I hope that helps.

Topics

Expressions, How to

Views

268

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Apr 04, 2020

Copy link to clipboard

Copied

Simple. The real trick is to simply decouple the expressions from the actual layer/ shape and apply them to a neutral dummy item like a Null or point expression control and then pick-whip them to whatever item they need to go while adding the other expressions on top.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Participant ,
Apr 04, 2020

Copy link to clipboard

Copied

I think I know what you mean.  Both layers pick-whipped to the same null which has the expression. That works in that layer 2 picks up right where layer one ends.  Except I want to continue movement of layer 2 with key frames and NOT be affected by the null.  I can't disable the link of layer 2 to the null (or can I?).  

 

My end game is to use the setup in this (https://www.provideocoalition.com/automatic-grid-layouts-in-after-effects/) and have the 'Controls&Setting' (null) control all layers to a certain point then release control then the keyframe individual layers.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 04, 2020

Copy link to clipboard

Copied

You can use if-else statements based on time or layer markers or keyframes to disable an expression. If you wanted a layer's rotation to wiggle 6 times a second with a value change of 90º and then stop at one second and then you wanted to use keyframes to rotate the layer for four seconds, then wanted the layer to wiggle 10 times a second with a random value change of 60º you could do this:

 

 

 

if (time < 1)
	t = wiggle(6, 40)
else if (time > 4)
	t = wiggle (10, 60)
else value

 

 

 

 The sudden jump in values at 1 second and 4 seconds could be reduced using the graph editor:

Screenshot_2020-04-04 09.45.52_366lOM.png

Or you could assign the wiggle amount and even the wiggle frequency to a slider control to get a curve that looks like this:

Screenshot_2020-04-04 10.03.36_8KlWHl.png

 

 

 

amp = effect("Slider Control")("Slider");
if (time < 1)
	wiggle(6, amp)
else if (time > 4)
	wiggle (10, amp)
else value

 

 

 

Just animating slider value won't give you the break in the timeline like the if-else statements can. 

 

If you wanted to save something like this as an animation preset you could add expression controls for the time as well any other values in the expression you wanted to animate using keyframes.

 

If you wanted to start or stop and expression based on the in or out point of Null 1 added to the timeline, you could just change the time in the expression to the inPoint and outPoint of the null like this:

 

 

ctrl = thisComp.layer("Null 1");
amp = effect("Slider Control")("Slider");
if (time < ctrl.inPoint)
	wiggle(6, amp)
else if (time > ctrl.outPoint)
	wiggle (10, amp)
else value

 

 

I hope that helps.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Steve221 LATEST
Participant ,
Apr 04, 2020

Copy link to clipboard

Copied

That may work for me.  Thanks.  I also forgot about "convert to keyframes" that may be an easier remedy.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...