Purpose of actions in animations

Hi all,

I am new to the Blender, 3d modeling and Blender Artists.

I am trying to learn rigging and animations using youtube and other internet sources. I have created a model of a dog for which I am creating a rig. I am following a tutorial for quadruped rigging but there are some things I don’t quite understand. The tutorial concentrates on creating an armature just for one foreleg (left side) and uses an action to rotate the leg so that the leg is lifted and rotated by this action, let’s call it “lift” for a reference. One of the leg controller bones uses this action. So I can lift the leg by using a controller bone with one action. This works fine.

Now I managed to duplicate the structure for the other side of the mesh (right leg) by mirroring the bones. They work nice but the since the action contains key frames for the left side, by using the right side controller bone I still lift the left leg. So the duplication didn’t change the action to control that side where action is attached to.

Question is: Is this wrong usage of actions? I am thinking maybe actions are supposed to be more like “walk”, “sit” and “wag the tail” that applies to the whole armature and contains a recorded set of key frames for the whole mesh i.e. walk would be applied to all 4 legs and maybe contain a full walk cycle? Or can I duplicate the action somehow and have it automatically be applied to right leg?

Are the actions exposed to gaming engines (when exported) to be used by the programmers to control the mesh? If so, real question really would be why would a programmer want to just use lift of one (left side) leg?

Sorry for a long first question, and probably a noobish one too :slight_smile:

Cheers, Jax

Hi Jaxes74, and welcome on Blender Artists.

I never used an action as part of the rig… but that doesn’t mean that it is wrong, however, could think that there would be some issues with that.

But it’s difficult to answer without know how it is being used. could you post a link of the tutorial in question and around what time they speak about the action in the rig?

As for your last question, about game engine, It’s really important to know what you are going to do with your rig since it’s going to affect the way you are going to rig it! But what I often do with my rigs when I have to export them to a game engine is that I bake the animation so that every animation information that the game engine needs is there is a basic keyframe way.

I hope you are going to enjoy your experience with blender!

Mathias.

Hi Mathias,

Thanks for the reply. Here’s the videoI am referring to. Starting from around 19:50 he creates the action in question.

Having looked deeper into the issue I think the Action is just a way to create a strip of recorded key frames which can be reused and probably used within NLA Editor.

So I think using action controlling the bones is not bad practice or wrong, but maybe his way of just controlling one foot lift is not a good example of reuse of an action.

I also noticed, quite dearly, that naming bones is very important. He never used suffix .L or _left which Blender can auto rename when mirrored.

I am not sure if there’s a way to rename Front to Back (legs) in the same way though. I did that manually.

Cheers, Jax

Whenever you start creating keyframes, you’re creating an action. An action generally composes sets of keyframes for one or more objects.

You can then store that action away by clicking the little ‘fake user’ button, and start the creation of a second action by way of clicking the little ‘+’ button, then you can add a third, fourth, or fifth action. Then in the NLA editor place the actions in a sequence, blend them together, ect…

Question is: Is this wrong usage of actions? I am thinking maybe actions are supposed to be more like “walk”, “sit” and “wag the tail” that applies to the whole armature and contains a recorded set of key frames for the whole mesh i.e. walk would be applied to all 4 legs and maybe contain a full walk cycle? Or can I duplicate the action somehow and have it automatically be applied to right leg?
Actions are sets of keyframes so yes, walk, wag tail etc are actions that the can replay or combine together (walk + wag tail at same time).
What you should really have is one armature for the whole body so you can animate everything as one.

From your description (I haven’t seen the video, no time to watch) I think the video you are following is using an action constraint. Since you are new, I start at the beginning… An action is a collection of key frames, it could even just be a single key frame, that defines motion for an object. When used on an armature, the action is key frames of each bone. An action constraint allows you to play an action in a way that is controlled by another bone or an object. Here’s an example of how this works: You create an action of lifting the leg, say the start key frames are on frame 1, the ending key frame is on frame 11. Now you add an action constraint to each bone that is key framed. Then you set up the constraint, telling it what action to use, start/end frames, and target (or controller) bone/object, and I think you may have to define the range of movement of the controller. Not sure, been a bit since I used it… Once it’s all set up, as the controller is moved the animation plays back accordingly, moving the bones with the constraint on them, in relation to how the controller is moved.

Here’s an example: You have an action of the leg lifting, start frame is 1, end frame is 11. Your controller is moved from 0 to 1 blender unit (blender’s standard measure) upwards to control the constraint. When the controller is at 0, the frame of the action is 1, and those keys control the bones. When the controller is moved up 1 bu (blender unit), the action would be at frame 11, and those keys control the bones. Move the controller .5 upwards, and the action would be at frame 6, half way thru lifting, because the controller was only moved half way. Move the controller half way up and back down to 0, and the character lifts leg half way up, then back down.

When you copied the one side to the other, all the constraints copied over too. You need to create an action of the other leg lifting up, and adjust the constraints. But I don’t really know what adjustments need to be made without looking over the rig…

Anyway, to your real question:

Question is: Is this wrong usage of actions?

Yes and no.

Yes:
In this case, inside blender, it’s just fine at this point. You will be able to animate reliably inside blender. Your problem will be when you export out of blender to your game engine. I don’t know how you’re exporting it, but the way the bones are controlled by the action constraints, likely will not export correctly. Or it may take some extra work to get a good export out of blender. I don’t know, I’m not a game engine person.

And the no:
No, this is case its a very incorrect rigging practice. For a normal bi-ped, one would use an IK constraint (Inverse Kinematics), to control the leg/foot lifting/moving. It’s easy to set up and will provide more control than the action constraint method would.

I think you should look up how to, and rig a simple IK arm, and animate it. Export it to the game engine and see if it works. If it doesn’t work then figure out why. If it does work, then start with the rigging of your character, If you can’t get a simple arm into the game engine, better to find that out now, instead of after you have spent the time rigging an entire character, and finding out it won’t export correctly…

just a thought,
Randy

Hi Randy and rest who has answered to me.

Thank you for your replies. This clarifies what an action is but Randy understood what I had in mind. In the example there was an action constraint and a target / controlling bone for one leg (left) lifting.

This is pretty much how it was set up in the example video. One of my concerns was using the constraint this way just for one part of the armature, here the left leg. It works if your armature is just the left leg and maybe you just want to animate that, but when there are 4 legs and action gets copied it do not work.

Also would an experienced animator / modeler / rigger use it this way to animate the leg lift? Should I create 3 new actions for rest of the legs and maybe copy key frames or should I just create one action “walk” which would be applied to whole armature and contain the full walk cycle?

About starting with a simple rig. You are absolutely correct. I have done a rig for a human and animated a walk cycle with IK constraints. It works all fine. I wanted to create something more advanced and I was trying to find a source how to rig a quadruped. I might have gone wrong way but in the video it looked neat how the rig actually lifts the leg from the tip of the toes. This is ultimately the reason for my trying to do it the same way.

I am also trying to export my walk cycle to a game engine to see how it works. Then I should be able to answer my own questions better, or know more specifically what to ask :wink:

Thanks for all the replies!

Cheers, Jax