- [Instructor] This is the lesson
from our Moho Animation Course.
To get the full course,
go to bloopanimatio.com/mohoanimation.
In this video, we're going to look
at a super powerful
and versatile technique called Smart Bone.
This is probably the biggest selling point of Moho.
The Smart Bone lets you use the rotation of a bone
to drive any other bit of animation you want.
You'll see how powerful this is in a second.
Let's look at a prime example
of where you should use Smart Bones.
This is a super simple example of an arm.
In this case, the arm itself is one layer
and you've seen in previous videos,
how we add the bones and bind the artwork to the right bone.
But there's always the issue of how the artwork gets bent
and pinched at the joints.
You can try adding points and adjust the bone strength.
Or in this case, we can make
a smooth joint for bone pare which helps.
But to take full control of how the arm bends
let's make this forearm a Smart Bone
and use it to animate
how the points around the joint should move.
We do this by adding actions to it.
So let's go to window, actions,
and this is the actions palette.
Now make sure you have the bone selected
and then click this button to add an action.
If you did it right, the action should be named
the same as the bone you selected
and your timeline will change color.
That means this is the timeline just for this action
as opposed to the main timeline
where all the rest of your animation goes.
The timeline for the action
is where we'll define what animation happens
as the bone rotates.
First, we need to set an end key frame position
for the bone itself to define the range of motion
that will drive the animation.
We'll use the transform bone tool
and start it just in its neutral straight state,
and then come out a good amount of frames
and rotate the bone basically as far
as it could naturally go.
The more frames you give yourself,
the more subtle change you can include in the animation,
but you might end up needing to do more work,
making sure every frame looks right.
48 frames will be fine for this case.
Obviously that looks terrible now,
but that's exactly what we're going to fix.
Now that that set let's switch to the arm layer.
Notice I have the channel visibility on
for the bone layer so we can match up the timing.
Now we're going to animate the vector points of this shape.
So we need to select them
and use the transform points tool to click
and set a key frame for the straight state.
Then we can go through the animation of the bend
and make corrections
when it distorts in a way we don't want.
Now you can just fix the area around the joint if you want,
or you can basically do whatever else.
Like let's make the bicep flex as the arm comes up.
Next, let's fix the spot where the shape overlaps itself.
The goal is to make it look like the forearm
is squishing against the upper arm
in a way that looks natural.
It's important to note that you can't delete
or add any new points, just move the existing ones.
Otherwise it will mess up its ability to transition.
It may take many different key frames
over the course of the animation
to make sure it looks right the whole time.
And there we go.
That band looks fairly natural.
Now let's go back to the main timeline
using the actions palette.
And now that that's done,
whenever that elbow joint bends relative to the upper arm,
the shape of the arm is going to flex
like we defined in the action.
So now we don't have to worry about that action anymore.
This arm will just work.
So anywhere abandoned a joint doesn't look right,
you have the option to fix it by hand
with a Smart Bone action.
Now here's another common example of how to use Smart Bones.
The Smart Bone can be used to animate anything
in the bone group, not just a layer it's bound to.
In fact your Smart Bone
doesn't have to be bound to any layers.
It can just be a free floating dial.
This is a common way to control facial animation
in a Moho rig.
For this example, we're going to create a Smart Bone dial
that controls all the layers of this space
and lets us rotate the whole head.
First notice how this file is set up.
All the pieces are separate layers
and some of the layers like the eyes, mouth
and cheek lines here are in a mass group
so when we move those around,
they can never go outside the head.
So to get our bone dial,
we first need a bone group to draw it on.
So let's just right click
and convert the head group to a bone layer.
Now we can draw a bone that will affect
the contents of this group called head turn.
And let's set its angle constraints
to 90 degrees either way.
And this is important,
turn the bone strength all the way down
so it doesn't directly affect any of the artwork
when you move it.
Now we're going to make it
so this dial can be rotated either left or right
to turn the head left or right.
Now, when you make a bone
that works in two directions like this,
it's best to have the middle be the neutral starting state
and actually have two different actions for each direction.
So let's start with the left direction.
On the actions Palette we'll make an action.
Then we need to come out later on the timeline
and set the left position on the bone.
In this case, I made it 90 frames,
that way there's a frame that corresponds
to each degree of rotation.
Now we need to make the animation of the head turning
over the course of these 90 frames.
I'm gonna start with the head masking group
and move that whole thing over.
That will serve as the guide
for where everything else needs to get repositioned.
Then let's start with the features on his right.
The ear would actually be moving backwards
if the head returning, so that's easy.
This hair is a little harder
because at some point in the animation,
we need it to switch from in front of the head.
To behind it.
To make that possible,
we need to go to the group the head parts are in
and in the layer settings
on the depth sort tab, enable animate layer order.
Then at the point we need the hair to move back,
we just reorder the layers in the layers palette.
That layer switch will be represented
with a channel on the timeline of the bone group
not the layer itself.
So now I'm gonna go through
and shift the rest of the features of the face over
to make the side position for the head.
Once that's done, let's go back
to the main timeline and check it.
Cool, so that half of the dial is done.
Also, you may want to enable show label on the bone
so you can see its name to remember what it does.
Now we just need to make another action
and repeat the process for the other direction.
So there we go.
We've got our dial to turn the head left and right.
Now let's get even cooler
and make a dial for turning the head up and down.
First, I'll make sure I don't have any bone selected
then draw another bone.
You wanna make sure your bone dials
aren't parented to each other.
This time I'll show you a shortcut,
with the bone selected,
We can come up to bone, make Smart Bone dial.
With this, we can automatically set our name,
angle parameters and the number of frames
it should take the bone
to rotate on the timeline inside of our actions.
This time I'm not gonna make it 90 degrees either direction
because the head would have
a more limited range of motion going up and down.
Really you can use whatever values you want,
but this makes the dials more intuitive to me.
And then we do want to separate actions
for positive and negative angles
and click okay.
Now that sets up the bone and creates the smart actions
in the actions panel for us.
And if we go inside,
we can see the key frame for the rotation of the bone
is already set up
and we just need to animate everything else.
So I'll make the looking downward animation
and then I'll move over to the other action
and rotate the head looking up.
Now, back on the main timeline
we can use both dials and it's smart enough
to combine the two actions
and to allow us to point the face in any direction we want.
So now to animate the character's head direction changing,
you just need to add key frames to the bones rotation,
not all the parts of the face.
Hopefully that gives you an idea of how easy it would be
to animate a character that has controls like this.
If you look at the Moho demo project Mahoney
and find the main bone layer,
you'll see a ton of dials have been set up
to control both the head overall
and the individual features of the face.
Having these controls out here is much easier to work with
than trying to directly animate
each piece of the face by hand.
And in the actions panel,
you can see how they've organized all the actions
that these bones all control.
Looking at this can give you some great ideas
for clever ways to use Smart Bones in your rig.
We're gonna be building our own character
in a similar way later.
The last way I wanted to show you how to use Smart Bones
is as a way to control switches.
Here I have a switch for this hand,
with a few hand positions inside it.
I've created a smart phone dial,
and if we go inside the action, I've set up for it.
You can see I've only made this one 12 frames long.
Then I'm going to go to the switch and along the timeline,
I'll have it swapped through
each version of the hand in sequence.
I'll have each position on here for four frames
to make it easier to select with the bone.
Now, back on the main timeline,
I can use the dial
to switch through the hand positions as I animate.
So you might be wondering why you would wanna do it this way
instead of just right clicking the switch
or using the switch selection panel.
Well, if I use a Smart Bone,
I can keep that control on the main bone layer
with all of the other controls.
I won't have to dig through the layers palette
to select the switch every time
I want to change the hand position,
that's a lot more convenient.
Just be aware if you're using this technique,
you'll want the key frame interpolation
for the bone channel set to step.
Then it won't try to interpolate
from one position to another
when you set key frames on the bone.
It'll just stay where you set it
until you set it to a new position.
So hopefully this gives you an idea
of how powerful Smart Bones can be.
We'll look at play more examples later
when we're rigging our main character.
So far, all the rigging we've done
has been on vector layers,
but you can also use bones
with bitmap images you've imported or drawn.
We're gonna look at the best method for doing that
in the next video.
I'll see you there.