Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Randomly play a short animation within a composition

  • Randomly play a short animation within a composition

    Posted by Tara Brewster on November 25, 2016 at 5:02 pm

    I have a 4 second composition that involves a position and transparency change that I want to play randomly every few minutes within another 20 minute composition. I feel like there is probably a simple expression or way I can achieve this without keyframing it out but so far have not been able to find anything on youtube or by googling. Help?

    Griffin Englander replied 9 years, 5 months ago 4 Members · 4 Replies
  • 4 Replies
  • Tara Brewster

    November 26, 2016 at 1:50 pm

    It’s a 20 minute 2D animation framed in a single location (i.e. shot), so if I can use something like Premier to create it then I am clearly out of my depth. But regardless, I need to finish it, so whether it is the right tool or not at this stage is sort of irrelevant. I’m also aware that the program doesn’t know what I mean by ‘random,’ which is also part of my problem and hence why I posted on this forum. Obviously I am not an expert, I am looking for help.

    My original thought was to just make the first comp 20 or so seconds, then time lapse it and loop out within the main comp, but I don’t want the short animation to occur like clockwork every 20 seconds; I wanted it to play every 10 and then maybe 30 more then 15 more then 25 more, etc. If anyone has a suggestion other than just setting up keyframes I’d appreciate it.

  • Roei Tzoref

    November 26, 2016 at 5:15 pm

    I recommend you try posting here: https://forums.creativecow.net/adobe_after_effects_expressions. we got Dan who is the mastermind of expressions and I am sure there is an expression for you. goodluck

    Roei Tzoref
    After Effects Artist & Instructor
    ♫ Ae Blues Tutorials

  • Alexi Vanderstraeten

    November 27, 2016 at 8:07 pm

    You could also set it to happen every 20 seconds then adapt it by removing and moving some manually afterward.

  • Griffin Englander

    November 28, 2016 at 1:23 am

    If your keyframes are on your layer in your 20 minute comp, and your layers run for the length of said comp, you can keyframe the opacity/position of one with this expression in both properties;

    maxOffset = 250; // frames
    seedRandom(index,true);
    offset = framesToTime(random(maxOffset));
    valueAtTime(time-offset)

    Though you could get double ups and it will get messy.

    If this animation is something that can sit over the top of your comp, I’d render one instance of it out, along with your final 20 minute comp(without your 4sec comp over it), and randomly place it over the top in Premier. You don’t want to have to re-render something that big if something’s in the wrong spot.

    Hope this makes sense,

    Good luck

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