Highlighted

Wiggle expression

Community Beginner ,
Sep 18, 2020

Copy link to clipboard

Copied

HI! I have a few layers and I want to wiggle their position. Also I have a null object with wiggle expression on its position. When I pickwhip their position to the position of null object these layers changing their position but I need only wiggle effect without changing the position. How do I achieve that?

Adobe Community Professional
Correct answer by Szalam | Adobe Community Professional

I think what you want to do is parent your other objects to the null object instead of pickwhipping to its position.

TOPICS
Expressions, FAQ

Views

120

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

Wiggle expression

Community Beginner ,
Sep 18, 2020

Copy link to clipboard

Copied

HI! I have a few layers and I want to wiggle their position. Also I have a null object with wiggle expression on its position. When I pickwhip their position to the position of null object these layers changing their position but I need only wiggle effect without changing the position. How do I achieve that?

Adobe Community Professional
Correct answer by Szalam | Adobe Community Professional

I think what you want to do is parent your other objects to the null object instead of pickwhipping to its position.

TOPICS
Expressions, FAQ

Views

121

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
Sep 18, 2020 0
Adobe Community Professional ,
Sep 18, 2020

Copy link to clipboard

Copied

I think what you want to do is parent your other objects to the null object instead of pickwhipping to its position.

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...
Sep 18, 2020 1
Adobe Community Professional ,
Sep 18, 2020

Copy link to clipboard

Copied

You can use this expression 

 

var mSource = thisComp.layer("Null 1");
var P1 = transform.position.wiggle(5,10);// this this you layer wiggle value:
var P2 = thisComp.layer("Null 1").transform.position;
var P3 = thisComp.layer("Null 1").transform.position.valueAtTime(mSource.inPoint);
P1+P2-P3;

 

change the Null 1 to your Null name, it will look like this

 

Screen Shot 2020-09-19 at 8.53.03 AM.png

 

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...
Sep 18, 2020 1
Adobe Community Professional ,
Sep 19, 2020

Copy link to clipboard

Copied

If you want to wiggle a bunch of layers at the same time and maintain their relative position you have two very simple options. Parent all of the layers to a null with wiggle() applied to it or Pre-compose all the layers and apply wiggle to the pre-comp. Most of the time I would use parenting. 

 

Using an expression would require you to retrieve the difference between the comp center and the position of the layer that is wiggling and add that value to the current layer's position. The expression would look like this:

 

src=thisComp.layer("Null 1").transform.position;
ofst = src - [thisComp.width/2, thisComp.height/2];
value + ofst;

 

The expression given by OussK does not work. You could remove the wiggle from the null and a layer containing the expression would still wiggle. Apply the expression to multiple layers and they would all wiggle differently.

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...
Sep 19, 2020 1
Adobe Community Professional ,
Sep 19, 2020

Copy link to clipboard

Copied

I have an animation preset I call Parent Position to Master. All you have to do is change the layer name of the position only parent to Master. Feel free to download it and save it to your custom presets folder.

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...
Sep 19, 2020 0
OussK LATEST
Adobe Community Professional ,
Sep 19, 2020

Copy link to clipboard

Copied

What I understand that they need to add 2 wiggle effects one on layer position and at the same time pickwhip to a null with wiggle expression, for that, I add .wiggle to the current position, so if you want simply wiggle the Null only you can remove the .wiggle from the P1, so the expression will look like this 

 

 

 

var mSource = thisComp.layer("Null 1");
var P1 = transform.position;
var P2 = thisComp.layer("Null 1").transform.position;
var P3 = thisComp.layer("Null 1").transform.position.valueAtTime(mSource.inPoint);
P1+P2-P3;

 

 

 also, all layers will wiggle the same 

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...
Sep 19, 2020 0