Forum Replies Created

Page 46 of 1081
  • Dan Ebberts

    June 2, 2023 at 6:32 pm in reply to: Eye-Blink Expression

    The minSeg expression is supposed to be applied to a slider. What property did you apply it to?

  • Dan Ebberts

    May 30, 2023 at 4:54 pm in reply to: Speed Control for animated comp or gif.

    It will be tricky. First, you’ll have to figure out how to identify that a turn is happening. Then, as explained in the article, to adjust the speed, you’ll have to manipulate the 5th wiggle parameter (time). Also, if the ant actually stops at some point, it will probably mess up your auto orientation.

  • Dan Ebberts

    May 28, 2023 at 9:23 pm in reply to: Eye-Blink Expression

    Hmmm. Ok. Since there’s a random component, it sounds like you need the randomizing part in a separate expression with the result “published” for both the flash and sound expressions to use. I’m still not clear on how you have this set up, so I’m going to describe how I’d do this for one flash layer and one sound layer. I’d create a null layer named “Control”, add a slider to it, and add this expression to the slider:

    minSeg = 2.0;
    maxSeg = 5.0;
    seedRandom(index,true)
    segStartTime = -random(minSeg,maxSeg);
    segEndTime = segStartTime;
    i = 1;
    while (time >= segEndTime){
    i += 1;
    seedRandom(i,true);
    segStartTime = segEndTime;
    segEndTime = segEndTime + random(minSeg,maxSeg);
    }
    segStartTime

    This calculates and publishes the randomized segStartTime. Then your flash expression becomes:

    blinkDur = .25;
    fadeTime = .1;
    segStartTime = thisComp.layer("Control").effect("Slider Control")("Slider");
    if (time < segStartTime + blinkDur/2)
    easeOut(time,segStartTime,segStartTime+fadeTime,0,100)
    else
    easeIn(time,segStartTime+blinkDur-fadeTime,segStartTime+blinkDur,100,0)

    You would turn on time remapping for your sound, drag the right edge so the layer duration matches the comp, and add this time remapping expression:

    segStartTime = thisComp.layer("Control").effect("Slider Control")("Slider");
    Math.max(time - segStartTime, 0)

    That should sync the sound to the flash.

    Now you mention 1000+ entries and I’m not sure if that implies 1000+ control layers and 1000+ sound layers or not. If so, then maybe this isn’t of much help to you. I’m hoping you can adapt this to your situation somehow though.

  • Dan Ebberts

    May 28, 2023 at 3:11 pm in reply to: Speed Control for animated comp or gif.
  • Dan Ebberts

    May 27, 2023 at 12:40 am in reply to: Eye-Blink Expression

    Which version of the expression are you using? If you have it set up to run periodically rather than randomly, there’s probably a simpler solution.

  • Dan Ebberts

    May 25, 2023 at 6:47 pm in reply to: Adding a clamp to sourceRectAtTime?

    Something like this maybe:

    minH = 10;
    h = thisComp.layer("NAME").sourceRectAtTime(time,false).height;
    w = thisComp.layer("NAME").sourceRectAtTime(time,false).width;
    [w,Math.max(h,minH)]
  • Dan Ebberts

    May 22, 2023 at 3:48 pm in reply to: Change color per character of text

    It seems to work fine if you follow all the steps described by Andrei. In what way is it not working for you?

  • Dan Ebberts

    May 17, 2023 at 11:42 pm in reply to: Shape length

    If you know the diameter (or can get it sourceRectAtTime()) it’s just

    diameter*Math.PI

    If it’s a path, you can approximate the length by using pointOnPath() to chop the path into a bunch of tiny pieces and summing their lengths together, like this:

    path = content("Circle").content("Path 1").path;
    numPts = 100;
    accum = 0;
    for (i = 0; i <= numPts; i++){
    if (i == 0){
    p1 = path.pointOnPath(0);
    }else{
    p0 = p1;
    p1 = path.pointOnPath(i/numPts);
    accum += length(p0,p1);
    }
    }
    accum
  • Dan Ebberts

    May 14, 2023 at 2:12 pm in reply to: Define Global Scale Range Using Markers

    I guess you could combine it with the offset element from your first expression:

    t = thisComp.layer("template");
    offset = (t.effect("offset")("Slider")/100)*(index -1);
    tScale = .2;
    m = thisComp.layer("control").marker;
    tMin = m.key(1).time+offset;
    tMax = m.key(2).time+offset;
    if (time < (tMin+tMax)/2)
    s = linear(time,tMin,tMin+tScale,0,50)
    else
    s = linear(time,tMax,tMax+tScale,50,0);
    value + [s,s]
  • Dan Ebberts

    May 13, 2023 at 7:33 pm in reply to: Define Global Scale Range Using Markers

    I think something like this does what you’re describing, but it will affect each follower at the same time, so I don’t think it’s the solution you’re looking for.

    tScale = .2;
    m = thisComp.layer("control").marker;
    tMin = m.key(1).time;
    tMax = m.key(2).time;
    if (time < (tMin+tMax)/2)
    s = linear(time,tMin,tMin+tScale,0,50)
    else
    s = linear(time,tMax,tMax+tScale,50,0);
    value + [s,s]
Page 46 of 1081

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