Discussion:
Offsetting position of motion tracked null
(too old to reply)
N***@adobeforums.com
2008-09-27 02:36:44 UTC
Permalink
So I'm tracking an object in Mocha and applying the transform data to a null in AE CS3. I then pickwhip an effect position to the null. This usually works great -- except when I want the position of the effect to be offset slightly from where it was tracked. Adjusting the anchor point of the null doesn't have any effect.

How can I adjust the position of my effect when it's locked to the null? One solution I thought of would be to create X & Y sliders and add those numbers to the null's position.
K***@adobeforums.com
2008-09-27 02:49:22 UTC
Permalink
The expression isn't working?
N***@adobeforums.com
2008-09-27 21:08:57 UTC
Permalink
No, I don't know how to contsruct the expression.

Is this right??

x = slider1
y = slider2
position[value+x[0],value+y[1]]
D***@adobeforums.com
2008-09-27 21:52:45 UTC
Permalink
Assuming the sliders are applied to same layer as the effect, it could look something like this:

nullPos = thisComp.layer("Null 1").transform.position;
xOffset = effect("x offset")("Slider");
yOffset = effect("y offset")("Slider");
nullPos + [xOffset,yOffset]

Dan
N***@adobeforums.com
2008-09-29 14:38:17 UTC
Permalink
Brilliant! I didn't know you can add an array like that.
N***@adobeforums.com
2008-10-03 20:08:06 UTC
Permalink
How would I combine that to the 3D null to 2D effect expression?
L = thisComp.layer("Null")
L.toComp(L.anchorPoint);
D***@adobeforums.com
2008-10-04 15:42:10 UTC
Permalink
Is this what you mean?

L = thisComp.layer("Null")
nullPos = L.toComp(L.anchorPoint);
xOffset = effect("x offset")("Slider");
yOffset = effect("y offset")("Slider");
nullPos + [xOffset,yOffset]

Dan
N***@adobeforums.com
2008-10-05 15:52:31 UTC
Permalink
Genius!! Yup! That's it!

Loading...