ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to parent / link in a composition that zooms from earth to an eye

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Thomas Hyttel
How to parent / link in a composition that zooms from earth to an eye
on Jul 27, 2020 at 11:07:04 am

I have a composition where I zoom/scale from earth to an eye, and on the way I want several callouts with texts to appear. I have trouble linking/parenting the texts/callouts to specific places without scaling them - and at the same time making them stay in the same positions on the map. All layers are linked to a ZOOM Null object that scales them except the callouts / texts.

I tried with this expression:
s = [];
ps = parent.transform.scale.value;
for (i = 0; i < ps.length; i++){
s[i] = value[i]*100/ps[i];
}
s


But it doesn't make the texts/callouts stay in the same position on the map while scaling - instead they bounce around. Is this due to the anchor point?
Any idea on how to solve this?









s = [];
ps = parent.transform.scale.value;
for (i = 0; i &lt; ps.length; i++){
s[i] = value[i]*100/ps[i];
}
s


Return to posts index

Filip Vandueren
Re: How to parent / link in a composition that zooms from earth to an eye
on Jul 27, 2020 at 7:09:58 pm

Maybe better to use Nulls that are parented to your Zoom-Null for positioning.
Then use layer-space transform of those Nulls with text-layers that are not parented.


l=thisComp.layer("København Null);
l.toComp(l.anchorPoint);




Return to posts index

Thomas Hyttel
Re: How to parent / link in a composition that zooms from earth to an eye
on Jul 28, 2020 at 3:24:52 pm

Thanks a lot Filip!
what do you mean with layer-space transform? you mean use position and rotation of those new nulls and link it to the text layers via code?
where do I put the code? ☺
(im not good at using and writing scripts :/)


Return to posts index


Filip Vandueren
Re: How to parent / link in a composition that zooms from earth to an eye
on Jul 28, 2020 at 3:32:15 pm

l.toComp() is an example of a space transformation method.

It takes a point on a layer "l", and not matter how that layer is parented, scaled, moved it will return the absolute coördinates of that layer-point in the composition.
You can use that information to put another layer at those coördinates without needing to parent them. If it's not parented, it won't scale along either, which is what you wanted.

The expression would go in the position-property of whatever layer you want to connect to the position of the Null, as if it was parented.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]