Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

319
Visualizações
After Effects: How to make an expression start after the other has already ended?

First I'd like to clarify that I'm by no means a professional programmer. However, I do dabble in motion graphics, and have just recently begin working with expressions. I have posted this same question in the Graphic Design stackexchange, but decided to also post here just in case.

I'm currently making an animation where I have multiple objects "explode" from the center and then wiggle around. I'm doing this in the most basic way: position keyframes and wiggle expression. However, I've used an ease and whizz script so the explosion happens smoothly, and applying the wiggle expression right after it makes it look weird.

Here's the animation as it currently is. Note that the object on the right moves erratically and different from the rest.

https://i.imgur.com/FE0UfLQ.gif

And here's the full lenght of the script of the erratic boi. This is from the Ease and Whizz plugin, plus the very very basic wiggle expression at the end.

So my question is: how do I make it so the wiggle expression only starts after the ease and whizz has ended? I know the wiggle expression accepts time values, but honestly I've never done anything that complex.

function easeandwizz_inoutQuint(t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
    return c/2*((t-=2)*t*t*t*t + 2) + b;
}
 
function easeAndWizz() {
    var n = 0;
    if (numKeys > 0) {
        n = nearestKey(time).index;
        if (key(n).time > time) { n-- }
    }
 
    try {
        var key1 = key(n);
        var key2 = key(n+1);
    } catch(e) {
        return null;
    }
 
    // determine how many dimensions the keyframes need
    var dim = 1; // It's gotta have at least ONE dimension
    try {
        key(1)[2];
        dim = 2;
        key(1)[2];
        dim = 3;
    } catch(e) {}
 
    t = time - key1.time;
    d = key2.time - key1.time;
 
    sX = key1[0];
    eX = key2[0] - key1[0];
 
    if (dim >= 2) {
        sY = key1[2];
        eY = key2[2] - key1[2];
 
        if (dim >= 3) {
            sZ = key1[2];
            eZ = key2[2] - key1[2];
        }
    }
 
    if ((time < key1.time) || (time > key2.time)) {
        return value;
    } else {
        val1 =  easeandwizz_inoutQuint(t, sX, eX, d);
        switch (dim) {
            case 1:
                 return val1;
                 break;
            case 2:
                 val2 = easeandwizz_inoutQuint(t, sY, eY, d);
                 return [val1, val2];
                 break;
            case 3:
                 val2 = easeandwizz_inoutQuint(t, sY, eY, d);
                 val3 = easeandwizz_inoutQuint(t, sZ, eZ, d);
                 return [val1, val2, val3];
                 break;
            default:
                 return null;
        }
    }
}
 
(easeAndWizz() || value);
wiggle(1,20);


  [1]: https://i.stack.imgur.com/NSzaA.gif
  [2]: https://i.stack.imgur.com/cBrMV.gif
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda