Highlighted

How to link and move only one object and the rest will loosely follow in after effects?

Community Beginner ,
May 07, 2020

Copy link to clipboard

Copied

Hello everyone, this is my first time here, and new to Adobe After Effects. Now, I have this problem where I need to drag only one object (which is the red circle in the image below) and the rest of the colored circles will follow on delay. I search on the web and there's no way I can find any specific explanation to mine, so I decided to create a post here so that somebody could notice and help me.

 

Yellow and, orange circle linked with the parent red circle.Yellow and, orange circle linked with the parent red circle.I did this on Adobe illustrator, but I cannot find any tools for this in Adobe After Effects. What I want is to only move one object and then the rest will adjust on their own, proportionally. Is this possible?

Every single-colored circle in that image will be replaced with Illustrator file to be animated later on. Please, if someone could provide, expressions, instructions, or step-by-step guide with pictures, I would greatly appreciate.

 

 

Thank you so much for your efforts, I will try to answer your questions if there's any, as soon as I can, so I can clarify my concern. I hope you understood my point, sorry for my bad English.

Adobe Community Professional
Correct answer by Mathias Moehl | Adobe Community Professional

What you want is to calculate the position of the other circles as weighted average of the red and the yellow circle. Let's call those pos1 and pos2.

If a circle is placed at 0.5* pos1 + 0.5*pos2, it is always in exactly in the middle between the two. If it is at 0.75*pos1 + 0.25*pos2, it iwll be closer to pos1 (like at 25% of the line from pos1 to pos2).

If you don't want to write your own expression, and own iExpressions, you can also use the Avarage Link iExpression.
https://mamoworld.com/after-effects-expression/average-link

screenshot_2019-11-11_11.42.56
Just connect the position of the red and yellow circle as Property 1 and Property 2 and then with the Balance (%) parameter, you can control where exactly between the red and the yellow circle the others should be located.

Topics

Expressions, FAQ, How to, Resources, Scripting

Views

1.5K

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

How to link and move only one object and the rest will loosely follow in after effects?

Community Beginner ,
May 07, 2020

Copy link to clipboard

Copied

Hello everyone, this is my first time here, and new to Adobe After Effects. Now, I have this problem where I need to drag only one object (which is the red circle in the image below) and the rest of the colored circles will follow on delay. I search on the web and there's no way I can find any specific explanation to mine, so I decided to create a post here so that somebody could notice and help me.

 

Yellow and, orange circle linked with the parent red circle.Yellow and, orange circle linked with the parent red circle.I did this on Adobe illustrator, but I cannot find any tools for this in Adobe After Effects. What I want is to only move one object and then the rest will adjust on their own, proportionally. Is this possible?

Every single-colored circle in that image will be replaced with Illustrator file to be animated later on. Please, if someone could provide, expressions, instructions, or step-by-step guide with pictures, I would greatly appreciate.

 

 

Thank you so much for your efforts, I will try to answer your questions if there's any, as soon as I can, so I can clarify my concern. I hope you understood my point, sorry for my bad English.

Adobe Community Professional
Correct answer by Mathias Moehl | Adobe Community Professional

What you want is to calculate the position of the other circles as weighted average of the red and the yellow circle. Let's call those pos1 and pos2.

If a circle is placed at 0.5* pos1 + 0.5*pos2, it is always in exactly in the middle between the two. If it is at 0.75*pos1 + 0.25*pos2, it iwll be closer to pos1 (like at 25% of the line from pos1 to pos2).

If you don't want to write your own expression, and own iExpressions, you can also use the Avarage Link iExpression.
https://mamoworld.com/after-effects-expression/average-link

screenshot_2019-11-11_11.42.56
Just connect the position of the red and yellow circle as Property 1 and Property 2 and then with the Balance (%) parameter, you can control where exactly between the red and the yellow circle the others should be located.

Topics

Expressions, FAQ, How to, Resources, Scripting

Views

1.5K

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
May 07, 2020 0
Adobe Community Professional ,
May 07, 2020

Copy link to clipboard

Copied

What you want is to calculate the position of the other circles as weighted average of the red and the yellow circle. Let's call those pos1 and pos2.

If a circle is placed at 0.5* pos1 + 0.5*pos2, it is always in exactly in the middle between the two. If it is at 0.75*pos1 + 0.25*pos2, it iwll be closer to pos1 (like at 25% of the line from pos1 to pos2).

If you don't want to write your own expression, and own iExpressions, you can also use the Avarage Link iExpression.
https://mamoworld.com/after-effects-expression/average-link

screenshot_2019-11-11_11.42.56
Just connect the position of the red and yellow circle as Property 1 and Property 2 and then with the Balance (%) parameter, you can control where exactly between the red and the yellow circle the others should be located.

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...
May 07, 2020 1
Community Beginner ,
May 07, 2020

Copy link to clipboard

Copied

Hi, Mathias_Moehl, thank you so much for the response, really appreciate it. Is there any videos that could link to your explanation? If there's any could you guide me where? Or what should be the keywords that I have to use for searching that solution. I'm really dumb with expressions, but I find you explanation very useful. Thank you so much, I hope you could help me more.

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...
May 07, 2020 0
Adobe Community Professional ,
May 08, 2020

Copy link to clipboard

Copied

No, I don't know of a tutorial explaining this in more depth. Again, if you don't know how to write expressions, the iExpressions solution is for you.

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...
May 08, 2020 1
Adobe Community Professional ,
May 07, 2020

Copy link to clipboard

Copied

If you want to do this without purchasing anything or spending a lot of time trying to understand expressions try one or more of Dan Ebberts solutions. Creating Trails - MotionScript.com

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...
May 07, 2020 1
Community Beginner ,
May 07, 2020

Copy link to clipboard

Copied

Thank you so much Rick I'll be looking on to this. Really helpful.

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...
May 07, 2020 0
Adobe Community Professional ,
May 08, 2020

Copy link to clipboard

Copied

But note that these trails are something similar, but not the same thing. The trails make objects follow with a time delay, but after the move is finished, they are all in the same location. In the sample video from whitehat1, however, the objects do not follow with a time delay, they all move instantly, but with different amounts. So instead of each object moving a bit later than the previous one, each object moves a bit less than the previous one.

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...
May 08, 2020 1
Community Beginner ,
May 08, 2020

Copy link to clipboard

Copied

Yes, Rick's Method doesn't really fit with my description, but at least it's almost there. Your solution is the exact answer Mathias, but unfortunately, iExpressions is very expensive. If someone could just teach me how average links work in expressions manually, or any other alternatives to that plugin. that'd be very helpful.

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...
May 08, 2020 0
Most Valuable Participant ,
May 08, 2020

Copy link to clipboard

Copied

It works as Mathias already pointed out in his first post - you add the differences of the objects. Here's something that you may be able to understand:

 

mStart=thisComp.layer("A").transform.position;
mEnd=thisComp.layer("B").transform.position;

diffX=mEnd[0]-mStart[0];
diffY=mEnd[1]-mStart[1];

sliceNum=4; //number of slices;
sliceID=3; //slice position;

X=diffX/(sliceNum-1)*sliceID;
Y=diffY/(sliceNum-1)*sliceID;

[X,Y]

 

This has to be applied to the slices in the middle. The references to the layers need to be adjusted of course and the sliceID need to be incremented for each slice.

 

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...
May 08, 2020 2
Engaged ,
May 08, 2020

Copy link to clipboard

Copied

Here's a simpler version of the expression above using the linear() function. Linear maps one range of numbers to another, and it works with arrays. So here it maps the slice number out of the total number of slices to the vector between the two points.

 

 

var mStart=thisComp.layer("A").transform.position;
var mEnd=thisComp.layer("B").transform.position;
var sliceNum=4; //number of slices;
var sliceID=3; //slice position (starting at 0);
// map layer number to the range between the two points
linear(sliceID, 0, sliceNum, mStart,mEnd);

 

 

It's equivalent of doing

 

sliceID / sliceNum * mStart + (1 - sliceID / SliceNum) * mEnd

 

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...
May 08, 2020 2
Community Beginner ,
May 09, 2020

Copy link to clipboard

Copied

Wow! all of you here were very helpful, thank you so much, everyone, all of you made a contribution to help fix my problem and I am very grateful for that. Maybe I should start learning javascript so I could understand the codes you guys provided. After diving with so many youtube tutorials I already found what I am looking for. I experimented with CC Sphere and got the result that I wanted. It is far from what I expected to be the answer to my problem but the solution I found out was better. Hope you could help me again with my future questions. For now, I will be marking Mathias' post to be the solution, Have a great day everyone!

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...
May 09, 2020 0