ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Question on Random Position Expressions

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hoku Uchiyama
Question on Random Position Expressions
on Jul 14, 2020 at 12:53:17 am

Hey all,

I’m looking for an expression that changes the x,y position (within a specific range) of a layer randomly. However I’d like the changes to happen at random intervals, rather than happening once every frame, or once every five frames. Ideally I can set a range, say between 1-5 frames, so sometimes the position shifts a frame after the last shift. And other times the position takes 5 frames to shift again.

Currently, the only expression code I have is pasted below.

However, the interval here is fixed and not random (I believe). Does anyone have a better solution?


holdFrames = 4;
seed = Math.floor(timeToFrames(time)/holdFrames);

Return to posts index

Filip Vandueren
Re: Question on Random Position Expressions
on Jul 15, 2020 at 3:07:33 pm

A thread from 13 years ago pointed to this tutorial form 15 years ago ☺

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved