ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Bringing a Vector Bird to Life with Expressions and Randomness

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
wyclef chronBringing a Vector Bird to Life with Expressions and Randomness
by on Nov 21, 2014 at 12:08:01 am

Hello, I'm somewhat familiar working with AE however expressions is a new thing for me. I'm interested in having a simple vector bird that's made up of very crude, one color flat pieces... a body, a wing, an eye, maybe a beak, maybe a tail piece and then having multiple of these birds on tree branches. I would like to randomly animate some of the features like... the eye blinks once and awhile... or the tail piece pivots up... or the entire bird flips horizontally. Just very basic bird characteristics that could use randomness to bring 6-8 of them to life without having to manually animate every feature. I am wondering if someone could advise me on how to approach this. I am thinking that I would need to make a composition for each piece and then assign some type of random expression to the individual components, then pull them altogether to form one bird? Does anyone have any example expressions to get me started?

Return to posts index

Tudor "Ted" JelescuRe: Bringing a Vector Bird to Life with Expressions and Randomness
by on Nov 21, 2014 at 9:44:37 am

You don't really need expressions for this. You can animate one bird in a 3-5 second loop, render out with alpha or precomp and then duplicate and offset (flip, reposition and/or scale) the layer.

Tudor "Ted" Jelescu
Senior VFX Artist

Return to posts index

wyclef chronRe: Bringing a Vector Bird to Life with Expressions and Randomness
by on Nov 21, 2014 at 3:16:27 pm

That kind of makes sense. But what about something like an eye blink. Won't it get a little tedious if there are 12 birds and I want some sense of random eye blinking to have to manually do that? Plus I don't necessarily want all the characteristics to be synced up to the same loop even if I offset them in the timeline. I think I can probably simplify my needs here and do some of what you are saying like, flip & reposition... the piece is short enough where I could just do that manually but say... eye blink & bird tail pivot, and maybe beak open close... I think those would be best randomized.

Return to posts index

Kevin CampRe: Bringing a Vector Bird to Life with Expressions and Randomness
by on Nov 21, 2014 at 9:21:13 pm

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);

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

Return to posts index

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