Results 1 to 16 of 16
  1. #1
    Member Duoas's Avatar
    Join Date
    Dec 2004
    Location
    Cherry Hill, NJ
    Posts
    1,829

    Action Constraints tutorial made easy

    This tutorial has been updated.

    After so many years I will soon loose all data hotlinked to my Rutgers University account, meaning this tutorial will soon be gutted.

    The new tutorial is at:
    http://home.comcast.net/~michaelthomasgreer/blender/ActionConstraintsMadeEasy/

    Please give me feedback!


    The original tutorial starts here:

    Action Constraints are a powerful animation feature in Blender. However, I've not come across anything that directly addresses the issue of making and using action constraints. Nozzy's famous rig makes use of them, but it is a fairly advanced setup for the newbie. This tutorial aims to strip out everything but the topic at hand...


    [color=orange]Objective[/color]

    We will tackle animating a spine. Those of you who have tried to do this with IK notice it is very difficult to control that way, and introduces "jumpy" behavior whenever the spine is nearly straight.

    Instead, we'll construct our spine without IK solvers and manipulate it with action constraints. This will give exacting control on exactly how the spine bends.


    [color=orange]Assemble your mesh, armature, and views[/color]

    Here is one of those handsome fellas from MakeHuman 1.8, with an elementary rig. I purposefully left the arms off in order to unclutter this tutorial.


    I've highlighted here the bones we're interested in. The Sway Spine bone is the one we will use to control the curvature of the spine when we're done. For now, however, we'll ignore it.

    Once you're done setting up your armature, assigning weights, etc., switch over to Pose Mode (Ctrl-Tab).


    [color=orange]Action Editor[/color]

    Open up the Action Editor and add a new action block:


    One thing to note is that whenever you add a new action it automatically makes a duplicate of the current action. For this, and one other reason we will make note of shortly, let's add another new action.

    The action name should now read "Action.001"


    Change it to "Sway Spine"

    It is not required to have a name matching any bone (or anything else in Blender) --you could have named it "fooey kablooey". My preference is simply to name the actions --and the bones that control them-- as descriptively as possible. For me that means that they'll have the same name.


    [color=orange]Adding the first key[/color]

    Adding an action is just like normal key animation. Since our 'swaying' action is to sway between the left and the right, our central, 'neutral' pose should be somewhere in the middle.

    Pressed the Up-Arrow key to move to frame 11. There's nothing special about frame 11, it's just where I'm putting my center key. Select the bones of the spine and press 'I' --> Insert Loc/Rot.


    The Action Editor will display the new keys:



    [color=orange]Additional Keys[/color]

    Let's bend the spine right, shall we?
    Set the frame to 1 and play with the spine until it's somewhere you like it.



    You'll notice that I've kept his head up. All this action is designed to do is curve the spine. Not bend over at the hips. We can use the Spine A bone for that later.

    Press 'I' and insert another Loc/Rot.


    Next I changed to frame 21 (the last frame in the action), adjusted the spine bones appropriately, and inserted the final key.




    You can, of course, use all the normal action editing techniques here to test your frames. Go to frame 1, press Alt-A, and watch him sway from his right to his left. Add, delete, and rearrange keys until you are satisfied with the motion.


    [color=orange]The center key[/color]

    Since this action is centered at frame 11, set the frame number to 11. Now select the "Action" action from the combobox. You can now change the frame number back to 1.



    The location of the frame index is important for an action. In most cases, you can leave it at 1. But for an action like this we want it in the middle of the action.

    This is the other reason for having an empty Action block from which to build new actions. It just makes life a little easier to not have to worry about those things.


    [color=orange]Applying the Action Constraint[/color]

    Now to make our boy dance.

    Select the bone labeled "Spine A" and press F7 to display the Object Buttons. Under the Constraints tab, add an action constraint.



    [color=orange]Target[/color]
    For "Target" type in the name of your armature.
    A new box will display. Type in the name of the bone which will control the spine: "Sway Spine".

    [color=orange]Action[/color]
    In the box that says "AC:" type in the name of the action "Sway Spine".

    Don't be concerned that the armature deforms in the 3D View. We'll fix that.

    [color=orange]Rotation Axis[/color]
    The degree we rotate our bone around the Z-axis is what controls the action. You can make it any axis you want, or change it later if needed or desired.

    [color=orange]Start and End[/color]
    Our action begins at frame 1 and ends at frame 21.

    [color=orange]Min and Max[/color]
    I like the greatest range of motion possible, so it's 90.00 to -90.00 degrees.



    At this point you can grab the Sway Spine bone and rotate it to see what happens. I had initially set my min and max to -90 to 90, which made him sway left when I rotated the bone right. So I swapped them to make it do what I want.

    The only thing remaining is to repeat the process of applying the action constraint to Spine B and Spine C. Notice how we never did anything to the Sway Spine bone?

    In Blender, constraints are applied to the controlled bone, and target the controller bone.


    [color=orange]The Null Constraint[/color]
    One important thing that should be mentioned here concerns the use of a Null Constraint. In our example each bone of the spine (A, B, and C) has only one Action Constraint applied to it.

    However, it is often convenient to apply multiple action constraints to the same bone. The next logical step for our spine would be to create another action called "Bend Spine" which makes the spine curve forward and backward (slouch and stretch, as it were). We would then need two bones to manipulate the spine: "BO:Sway Spine" and "BO:Bend Spine", and two corresponding actions that do each one: "AC:Sway Spine" and "AC:Bend Spine".

    Each bone in the spine would then have two Action Constraints applied to it: one targeting the "Bend Spine" bone and action, and one targeting the "Sway Spine" bone and action.

    [color=orange]In Blender, if two or more constraints of the same type are applied in sequence, the result is an average of the constraints[/color]. This is useful for doing something like constraining an object to track the point between two or more other objects. In the case of Action Constraints, however, the average result is usually undesireable.

    To solve the problem, place a Null Constraint between each Action Constraint to prevent them from being averaged together. The result should look something like this:

    To move a constraint up or down in the list, collapse it (click the little triangle), and click the name to get a pop-up dialogue to move it up or down.


    [color=orange]Using the Action[/color]

    The only thing left to do is play with the new action constraints.

    Since we'll never need to mess with Spine B and Spine C, Tab into edit mode and hide them. Now Ctrl-Tab back to Pose mode. The action editor should read "AC:Action". Good.

    Animate as usual. You can rotate the Sway Spine bone left and right to control the entire spine, and rotate the Spine A bone to make him bend at the hips.

    Here's my animation doing just that. (DivX 328KB)

    I hope this helps. If I've left anything out, or have been unclear, let me know.


    [size=2]Added information about Null Constraints (18 Sep 2005)[/size]
    Last edited by Duoas; 01-Oct-07 at 18:24. Reason: future compatability



  2. #2
    Member Gabio's Avatar
    Join Date
    Nov 2003
    Location
    Canada - Québec - Sherbrooke
    Posts
    2,197
    Nice...
    Very detailled tutorial here.
    psss, Animation workshop?
    I also did a small tut on action constraint here
    Venez nous voir au Québec, on est pas sorteux!



  3. #3
    Member melon2005's Avatar
    Join Date
    Jun 2005
    Location
    Poland
    Posts
    120
    Hey, there's never enough nice tutorials! You should somehow link it with Animation Workshop, to keep this kind of valuable information in one place.

    Anyway, lot of thanks for this!



  4. #4
    Member Gabio's Avatar
    Join Date
    Nov 2003
    Location
    Canada - Québec - Sherbrooke
    Posts
    2,197
    Originally Posted by melon2005
    Hey, there's never enough nice tutorials! You should somehow link it with Animation Workshop, to keep this kind of valuable information in one place.

    Anyway, lot of thanks for this!
    yea, keep this near, such tut is worth incorporating in the 2.4 manual.
    Venez nous voir au Québec, on est pas sorteux!



  5. #5
    Member Duoas's Avatar
    Join Date
    Dec 2004
    Location
    Cherry Hill, NJ
    Posts
    1,829
    Wow! Thanks!



  6. #6
    Donating Member
    Join Date
    Sep 2003
    Location
    Jersey UK
    Posts
    21
    yes, very informative. Thanks.

    As more people like myself become aware of the animation re-code tutorials like this will become worth their weight in gold pixels.

    I find alot of tutorials try to do too much, rather than focus on 1 or 2 main tasks. This one was nice and comfortable, without straying.
    Thats important.

    For those listening, we need more on constraints.
    Wait for the new IK code first though.

    I might have a go at some simple tuts myself, but i'm not a blender native.
    Migrating in from A:M which has a great constraints system, when you are not re-starting the damn thing :<

    Blender is looking more like a new 1 stop shop for animators.
    --
    Keith White



  7. #7
    Member pld's Avatar
    Join Date
    Oct 2004
    Location
    Mobile, AL
    Posts
    410
    Duoas, great tut! I don't think I even knew about action constraints really, except for the blurb Gabio put up in the workshop... I can't wait to get home and give this a try!

    You know, I never realised that this is how nozzy was using a bone to close and open the hand of his skinny_guy rig... Of course it all makes sense now!

    Thanks!



  8. #8
    Member Anayo's Avatar
    Join Date
    Oct 2005
    Location
    North Carolina, USA
    Posts
    467
    I know this is old, but I don't want to go without interjecting my own little thank you. Thanks for the helpful tutorial!



  9. #9
    wow!!! I would like to say thanks a lot, cause ive been so confused for so long but now it all makes sens. I had no clue how an action constraint worked, all i had been able to figure out was the copy location... now that i know how to do that, il be able to do a lot more. Realy great work.



  10. #10
    Member
    Join Date
    Mar 2002
    Location
    California
    Posts
    2,122
    Yes this is old but I wish someone would explain the ADD NEW Feature on both the actions,IPO,Material and other windows better. After 7 years that still confuses me.
    At some point in life you stop being the man you are and start being the man you always wanted to be. ------ Bruce Springsteen.



  11. #11
    Member Mike_S's Avatar
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    3,225
    Originally Posted by SHABA1 View Post
    Yes this is old but I wish someone would explain the ADD NEW Feature on both the actions,IPO,Material and other windows better. After 7 years that still confuses me.
    AFAIK, it just makes a new unique copy of whatever you're adding, or a new blank item if you first press the "X" to disconnect the current item. Is there something more to it that I'm missing? Mike



  12. #12
    Member ecgilboy's Avatar
    Join Date
    Sep 2006
    Location
    Saipan, CNMI USA
    Posts
    634
    This is very helpful indeed..thnx a lot...



  13. #13
    That is great, cheers!



  14. #14
    thank you very much

    very detailed and very usefull

    this is exacly what i wodnered about and needed. i appreciate your work
    ::SaKaChi:: the realm of nayato is opened



  15. #15
    Member Duoas's Avatar
    Join Date
    Dec 2004
    Location
    Cherry Hill, NJ
    Posts
    1,829
    Thank you everyone for your kind comments and questions. Please see the first post for a link to the updated tutorial (WIP).

    --Michael



  16. #16
    Thanks for the tutorial
    Last edited by Delirium; 09-Mar-09 at 19:49.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •