Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

The basics of expressions: Controlling the wrist

From: Creating Animated Characters in After Effects

Video: The basics of expressions: Controlling the wrist

The next step in automating your character rig is to use expressions. Now, expressions are basically a way to program After Effects. It uses JavaScript, and let's just get our feet wet in expression, so I can show you how to create them, and how to do some basic tasks. In this case, we're going to animate the cuff of the character. Let me show you what I mean here. So I'm going to go ahead and zoom into his hand, and I'm just going to select my Rotate tool here. You notice when I rotate this hand, right here, once it hits the cuff, it kind of gets it to a condition where it doesn't look quite right.

The basics of expressions: Controlling the wrist

The next step in automating your character rig is to use expressions. Now, expressions are basically a way to program After Effects. It uses JavaScript, and let's just get our feet wet in expression, so I can show you how to create them, and how to do some basic tasks. In this case, we're going to animate the cuff of the character. Let me show you what I mean here. So I'm going to go ahead and zoom into his hand, and I'm just going to select my Rotate tool here. You notice when I rotate this hand, right here, once it hits the cuff, it kind of gets it to a condition where it doesn't look quite right.

The cuff is basically cutting into the hand, both on this side and on that side. Now in the real world, that cuff would kind of flex; it would tend to move along with the wrist. Now we can do that easily just by animating the hand, and then grabbing the wrist and animating that. Basically, what you want to do is rotate the wrist here, then rotate the hand, and as you can see, it gets very, very, very complicated, and it's not an easy way to animate. So the better way to do this is to automate the cuff so it matches the rotation of the hand.

That way you don't have to animate two things, and it's automated. So the first thing we want to do is create what's called an expression. So I'm going to go ahead and select my Left Cuff and open that up, and you'll notice we have a Rotation field here. And what I want to do is insert what's called an expression. So I'm going to highlight Rotation, and then under Animation > Add Expression. What this does is it creates an Expression for Rotation.

And we have a couple of buttons here; one is to enable or disable the expression; obviously we want to enable it. We can also show a graph. This here is basically a Pick Whip, it's very similar to the Pick Whip you use with hierarchies, and we actually are going to be using this. And then over here, we actually have an expression. So the expression is basically text, and we'll get into syntax a little bit, but let's just do a very, very simple expression at first. What I want to do is tie the rotation of this, the Cuff, to the rotation of the Hand.

So let's go ahead and open up the Hand here, and you'll see that we have a Rotation field. I am going to go ahead and give myself a little more room here. So you'll see that the rotation here on the Cuff is controlled by an expression, and the rotation on the Hand is actually animated, or controlled by the animator. So what I'm going to do is select the Pick Whip on the Cuff, and you can see I can drag that to any value, but I want to drag it to the Hand Rotation value. And watch what happens when I do that; this value changes.

So let me read you what this says, and I'll give you a little bit of insight into what's going on here. First of all, it says thisComp, which is this composition, so we're using Gus_All, and then the layer called LEFT HAND, which is this layer, and then we want to look at transform.rotation, which means Rotation. So basically, I'm taking rotation from the Hand layer in this composition, and using that to create this rotation. So if I go into the rotation of this Hand, you'll see that now what happens is this follows along.

So if I rotate the Hand, say, 10 degrees, you'll notice here Rotation in the Cuff is also at 10 degrees. You notice how it's also in red, and that just tells you that it's being driven by something else. As you can see, I can rotate my wrist up or down without the cuff cutting into the hand, and this can be very, very handy. Now another thing we can do is we can take this value here, and we can change it. So right now, I have this working at a 1:1 ratio. If I rotate this 10 degrees, or 11 degrees, the cuff will also rotate at 11 degrees, but maybe I don't want it to rotate exactly with the hand; maybe I only want it to rotate half as fast.

So I can change that simply by taking this expression and adding a mathematical term to that. Now don't get scared; all I'm going to do is divide by 2. So I'm just going to hit the slash and 2. So basically the value that we have here is going to be this value over 2; in other words, half of whatever the hand is giving it. If I rotate the Hand to 10 degrees, let's just type in the number 10 here, you'll see that the rotation of the cuff is only 5 degrees.

So now it's rotating a little bit less, so that's actually just a gentle rotation. So I'm basically kind of reducing the effect of the hand rotation. If I want, I can divide by a larger number to get less of an effect, or I can go the opposite way, and multiply. So if I multiply by 2, it will rotate twice as fast as the hand is moving. These are some of the basics of just setting up an expression, and you can start to see how this can be very valuable. Once you really get into it, it can really help to automate, and make your characters much easier to animate.

Show transcript

This video is part of

Image for Creating Animated Characters in After Effects
Creating Animated Characters in After Effects

46 video lessons · 15578 viewers

George Maestri
Author

 
Expand all | Collapse all
  1. 1m 49s
    1. Welcome
      1m 17s
    2. Using the exercise files
      32s
  2. 27m 15s
    1. Creating characters in Illustrator
      5m 51s
    2. Creating characters in Photoshop
      7m 9s
    3. Designing joints
      3m 40s
    4. Drawing mouths
      2m 12s
    5. Drawing hands and eyelids
      2m 48s
    6. Importing Illustrator files into After Effects
      3m 26s
    7. Importing Photoshop files into After Effects
      2m 9s
  3. 7m 51s
    1. Drawing in After Effects
      3m 57s
    2. Copying paths from Illustrator
      2m 19s
    3. Animating shapes
      1m 35s
  4. 21m 9s
    1. Understanding how layer hierarchies work
      3m 58s
    2. Understanding the importance of the pivot point
      5m 42s
    3. Assembling the upper body
      4m 47s
    4. Creating leg hierarchies for efficient walks
      4m 27s
    5. Organizing scenes with null layers
      2m 15s
  5. 22m 26s
    1. Adding puppet pins to a character
      6m 51s
    2. Controlling mesh density
      2m 15s
    3. Creating overlap pins
      4m 43s
    4. Creating starch pins
      3m 1s
    5. Using the Puppet tool with hierarchies
      5m 36s
  6. 19m 7s
    1. Replacement animation using time remapping
      6m 47s
    2. Mouth replacement
      6m 6s
    3. Creating blinks
      6m 14s
  7. 27m 23s
    1. Creating a head turn: Head shape
      6m 45s
    2. Creating a head turn: Ears
      8m 7s
    3. Creating a head turn: Facial features
      6m 41s
    4. Creating a head turn: Hair shape
      5m 50s
  8. 1h 3m
    1. The basics of expressions: Controlling the wrist
      5m 20s
    2. Moving hands from front to back with expressions
      9m 2s
    3. Using expressions to control pupils
      7m 44s
    4. Creating a master control node with Expression Controls
      6m 30s
    5. Creating blinks that move with a head turn
      9m 28s
    6. Controlling blinks using opacity
      6m 34s
    7. Attaching mouth shapes to a slider
      3m 39s
    8. Creating mouths that move with a head turn
      8m 31s
    9. Working with absolute values
      6m 12s
  9. 14m 28s
    1. Setting up null objects as bones
      5m 39s
    2. Attaching puppet pins to bones
      4m 57s
    3. Strategies for parenting legs and feet
      3m 52s
  10. 28m 32s
    1. Setting up a scene for animation
      6m 3s
    2. Blocking out the shot
      11m 0s
    3. Animating dialogue
      5m 39s
    4. Animating blinks
      5m 50s
  11. 18s
    1. Goodbye
      18s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating Animated Characters in After Effects.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.