So you want to make things twitch around but hate having to keyframe? Enjoy saving some sweet time with this expression tutorial series.
Part 6 of 6 of the Twitch Expression in Adobe After Effects. You can use this in any version of after effects so long as you can write expressions. If you follow all the steps though I’m sure you can do it.
If you’re finding this one too hard check out part 1 and go from there.
If this is too easy for you check you… none, this one is really as hard as it gets.
Youtube won’t allow the characters in the expression so… not totally sure how to get you the expression if you need it. But if you pause and look at it you should be able to get it. Any also typing is fun right?
Thanks for watching in have a nice day.
www.EvanAbrams.com
www.twitter.com/ecabrams
source
Thanks for much for these tutorials. I'm new to AE and I probably owe about 85% of my knowledge to you.
I tweaked your expression so that it simultaneously effects the "y" direction half as often as it effects the "x", and only moves the layer one-fourth the distance compared to "x", and I was kind of surprised when it worked 🙂
r=random(0,100);
a=effect("Slider Control")("Slider")
p=effect("Slider Control 2")("Slider")
if (r < p) {x=value[0]+random(-a,a);}else{x=value[0];}
if ((r*2) < p) {y=value[0]+random((-a/4),(a/4));}else{y=value[0];}
[x,y]
Well, Done! Shows how it and Why it Works! Thank You!
what should I do if I don't have amount and probability controls amongst my expression controlers in ae??
Sorry if this was already asked, but is it possible to add z space to this expression? Is it just as simple as adding a Z variable and making it a 3d layer?
can you control 'when' the twitching starts and stops?
Amazing tut, man. Thank you. So i walked Thru this entire thing. Well crawled through it and i'm proud as shit. It cost 45$ to buy the twitch package. One question… Can you add color to this? I was going to try but i didn't want to destroy anything. You can refer to videocopilot twitch tosee what i mean. Thank, man.
Cheers man! Picked up AE for the first time a day ago so explaining this has been extremely useful.
Awesome tutorial. Now am a step closer to understanding and mastering expressions. Thanks a milli
This should be the correct if statement:
if (r > p) {x=value[0]+random(-a,a);}else{x=value[0];}
Thank you so much for the time you take to make these tutorials, I watched the video where you stated you have been doing this for > 10 years. My only problem now is wondering if i will make it to 74, to hopefully be proficient. Thanks Again
i belive so. i created two sliders, named them appropriately and then pic wipped a and p to their respective sliders
okay, do you have effects that are called "amount" and "probability" for it to link to?
this is what i have typed in
r=random(0,100);
a=effect("amount")("Slider");
p=effect("probability")("Slider");
if (r > p) {x=value[0]+random(-a,a);}else{x=value[0];}
x=value[0];
y=value[1];
[x,y]
i have been staring at it forever trying to see whats wrong but it all looks right to me. the problem is the text i applied it to is just staying still, not responding
These are great, you're awesome! Thanks so much!
Excellent tutorials. I'm a career programmer, but have just started learning Ae, and you make it just SO easy. The way you describe the coding is some of the best I've heard to make it understandable to non-programmers. Kudos, eh? 😉
no worries. Enjoy.
Thank you so much! I looked forever, and as soon as you said that it all makes sense! You're the best!
Look at the brackets. Are there any that are closed that have no opens? I'm seeing one } with no matching { on the else string. Remember brackets are for separating and couching things. so and ( will count everything till it sees a ) and every [ will count till a ] and same for { and }.So the error line isn't always intuitive for you. Try putting in { after "else" instead of the [ that you have.
By the way, it is in this line:
if (r > p) {x=value[0]+random(-a,a);}else[x=value[0];}
Could you copy and paste the expression here? I typed it in exactly how you have it and have multiple times, so i obviously have a mistake. It says I missed a "]" but i cannot find any that you have that I don't…
Thanks for this..All I'm trying to do is slooowly bounce a cloud up and down – somehow tailoring this expression. But I feel slooow myself.
no worries, today I ate an unripe mango that turned out to be a really bad potato, so we all make mistakes.
I am a fool! Thanks!
Those are just sliders. I renamed them
I don't have the "probability" or "amount" effects. Is there a download for them somewhere?
Well thanks for saying so. It's pretty simple for me to sit and blah blah blah so I tend to feel I'm overdoing it some times. But if it helps I'll try to keep it up. 🙂 cheers and have a good one.
It's not too much talking. It's a perfect amount. When I go back to other tutorials after watching yours, I appreciate anew the clarity and the amount of information you're able to communicate. Thank you for these tutorials.
I've been working with After Effects for quite some time now, but I haven't really used expression a lot, except for the time expression that is. But I am wondering something, if I am going to use expressions as well in the future, what huge advantage will that give me besides not using expressions? And how did you put the RAM preview on automatic, whenever you change something in the comp, the ramp preview seems to load automaticly, is this a plug-in or an option I am not aware of? Peace
You're more entertaining than you give yourself credit for! Although now that you know that, it'll be gone. Sorry.
Well hopefully the payoff is worth it for folks. It is a lengthy amount of blah bitty blah blah from me to suffer through.
This has taught me something about expressions and I feel very accomplished! Seriously, great series, with a very nice build up towards the end.
Depends, what looks different to you? I tweak my interface to brighter greys than most people but you can change it as you please.
Is this an older version of After Effects? Or have they changed the style of AE CS6?
thank you Evan! awesome tut! i really need to learn more about expressions, feel like it's over my head, but i'll try to learn them