ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Parenting a null to an expression?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chance McIntyreParenting a null to an expression?
by on May 13, 2014 at 5:29:32 pm

I'm working on a project that requires a pulsing object that is motivated by a null. The null is tracked and I like the results that Turbulent Displacement provides, but I need the turbulence to be anchored by the null. (Imagine the null being the bow of a ship and the turbulence being the ripples emitted) So I'm trying to pin the Offset to the null using an expression and I keep getting errors. I'm obviously not fluent in expressions; can I parent the change of the Offset to the position of the Null?

Return to posts index

Kevin CampRe: Parenting a null to an expression?
by on May 13, 2014 at 5:45:14 pm

you should be able to simply enable expression for the offset turbulence property and then use the expression pickwhip and drag that to the null's position property (note it has to be the position property, not the layer itself... so that may be you issue)

the resulting expression should look similar to this:

thisComp.layer("Null 1").transform.position

Kevin Camp
Art Director

Return to posts index

Doyle LewisRe: Parenting a null to an expression?
by on May 13, 2014 at 7:38:06 pm

I just tried this with a wiggling null and a turbulent displace. by just pick-whipping the offset to the word position under the null I was able to get it to follow the null no problem. I'm thinking maybe you pick-whipped to one of the position values say the x or y. That is the only reason I can think of that that wouldn't work. If it is correct yours should say:

thisComp.layer("Null 1").transform.position

If it is wrong it might say:

temp = thisComp.layer("Null 1").transform.position[0];
[temp, temp]


temp = thisComp.layer("Null 1").transform.position[1];
[temp, temp]

Even with the wrong expressions I posted above you would at least have the turbulent moving in just the x or y direction, you wouldn't get an error. Is your null 3D tracked?

Doyle Lewis, Assistant Videographer

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved