Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 3D splines in After Effects

  • 3D splines in After Effects

    Posted by Sam Young on April 10, 2008 at 8:34 am

    3D Spline
    Overview: this technique will allow you to distribute any number of layers along the motion path of a designated 3D spline layer, and animate their distribution.

    1. Create a 3D layer named spline. Animate its position along a 3D motion path over its duration. Animate its z-rotation over its duration.
    2. Apply an expression control slider effect to the spline layer. Rename this effect distribute. Animate its value from 0 to 1 within the duration of the spline layer.
    3. Turn off the eyeball switch for the spline layer.
    4. Create a new 3D layer in this comp, stacked above the spline layer.
    5. Apply this expression to this layer’s position:

    i=index-1;
    p=thisComp.layer(“spline”).position;
    s=thisComp.layer(“spline”).effect(“distribute”)(“Slider”);
    q=thisComp.numLayers-1;
    n=thisComp.layer(“spline”).in_point;
    t=thisComp.layer(“spline”).out_point;
    d=(t-n)/q;
    e=d*i*s;
    p.valueAtTime(e)

    6. Finally, duplicate this layer several times.

    i defines the stacking order of the visible 3D layer, minus 1 so that the top layer remains unchanged
    p defines the position of the spline layer’s position
    s defines the value of the distribute slider
    q defines the number of layers in this comp, minus 1 (because we don’t want to count the spline layer)
    n defines the in-point of the spline layer
    t defines the out-point of the spline layer
    d takes the duration of the spline layer and divides it by the number of visible layers in the comp
    e takes d and multiplies it by i –– to create a correlation between each visible layer’s stacking order and a time along the spline layer’s duration –– and then multiplies it by s –– so that this correlation is animated over time
    p.valueAtTime(e) assigns the position of this layer to the position of the spline layer at time e.

    this could easily be modified so that the visible layers incrementally rotate on their z axis. animate the spline layer’s zRotation over its duration, then apply the expression to the visible layers’ zRotation. change the position to zRotation in the definition of p.

    Simon Roberts replied 18 years, 1 month ago 3 Members · 4 Replies
  • 4 Replies
  • Sebastian Martinez

    April 10, 2008 at 12:14 pm

    Hi Sam,

    erh, you replied to my post?

    [Expression for Camera Z-Rotation
    by Sebastian Martinez (seniormartinez) on Apr 10, 2008 at 10:11:15 am]

    Yours

    Sebastian Martinez

  • Sam Young

    April 10, 2008 at 4:50 pm

    no…. i posted my own thread……

  • Sebastian Martinez

    April 18, 2008 at 8:43 am

    Ah – but it is an interesting script!

    Ta,
    Sebastian

    Sebastian Martinez

  • Simon Roberts

    April 18, 2008 at 6:24 pm

    forgive my ignorance

    but could this be used to animate leaves falling from a tree (like in the autumn) in a 3d space? (cos that’s what i’m trying to do) …or would it look nothing like that

    thanks

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy