This content has been marked as final. Show 4 replies
Is the Null a 3D layer? I believe the to-functions you've tried convert 3D positions into 2D positions.
If you want to lock for example the movement to just the Y position of another layer, you can use the expression-pickwhip and drag it to the layer's Y position readout to automatically link to just that property.
Did that help?
- Jonas Hummelstrand
Nope... My nulls are 2d. No 3d... My problem is: how to read out the world coordinates of a layer that is parented... Right now, all the transforms of the child are zeroed, so the child's positional values are different than it's world value. (ie [0,0] as opposed to [200,310]
I need more than just linking the y positions... I also have rotational and scale values, and dunno how to calculate for that - I'm a bit flakey on my cos & sin math.....
I've already finished this current project, I'm just wondering for a solution for next time. Rather than stabilizing the original footage and time remapping the animated eyes, I created my own via shape layers.
Frequently, I use this 1 null method when tracking a character's face and I'm replacing eyes and lipsync - manually track it with 1 null using pos, rot, and scale. Move the null into 1 stationary position (tip of nose is usually good). Then, find another stationary bit (tip of inside ear is usually good for me as well), and rotate and scale the null, so that it reaches that other point. Then you just need to manually adjust the values as the animation progresses. After that, just parent the new mouths and eyes to track and you're done. It's quick and simple.. But it has it's drawbacks, such as this situation, where I'd like to stabilize the original animation based on only 1 null containing pos, rot, and scale (2d). I've had hit and miss success when using AE tracker for facial features...
I'm still having a hard time picturing what you are trying to do, but you should be able to get everything you need by combining toComp() and fromComp(). Since the tracker data is relative to the layer, it would have to be converted to comp coordinates first before re-applying it to the second tracker as a relative offset.
If you want to get the comp coordinates of a layer's position, the simplest way is, somewhat unintuitively, to get the comp coordinates of the layer's anchor point using:
The reason toComp(position) doesn't work is because the position isn't described in the layer's coordinate space, but rather in the layer's parent's space if it has a parent, or in world space if it does not. The anchor point is described in the layer's local coordinate space, and is always at the same point as the position when the two are transformed to the same coordinate space.
You could use:
which calls the toComp member function of the parent layer, but this code will break if there is no parent, so to make the code robust you would have to test for hasParent (or something like that). Transforming the anchor point is a bit less work.