Forum Replies Created

Page 24 of 1081
  • A better idea might be to un-parent the car from the null and just use smooth() expressions to link the position and rotation to the null’s values.

  • It seems like you should be able to use smooth() to smooth out the parent’s rotation and position, subtract the parent’s actual rotation and position from that to create a delta, which you would then add to the child’s position/rotation. So I would think it would look like this (although I didn’t find any smooth parameters that worked very well):

    d = parent.position.smooth(.5,10) - parent.position;
    value + d;
  • As far as I know, for any layer type that has a source file (image, video, etc.), the source file has to be imported into the project bin before you can use it to create a layer in a comp’s timeline. Is that what you’re asking (if you can bypass the file importing and go directly to creating an image layer in the timeline)?

  • How is the car linked to the path now?

  • Dan Ebberts

    May 10, 2024 at 6:04 pm in reply to: loopOut(“offset”) As A Function?

    >I’m surprised, the >loopIn()/>loopOut() can’t be used as js methods, or can they?<

    loopIn() and loopOut() are methods of the property object, so you can use them in that way and actually apply them to properties other than the one hosting the expression and stick the result in a variable. For example, you could have a rotation expression like this:

    yLoop = position.loopOut()[1];
    yLoop - time*25

    but you can’t get loopOut() to process some arbitrary calculation you came up with in the same expression–it has to be attached to a property (defaulting to the property hosting the expression).

  • Dan Ebberts

    May 9, 2024 at 11:34 pm in reply to: Need help with After effects expressions

    I’m not sure, based on your description, but try this. Add an Opacity Animator to your text (set the Opacity value to 0). Then add an Expression Selector, and set its Amount property to this expression:

    f = timeToFrames(time);
    if (textIndex == f){
    50;
    }else if (textIndex < f){
    0;
    }else{
    100;
    }
  • Dan Ebberts

    May 9, 2024 at 8:22 pm in reply to: loopOut(“offset”) As A Function?

    I have no idea if this gets you any closer, but this is how you could turn loopOut(“offset”) into a callable function where you could specify the time:

    function loopOffset(theTime){
    if (numKeys > 1 && theTime > key(1).time){
    t1 = key(1).time;
    tn = key(numKeys).time;
    dt = tn - t1;
    v1 = key(1).value;
    vn = key(numKeys).value;
    dv = vn - v1;
    n = Math.floor((theTime - t1)/dt);
    t = (theTime - t1)%dt;
    return vn + (n-1)*dv + valueAtTime(t1 + t) - v1;
    }else{
    return value;
    }
    }
    f = timeToFrames(time);
    offset = -thisComp.frameDuration/2;
    if (f % 2){
    loopOffset(time + offset);
    }else{
    loopOffset(time);
    }
  • Dan Ebberts

    May 9, 2024 at 3:24 pm in reply to: loopOut(“offset”) As A Function?

    loopOut() ignores and overwrites anything you’ve done previously in the expression. However, you can create your own code that does what loopOut() does but applies it to something you’ve calculated. I might be able to help if I understood exactly what it is that you’re trying to do.

  • Dan Ebberts

    May 9, 2024 at 2:58 pm in reply to: sourceRecAtTime with variable sizes?

    Rather than referring to it by name, you could just refer to it as thisComp.layer(1). Would that work?

    r = thisComp.layer(1).sourceRectAtTime(time);
    x = r.width + 100;
    y = r.height + 100;
    [x, y]
  • Dan Ebberts

    May 8, 2024 at 1:42 pm in reply to: Struggling with if/else with color input

    When they changed AE’s JavaScript engine, it would no longer accept single-line if-else statements without the full curly bracket treatment, so I pretty much switched to the conditional (ternary) ? : operator, which is a kind of if-else shorthand.

Page 24 of 1081

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