Activity › Forums › Adobe After Effects › How to attach a path to a Null object:
-
How to attach a path to a Null object:
Posted by Nick on November 21, 2007 at 7:50 amHey guys,
Anyone know how to attach a path, say like a spiral to a 3d null object? I want to animate the null to follow this path.
Cheers!Nick replied 18 years, 5 months ago 2 Members · 4 Replies -
4 Replies
-
Mike Clasby
November 21, 2007 at 8:21 amOne way:
Create a Null, make it 3D
Duplicate it.
Parent one Null to the other Null
Move the child away from the Parent as far as you want the Radius of the spiral to be.
Rotate the parent over time (Y rotation keyframes).
Animate the X Position of the Child (or parent) over time.
-
Mike Clasby
November 21, 2007 at 9:10 amColin wrote an expression for a spiral, here:
https://forums.creativecow.net/readpost/2/912900
I hacked it to add Z movement. Add this expression to the Null’s Position (Copy the expression, Alt-Click the Position Stopwatch, Paste, Click outside the box):
//begin expression
//Expression by Colin Braley then hacked by yikesmikes
//Modify these first few variables to change the effectcenterPoint = [360 , 270];
beginRadius = 25; //pixels
beginZ = 0;
endZ = 800; // how far you want the spiral to move over time
endRadius = 100; //pixels
startTime = 0; //seconds
endTime = 3; //seconds
howManyRings = 3;
clockwise = false;
//if you want the spiral to spin the other way make clockwise = false;//–
t = time;
if( time < startTime ) t = startTime; if( time > endTime )
t = endTime;
radius = linear( time , startTime , endTime , beginRadius , endRadius );
theta = linear( time , startTime , endTime , 0 , (2 * Math.PI ) * howManyRings );
if( ! clockwise )
theta *= -1;
x = radius * Math.cos( theta );
y = radius * Math.sin( theta );
z = linear ( time, startTime, endTime, beginZ, endZ);
//–
[x , y, z] + centerPoint
//end expressionChange the parameters in the first 9 lines of code to make any spiral you want.
If you want keyframes you can always convert the expression to keyframes (select Position, then Animation>Keyframe Assistant>Convert Expression To Keyframes).
-
Nick
November 21, 2007 at 11:34 pmAlthough this works well, and with this exactly in mind, how could I animate my spiral (if you can imagine it from the side) from top to bottom in Z-Space. (A stretched out spiral)
What I’m trying to do is animate a Christmas tree with a ligh streak attached to my Null that can start building from top (small) to bottom (bigger)
You first idea seemed like it would work YM, but somehow all I get is a light streak making a verticle line from top to bottom.
Thanks again!
Reply to this Discussion! Login or Sign Up