# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Slow down a null exponentially

• # Slow down a null exponentially

3 Members · 4 Posts
• ### Chris Orcfilm

September 12, 2011 at 7:14 pm

I having a panning shot of a building from the sky down to the ground.

I need to do a sky replacment.

I can track a feature position on the front of the building and attach a null.

Now I want the sky in the back to move with the pan but obviously a lot slower, exponentially than the null.

What expression can I use to exponentially slow down the position of the null data when parenting the sky to it? Something on a sliding scale as it were.

I’d prefer not to have to do a camera track given the brevity of the scene and am happy with “eyeballing” the speed of the sky.

Ref:

Chris

• ### Dan Ebberts

September 12, 2011 at 8:38 pm

I think you’ll have to define a reference starting y position for the null and then use something like this:

startY = 150;
mult = .5;
deltaY = thisComp.layer(“tracked null”).transform.position[1]-startY;
value + [0,deltaY*mult]

If the null is keyframed, you might define the reference y this way:

startY = thisComp.layer(“tracked null”).transform.position.valueAtTime(0)[1];

Adjust the value of mult to get the tracking you want for the background.

Dan

• ### Chris Orcfilm

September 13, 2011 at 12:50 am

Thanks Dan, as always you save the day – and in record time!

I also had a slight left shift so modified to affect the x, I know there would be a cleaner way but did this:

startY = thisComp.layer(“Null 1”).transform.position.valueAtTime(0)[1];
startX = thisComp.layer(“Null 1”).transform.position.valueAtTime(0)[0];
mult = .7;
deltaY = thisComp.layer(“Null 1”).transform.position[1]-startY;
deltaX = thisComp.layer(“Null 1”).transform.position[0]-startX;
value + [deltaX*mult,deltaY*mult]

Works like a charm!

This is for a submission to Sundance, and I know it won’t be your first, but thanks for contributing – your work indirectly appears in many great features I’m sure!

Kudos!

Chris