Activity › Forums › Adobe After Effects Expressions › 3D Position Expressions
-
3D Position Expressions
Posted by Paul Bastin on September 22, 2007 at 11:16 pmHi and thanks for helping in advance.
I am fairly knowledgeable with After Effects but not with the expressions part of it.
I have a camera coming out of a shoe, and as it reveals the shoe entirely, we see other shoes building off of it, as a path almost, and then the build creates a spiral path down as the camera reverses direction and tries (but is too slow) to catch up with the front leading shoe, passing through all the other ones.

Thank you,
Paulps not sure if the pictures come through. if anyone can help me with posting picts, I’d be able to show how it is supposed to look. Thanks
Paul Bastin
Editor, Film Maker, PhotographerPaul Bastin replied 18 years, 10 months ago 2 Members · 7 Replies -
7 Replies
-
Mike Clasby
September 23, 2007 at 2:29 amI Can’t see the pics, I get little red X’s. Here’s a tut:
https://library.creativecow.net/articles/lindeboom_kathlyn/whipped_cream.php
What was you question relating to 3D Position expression? Do you want a spiral path expression?
-
Paul Bastin
September 24, 2007 at 12:47 pmHi Mike,
Yes, I would like a spiral expression. Here’s a link to the style frames:https://web.mac.com/pabastin/iWeb/Shoes/Style%20frames.html
In starting the animation, and the path that the shoes go on, I tried this expression on one shoe to, that when duplicating the layer it woould offset each one to start giving it the depth I need and for the camera to eventually go past and follow
x = value[0] + 530;
y = value[1] – 360;
z = value[2] + 200;
[x,y,z]
and I thought that duplicating each layer, it would give me the results of frame one before I would then add in to the expression a rotation factor, to start it’s spiral. But when I duplicated with the expression above, nothing changed.Thanks again,
PaulPaul Bastin
Editor, Film Maker, Photographer -
Mike Clasby
September 24, 2007 at 6:40 pmDistributing Layers Along Path
https://forums.creativecow.net/readpost/2/916917
Mine is a Dan Expression solution for making trails, I’d setup Dan’s trails, then spread them out along the path then set keyframes for position and disable the expressions (click the equal sign), freezing them in those spots along the path.
The other responses are mechanical, maybe easier.
SPIRAL
1) Here’s a Dan expression, “this expression will cause a layer to orbit its keyframed position”:
https://forums.creativecow.net/readpost/2/886108
r = 50; //radius (in pixels)
f = 1; //orbits per secondangle = time*Math.PI*2*f;
value + [Math.sin(angle)*r, -Math.cos(angle)*r]2) Dan has a keyframed solution here:
https://forums.creativecow.net/readpost/2/891763
With a Colin expression on the response below.
3) Another Colin Expression, here:
https://forums.creativecow.net/readpost/2/912900
4) There is also this tut:
https://www.creativecow.net/articles/fang_xiang/spiral_path/index.html
I gotta go do another job, hope you’re not overloaded, I’ll check back later.
-
Paul Bastin
September 24, 2007 at 9:19 pmOver loaded is an understatement. I have to stop double booking myself!
I will take a look at your suggestions in a few hours, when I am off the other job!!!
Thank you!!
PaulPaul Bastin
Editor, Film Maker, Photographer -
Mike Clasby
September 25, 2007 at 4:45 amIf you have Particular, I think you can get close to what you want real quickly. I just have the demo version, but I got it close, at least I think so, if I’m reading your post correctly.
On a new Solid (2D) I added Particular and used a shoe layer as a custom particle.
Particular
Particles per second: 10 (use what you want), 10 gives a new shoe every 3 frames, maybe you want more.
Position XY: I added Colin’s expression for a spiral (see below)
Position Z: Keyframe the depth change you want
Velocity: 0
Velocity Random: 0
Velocity from Motion: 0
Particle
Particle Life: 20 (whatever you want, default 3 makes them disappear too soon)
Particle Type: Custom
Layer: Choose your Shoe Layer
Size: 10 (to taste)Colin expression for XY Spiral, applied to Position XY, (to apply, Copy the expression, Alt-Click the Position XY Stopwatch, then Paste):
//begin expression
//Expression by Colin Braley
//Modify these first few variables to change the effectcenterPoint = [360 , 270];
beginRadius = 25; //pixels
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 );
//–
[x , y] + centerPoint
//end expressionNow Add a camera and Add this modified version of Colin’s expression to the camera Position:
//begin expression
//Expression by Colin Braley
//Modify these first few variables to change the effectcenterPoint = [360 , 270];
beginRadius = 25; //pixels
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 = position[2];
//–
[x, y, z] + centerPoint
//end expressionThen Key frame the Z movement of the camera and the expression will provide the spiraling, the keyframes the descent. Also you can keyframe inthe catching-up and falling behind… very cool>
OK, I forgot, you need to disconnect the camera’s auto Orient, Right Click the Camera>Transform>Auto Orient>Off (when it pops up).
OK, this is close, maybe you need to enlarge the beginRadius and endRadius on the camera expression so it follows the way you want… experiment. You can even set them up with sliders, ask if you don’t know how.
I think this is real close and as a bonus, quickly done.
You can get a trial version of Particular from Trapcode to test it out.
https://www.trapcode.com/download.html
Like I said, I don’t have this plugin, maybe they give it too me if I keep discovering this neat stuff… I hate it when I beg.
-
Paul Bastin
September 26, 2007 at 1:47 amWOW. I never expected to get that much help!!! Thank you tons. I will try all of it, and LEARN from it. I will let you know how it turns out and post it for you (sometime Thursday) still crazy busy with another job!!
Again, thank you so much for your help.
PaulPaul Bastin
Editor, Film Maker, Photographer -
Paul Bastin
October 4, 2007 at 6:37 pmHey yikesmike,
just a rough motion test,https://web.mac.com/pabastin/iWeb/Shoes/Movie.html
but i ended up doing it the slow way and repeating the shoes via layers, creating one spiral of them, and then just duplicating them, adjusting the z value. I just couldn
Reply to this Discussion! Login or Sign Up