Tip:
Highlight text to annotate it
X
Hello everyone, my name is Gilles Charbonneau.
Welcome to this video tutorial explainning the FKIK script, that was made available to the Anime Studio community by capricorn33.
In this video, I will explain what are forward kinematics(FK) and inverse kinematics(IK)
I will explain the pros and cons of these two ways to animate.
I will explain the benefits of having a setup with a blend of FK and IK
Then I will explain how to setup the script and will show a few examples from inside Anime Studio.
Before we get into what FK and IK are, let's have a look at what a hierarchy is in Anime Studio
Here we have the character we will use for this tutorial, we will zoom on his left arm and have a look at it's hierarchy in Anime Studio.
As you can see, this arm is composed of 4 bones.
The clavicle.
The arm.
The forearm.
And the hand.
All these bones are parented to each other, meaning that they move in relation to the bones above and beneath them in the hierarchy.
Let me explain further more.
The clavicle is the parent bone of the arm, meaning that all the bones under it, the child bones, will move with it.
As you saw in this animation, when we animate the clavicle, all of it's children bones rotate with it.
The same thing happens with the arm bone, when we animate it, all of the bones under it in the hierarchy animate with it.
But you may have noticed that the clavicle bone stayed still, that is because the clavicle is the parent of the arm and cannot be affected by it.
Same thing happens with the forearm, as we animate it, the bones under it in the hierarchy animate with it, but the arm and clavicle do not.
Again, same thing happens with the hand, except that this time, there are no child bones under it, so it moves by itself.
Now that we have a basic understanding of what a hierarchy is in anime Studio, let's have a look at Forward Kinematics.
As we saw in the previous segment, a hierarchy start at the top of a bone chain and goes down to the end of it, as does Forward Kinematics.
In the next example, we will animate our arm from the clavicle down the the hand, the animation proceeds forward in the chain.
Hence it's name, Forward Kinematics.
In this segment, we will have a look at Inverse Kinematics.
As was explainned previously, Forward Kinematcis, or FK, allows us to animate one bone at a time.
Inverse Kinematics on the other hand, allows us to animate all the bones in the chain by moving only one bone.
Let's have a look at an example where we animate our arm only by moving the hand bone.
Here's how it works.
When we move the hand, Anime Studio evaluates the previous bone in the chain, then calculates it's rotation.
Then it calculates the rotation of the next bone, still going backward in the chain.
Then it goes one step further back in the chain, up to the clavicle, and it calculates it's rotation.
It is going in reverse order in the chain, hence the name, Inverse Kinematics.
Now let's have a look at the pros and cons of Forward Kinematics
Forward Kinematics allows you great control over the rotation of bones, which is perfect for precise placement of bones.
On the other hand, it can become tedious to animate simple task, like reaching a target.
or, say you have the perfect walk cycle, but decide to have the pelvis lower, then it becomes problematic...
as Forward Kinematics only allows you to move one bone at a time!
Now let's have a look at the pros and cons of Inverse Kinematics
On the plus side, Inverse Kinematics allows a great deal of freedom as far as animating fluid motions...
or to modify part of an animation without affecting other parts.
On the other hand, Inverse Kinematics can make it tedious to get precise control on the placement and rotation of bones.
Also, Inverse Kinematics, because of it's complexity, often introduces erratic behaviour, where the bones flip from one side to the other.
Inverse Kinematics can also introduce erratic behaviours where the bones are affected by the surrounding bones computation.
These problems are often seen at the feet, making them wiggle. This problem occurs in pretty much all applications usin IK.
Not just Anime Studio.
Although Anime Studio offers tools like the Manipulate and Rotate Bones, that allows some basic FK IK switching.
Animating feet is often a problem, even if you lock them.
This is due to Inverse Kinematics influencing the locking mechanism, again, this is a problem found in nearly all applications using IK.
The easiest way to solve this problem is to have an hybrid FK IK rig for the feet, the way to build one of those if by using an aim at constraint.
By default, Anime Studio does not have an aim-at constraint, but a user, Hans L, AKA capricorn33, made one available.
You can find his script at both the official and unofficial Anime Studio forums.
Now let's have a look at the way the script works.
First thing you will noticed with this setup, are the two aditional bones at the heels.
If you select one of those with the Translate Bone tool, you will be able to drag it around and the foot will follow.
When you drag the foot around, it's rotation does not change.
And here is the reason why.
The foot has a completely separate hierarchy, making it impervious to the Inverse Kinematics of the legs.
The way this works is simple, the script makes the last bone on the leg chain aim at the control bone of the foot chain.
Therefore completely avoiding the artefacts of the Inverse Kinematics of the legs affecting the feet.
With a setup like this one, you do not need to lock the feet to make them stay in place.
Another great feature of such setup is that if you change the rotation of the feet, you only need to reset them to have them flat on the ground.
Making animating things like walk cycles a since.
First thing we need to do is install the script.
The script comes with two lua files.
aim_bone_ik_hl.lua, which is the embedded script, you can put it in any folder you like.
Personally, I prefer to put my embedded scripts in a dedicated folder.
hl_FKIKmanipulate_bones.lua, which is the script itself, you need to put in the tool folder.
Once the script is installed, start Anime Studio and load your scene.
Double click your group or bone layer, then check embeded script file, navigate to the location of the embedded scrit and select it.
Click ok to close the property window.
Now, with the select bone tool, select the bone that will be used as the target, go in the name window and give it a name that ends with .trg
Then, with the select bone tool, select the bone that will aim at the target bone, go in the name window and give it a name that ends with .aim
That's it, you have setup the script, now you only need to animate your character.
I hope this tutorial was of use to you, and I will see you next time.