Twitch Expression (Part 6) – Adobe After Effects Tutorial



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

34 comments

  • Gaytheist Ape 3 years ago

    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]

    Reply
  • William Wolfe 3 years ago

    Well, Done!  Shows how it and Why it Works! Thank You!

    Reply
  • Martin Bajsić 3 years ago

    what should I do if I don't have amount and probability controls amongst my expression controlers in ae??

    Reply
  • Andrew Lomenzo 3 years ago

    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?

    Reply
  • SketchTV 3 years ago

    can you control 'when' the twitching starts and stops?

    Reply
  • Richard King 3 years ago

    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.

    Reply
  • BoomBox Unicorn 3 years ago

    Cheers man! Picked up AE for the first time a day ago so explaining this has been extremely useful.

    Reply
  • Marvin Mbugua 3 years ago

    Awesome tutorial. Now am a step closer to understanding and mastering expressions. Thanks a milli

    Reply
  • Al Lemieux 3 years ago

    This should be the correct if statement:

    if (r > p) {x=value[0]+random(-a,a);}else{x=value[0];}

    Reply
  • J Catara 3 years ago

    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

    Reply
  • Stephen Caserta 3 years ago

    i belive so. i created two sliders, named them appropriately and then pic wipped a and p to their respective sliders

    Reply
  • ECAbrams 3 years ago

    okay, do you have effects that are called "amount" and "probability" for it to link to?

    Reply
  • Stephen Caserta 3 years ago

    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

    Reply
  • Alina Rancier 3 years ago

    These are great, you're awesome! Thanks so much!

    Reply
  • Shane Taylor 3 years ago

    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? 😉

    Reply
  • ECAbrams 3 years ago

    no worries. Enjoy.

    Reply
  • Sam Harper 3 years ago

    Thank you so much! I looked forever, and as soon as you said that it all makes sense! You're the best!

    Reply
  • ECAbrams 3 years ago

    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.

    Reply
  • Sam Harper 3 years ago

    By the way, it is in this line:
    if (r > p) {x=value[0]+random(-a,a);}else[x=value[0];}

    Reply
  • Sam Harper 3 years ago

    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…

    Reply
  • TheNslaughter 3 years ago

    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.

    Reply
  • ECAbrams 3 years ago

    no worries, today I ate an unripe mango that turned out to be a really bad potato, so we all make mistakes.

    Reply
  • Dillon Deitz 3 years ago

    I am a fool! Thanks!

    Reply
  • ECAbrams 3 years ago

    Those are just sliders. I renamed them

    Reply
  • Dillon Deitz 3 years ago

    I don't have the "probability" or "amount" effects. Is there a download for them somewhere?

    Reply
  • ECAbrams 3 years ago

    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.

    Reply
  • Ben Israel 3 years ago

    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.

    Reply
  • Shane Keizer 3 years ago

    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

    Reply
  • Flavio Trillo 3 years ago

    You're more entertaining than you give yourself credit for! Although now that you know that, it'll be gone. Sorry.

    Reply
  • ECAbrams 3 years ago

    Well hopefully the payoff is worth it for folks. It is a lengthy amount of blah bitty blah blah from me to suffer through.

    Reply
  • Flavio Trillo 3 years ago

    This has taught me something about expressions and I feel very accomplished! Seriously, great series, with a very nice build up towards the end.

    Reply
  • ECAbrams 3 years ago

    Depends, what looks different to you? I tweak my interface to brighter greys than most people but you can change it as you please.

    Reply
  • MrPotatoMadness 3 years ago

    Is this an older version of After Effects? Or have they changed the style of AE CS6?

    Reply
  • JohnyFive ; Shorts 3 years ago

    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

    Reply

Add your comment

Your email address will not be published.