Forum Replies Created

  • Shannon Copfer Brace

    August 19, 2020 at 2:50 pm in reply to: Random change to specific color

    Hi Dan! Thank you again for your help this week and your super quick reply.

    Follow-up question: is there a way to get the object to end its wiggle in a specific pre-set position, rather than stopping wherever it is mid-wiggle at the end of the wiggle time frame? (e.g. I want the shapes to wiggle on their path until they get to their destination and then stop specifically into position).

  • Shannon Copfer Brace

    August 17, 2020 at 6:38 pm in reply to: Random change to specific color

    Wow! Thank you so much Dan for your fast reply; you were exactly right and while I wasn’t able to copy and paste them all at once it was still okay. It works! Thank you again!

  • Shannon Copfer Brace

    August 17, 2020 at 5:16 pm in reply to: Random change to specific color

    Hi there! SUPER beginner here trying to piece this together for a work project (my usual job is not motion graphics, and I haven’t used AE since 2009-ish, and it was for simple titles!). Thank you in advance for your patience.

    Dan, your code is clear. I have two questions:

    First, a very basic/stupid question: I have about 60 small layers/objects I’m animating, and I have their motion paths defined. I’d like to add in this color randomization for part of the animation. So question one is: Where do I put this code? Does it need to be placed on each layer?

    Second, I’m testing it on one layer and I’m getting an error both in legacy and in javascript expressions engine. The two (different ) error screenshots are below. Any ideas?
    – Legacy: 14272_screenshot20200817at12.58.44pm.png.zip
    – Javascript: 14273_screenshot20200817at12.59.02pm.png.zip

    Thank you so much for your help!

    colors = [60,64,131,255]/255,
    [45,162,213,255]/255,
    [130,191,156,255]/255,
    [221,222,226,255]/255];
    easeTime = .2;
    minDur = 1.5;
    maxDur = 2.5;
    seedRandom(index,true);
    segDur = random(minDur,maxDur);

    curSeg = Math.floor(time/segDur);
    t = time%segDur;
    seedRandom(curSeg,true);
    idx1 = Math.floor(random(colors.length));
    seedRandom(curSeg-1,true);
    idx0 = Math.floor(random(colors.length));
    ease(t,0,easeTime,colors[idx0],colors[idx1])

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