FORUMS: list search recent posts

toComp puppet pin to 2Dnull irrespective of puppeted comp size

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
alex ezorsky
toComp puppet pin to 2Dnull irrespective of puppeted comp size
on Sep 7, 2019 at 6:24:56 pm

I'm trying to experiment with putting a pattern on someone's face and I've got tracking data for all the face points we need in the form of position animated nulls.

I have the pattern comp with puppet pins placed but it's not the same size as the main comp so I figured I could do the whole toComp() thing to parent pins to nulls but even though the expression doesn't give errors the positioning of the puppet pin is still wildly far from the null.

I tried toWorld also. Any ideas?


Return to posts index

Graham Quince
Re: toComp puppet pin to 2Dnull irrespective of puppeted comp size
on Sep 8, 2019 at 7:29:36 am

Try pre-comping your pattern comp into a comp with the same dimensions and then apply the puppet pins to that, rather than directly onto the differently sized pattern comp.

I think that should do it.

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films
http://shiveringcactus.wordpress.com/ - FX blog


Return to posts index

Dan Ebberts
Re: toComp puppet pin to 2Dnull irrespective of puppeted comp size
on Sep 9, 2019 at 5:50:24 pm

You might need fromComp(), like this:

L = thisComp.layer("Null 1");
p = L.toComp(L.anchorPoint);
fromComp(p)


Dan



Return to posts index


alex ezorsky
Re: toComp puppet pin to 2Dnull irrespective of puppeted comp size
on Sep 10, 2019 at 2:50:46 am

This is amazing Dan it works like a charm allowing me to scale move and even rotate the source and the pin's stay put on the screen!

I'd never heard of the .fromComp before. The only tutorial I could find online about fromComp is this which helps but is too short





Do you know any better tutorials for this?

Also I'm trying to figure out why the anchor point being the reference makes it all work. I've noticed changing that to the layer's "position" definitely does not work, which I find odd because wouldn't AE need to know the layer's position on the screen in order to compensate?

Thanks!


Return to posts index

Dan Ebberts
Re: toComp puppet pin to 2Dnull irrespective of puppeted comp size
on Sep 10, 2019 at 6:17:39 am

The layer space transforms are all about getting points from layer space to comp space (toComp) and from comp space to layer space (fromComp).

The first part of the expression needs to get the null's location into comp space. If the null is not parented, you can skip toComp and just use its position, like this:

p = thisComp.layer("Null 1").position;
fromComp(p)

If the null is parented, then its position is no longer represented in comp space (it's actually in the parent's layer space) so you need to covert the null's anchor point (which is always represented in the null's layer space) from layer space to comp space:

L = thisComp.layer("Null 1");
p = L.toComp(L.anchorPoint);
fromComp(p)

Note that is solution will work whether or not the null is parented (which is why I did it that way).

Puppet pins are represented in layer space, so unless the layer with the pins is comp-sized, centered on the comp, and not scaled or rotated, you need to translate the null's location in comp space to the layer pin layer's layer space, which requires fromComp.

I hope that helps.


Dan



Return to posts index

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