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

Scripts that aid in inverse kinematics

From: 2D Character Animation with After Effects

Video: Scripts that aid in inverse kinematics

Now, I want to talk a little bit about inverse kinematics. Inverse kinematics is a system where, in animation, you can move an object like a hand, for example here, and the IK system, or inverse kinematics system, will work out the rotation and angles of all the pieces in between, say, the shoulder and the hand, so that you don't have to animate those individually. Now you can do certain amounts of faking IK using the techniques we've had a look at, where you use sliders and control errors and expressions.

Scripts that aid in inverse kinematics

Now, I want to talk a little bit about inverse kinematics. Inverse kinematics is a system where, in animation, you can move an object like a hand, for example here, and the IK system, or inverse kinematics system, will work out the rotation and angles of all the pieces in between, say, the shoulder and the hand, so that you don't have to animate those individually. Now you can do certain amounts of faking IK using the techniques we've had a look at, where you use sliders and control errors and expressions.

And if you're an expressions genius, however, like Dan Ebberts is and Brian Maffitt is, then you can write expressions that will completely create a reliable inverse kinematic system. And indeed they've done that, and they've very kindly provided it on the website here. So, it's a combination of work between Brian Maffitt, who originally designed the technique, and Dan Ebberts, who's used some of his fancy expressions to improve it. Now you can go to MotionScript.com and download those to apply to your layers. Now, another tool that I've discovered, which is absolutely amazing, is this tool here.

And so, it's called DuDuF IK tools for After Effects and you can download it free from this website. Now, I recommend if you download it that you do donate a little bit or at least give some feedback because this guy donates his software free and its good to support people that are creating software just for the love of it rather than to make money. So, once you download it, you can install it. And this is how you install it. Basically, you have a folder that contains the icons and the script GUI panels. What you need to do is go into the After Effects CS5 folder on your hard drive, and you need to take the contents of JUIC icons And place that into the script folder, so you can place that directly in the scripts folder.

And then open up the script UI panels, and you need to drag this into the script UI panels folder. Okay. And once you've done that, if you then open up After Effects, you should be able to access the controls that you want to access. Now, it installs in the form of a panel, so it's very easy to operate. And what I'm going to do is just open up a project, where we've taken advantage of this. And I'm going to show you very quickly how to use this script.

Okay, so I want you to go to 09IK and double-click that to open it. Now, this is the basic setup that you use for this. Now once you've installed this script, you should see this appear down at the bottom of the window panel. If you don't see that, you need to go to your After Effects > Preferences, which on the Mac will be in the After Effects menu, on PC it will be in the Edit menu and go to General. And you need to make sure that this is selected, Allow Scripts to Write Files and Access Network. And once you've clicked on that, you need to actually restart After affects. So, if you haven't done that already, restart After affects again, and then come back and join me.

Okay, so I'm presuming that you've now got that installed and you're ready to go. So, you should see at the bottom of this window menu, Duik.jsx, and I'm going to open that up. And you'll see it appears as a floating panel. Now, it's quite a big panel, so I'm just going to make that a bit smaller. And of course, it's like any other panel. I can drop it in beside the info panel here. Now the first thing that you need to do is set up your layer structure. And if we go down here, there's a really good tutorial online by a guy called, I think it's Steven Amos, his name? His pseudonym is Famos.

Famos. And he's on Vimeo and has some really great tutorials. In fact, they're on, if I remember correctly, they are on DuDuf's website. So, if you go to Tutorials in there, you'll see Famos' fantastic trading movies on DuDuf. Okay. So, in After Effects, I'm going to go to my Side panel Comp Workspace which I've set up. You could take a minute to set up one like this if you want.

I find it really useful for character animation cuz it means that I can have the timeline here and my character can still be fairly large over here. So, what we've done already is set up a parenting structure the way we normally would set it up. So, for example, the lower arm is connected to the upper arm. The upper arm is connected to the body. The body is connected to the hips. The boot is connected to the shin, which is connected to the thigh, which is connected to the hips.

So, the usual painting structure that you would expect. Once you've done that, then what you do is you select the body parts, for example, the boot, and then with the panel open, which is this one here, and this is the installed Duik.jsx Palette I'm opening again. And I'm just going to drag it again into the info panel. Now, because I reset my workspace, I've lost all the set up that I had earlier, but there we go. And basically, with that selected, you just click on Controller. And it will create a null for you, named after boot one, and you just go through creating Controllers for the different body parts. Now, I've done that already.

So, I am going to delete that and I'm going to hit the Shy button and show you my Controllers that have already been created. So, one each for the boots, one each for the lower arms. If you've got hands, it would be the hands. But I've only got upper arms and lower arms. You can either create a three-way IK rig or a two-way IK rig and my arms have only got two parts, upper and lower, whereas, the legs have got three. They've got the boot, the shin and the upper leg. Okay, you also creates ones for the hips, the body and the head.

And then, create a master controller which can be used to move the whole body backwards and forwards, or indeed in any other way. So, the next thing you need to do, is set up a parenting structure for these. So, the head, the controller head, is connected to the controller body. Okay. The body is connected to the master controller, so whatever that moves, it follows, as are the boots. The lower arms are connected to the body as well. And this is how to set it up. Once you've set it up, it's a process of creating the IK. And this is how you do it.

So, if I want to do it for one of the legs, for example. Now, the moment, if I adjust that boot position value just to preview nothing is happening at the moment, you'll see nothing happens, if I select boot 2 and then I need to go in the order which they would go in the chain. So, if he go to the boot, to the shin, to the thigh, and then to the Controller. And this is how easy it is. I click on IK creation. And now, if I bring up the position value of the boot, and adjust the boot, you'll notice the leg bends correctly. So, it's absolutely amazing just being able to do that. So, let's go down again, boot 1, shin 1, and thigh 1, and boot 1, IK creation. And now we have boot 1 also being controlled by the null. Okay? And then we'll do the same for the hands. So, we'll select our lower arm 1, upper arm 1 and lower arm 1 Controller, IK. And now, if I move the lower arm position value, you'll see it controls either it works and bends.

And of course, you can use the control layer to control all of these as well. Now, if you have a look at term IK end, you'll see the controllers are in full action there. So, if I just open up the position values of all of these. So, lets choose the body and we can start to see what happens when we make adjustments to them. So, if I adjust the body I can make him jump up and down like that quite easily. So, let's do a little jump. So, I'll set a keyframe for position and then let's move ahead a little bit in time and we'll just make him bend down a little bit and then spring up in the air and then back down.

And as he comes back down his knees bend a little bit before he settles. Okay. Now, the timings probably completely wrong on that, but there you get an idea of how easy it is to create something like a jump, just with a few keyframes. Now it's a really cute set of expressions and scripting. Really, really clever. And I really recommend that you play with that cuz it will really help you. And it's really good to support these plugin developers and software developers.

They're really pushing the software forward.

Show transcript

This video is part of

Image for 2D Character Animation with After Effects
2D Character Animation with After Effects

27 video lessons · 3315 viewers

Angie Taylor
Author

 

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 2D Character Animation with 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 preferences from 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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

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.