there are a lot of ways to animate some of the things you mention… eyes blinking could be a simple opacity change, y-scale change, linear wipe or some other effects…. all of which could use a different approach to utilize randomizing expressions, but you could try an expression like this to create a randomized loop of any animated property:
probability = 10; // value as percentage
seed = 0;
if (numKeys>1){
dur = key(numKeys).time-key(1).time;
n = Math.floor(time/dur);
seedRandom(n+seed,true);
valueAtTime(time%dur*Math.ceil(probability/100-random()));
}else
value;
it won’t randomize the values, but it will randomize when and how often to play the animation based on the probability value — 0 = never play; 50 = play half the time; 100 = always play (or loop continuously), etc…
so you could animate the eyes blinking with a linear wipe effect going from 0 to 100 over a few frames, hold for 10 frames, and then go back to 0 by frame 15. the expression will play that 15 frame animation based on the probability value. a value of 10 would play the animation 10% of the time, at random intervals.
you could animate the tail rotation to go from 0 to 10 degrees, hold for 3 seconds and then back to 0 and the expression will pick random times to play that 3 second loop.
however, it would not assign random values to rotate the tail, like first time rotate 10 degrees, next time 3 degrees, etc…
if needed, you can change the seed value to change the random seed… useful if you want to duplicate the bird comp and want different random values, but the same probability and animation values.
note that an animation in a precomp (even a randomized animation) will always be the same, so if you duplicate the nested comp within another comp the animation will be exactly the same. the solution for that is to either duplicate the precomp (within the prject window) and modify the seed value for each expression, or to have the duration of the precomp be much longer than needed, and you offset the nested comps in time within the main comp. I’d probably go the longer duration route (mainly because it’s easier) but you could do either.
Kevin Camp
Art Director
KCPQ, KZJO & KRCW