ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Randomly play a short animation within a composition

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tara Brewster
Randomly play a short animation within a composition
on Nov 25, 2016 at 5:02:36 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?


Return to posts index

Dave LaRonde
Re: Randomly play a short animation within a composition
on Nov 25, 2016 at 10:22:21 pm

A 20 minute comp? You are using AE the wrong way. It is used best to create individual shots. You would be better off rendering out the animtion, then using in an NLE.

Besides, AE's idea of "random" and YOUR idea of "random" almost certainly would not match.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Tara Brewster
Re: Randomly play a short animation within a composition
on Nov 26, 2016 at 1:50:23 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.


Return to posts index


Dave LaRonde
Re: Randomly play a short animation within a composition
on Nov 26, 2016 at 4:14:52 pm

Well, okay. You face a heckuva render time but apparently it's not a big deal.

I still think the sticking point is "random". If you got this to be truly random, I have five whole American bucks that say you'd think, "hey, I don't want it to happen there". No, I think you'd be better off adding the animation at points that YOU think are random. But it doesn't have to take forever. Here's how:
I'd import this 20-minute into Premiere where you can play the clip in real time. Then note the times where you want the animation to occur,write those times down, and then just add that 4-second animation at the desired time. The nice thing about figuring this in Premiere -- you can easily re-play stuff to find just the right time.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Roei Tzoref
Re: Randomly play a short animation within a composition
on Nov 26, 2016 at 5:15:35 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


Return to posts index

Griffin Englander
Re: Randomly play a short animation within a composition
on Nov 28, 2016 at 1:23:59 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


Return to posts index


Alexi Vanderstraeten
Re: Randomly play a short animation within a composition
on Nov 27, 2016 at 8:07:18 pm

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]