Hey, fellow animators, I'm Miloš Černý and today we are going to take a look at a topic
many of you have requested.
How to build up a CAT rig the way to be compatible with current game engines
like Unreal, Unity and so on.
Let's take a look.
I will use the same model and rig of this low poly wolf I used in previous video also.
It is free to download for my Patreon supporters.
I will be occasionally releasing content exclusively for my Patreons, to express my appreciation
and gratitude towards them.
So, the big part of this rig is done in a standard way.
Nothing special about it, you can watch several other videos on my channel
to see how to build a CAT rig.
However the one and only difference, is this bone here.
Which is a Root bone.
To explain why is this important we first have to understand how game engines work with
character rigs.
In CAT, the triangle below the rig, is just a helper object.
It is not a Root bone and it is not being exported with the rest of the animation.
This means that in CAT the root of your whole rig is the first bone
which is the parent of every other bone.
In our case the Pelvis.
This works fine for animating in animation softwares like 3ds Max, because there isn't
any particular reason for having additional bone as a root.
However for game engines there is.
Most of the game engines usually need a bone above all the rest, for different features.
Bone commonly named as Root.
For example Collision Mesh is usually tied with the Root bone.
Features like root motion or even general position of the character is driven by Root bone.
So, what this means for us, is that we need a bone above the Pelvis in the hierarchy.
Let's create an additional bone for Pelvis.
Name it Root
And zero it out.
But now it will be a child of Pelvis and driven by Pelvis, which we don't want.
We need it to be above the Pelvis in hierarchy.
So link the Pelvis to it and if it moves, zero it out again.
Now if you create an animation layer
And move the Root bone, you see the Pelvis is linked to it and moves with it.
But actually, this is not exactly what we need.
You see, you still want to be able to animate the root bone separately, in case it needs
to be animated.
Imagine you have animated some "Start run".
Don't mind the actual animation, it's clip loaded from different rig and just for
this presentation purpose.
But here you can see the problem.
At frame 0 the root bone is placed fine, but at the last frame, we need it to be below the wolf.
But if I try to animate it now, it of course moves Pelvis as well.
This means you would always have to animate Pelvis bone with Root bone as an effector,
which is wrong.
The correct way how to set this up is actually very simple.
CAT gives you an option to disable inheriting of parameters from it's parent.
If we disable them for the Pelvis bone, you can see, we can now animate the Root bone separately.
And Pelvis stays as it was.
So basically, this is all there is to it for setting up a CAT rig for game engines.
Just create a Root bone, link Pelvis to it and disable it's inheriting of parameters.
However, we are not done with the video yet, because this set up creates another issue.
And that is with the CAT's motion layers, or procedural animation if you will.
If we create a new motion layer now,
This will happen.
You can see that the Root bone took the animation of Pelvis and Pelvis is not moving.
That is because we rearrange the hierarchy and CAT's motion layers consider the first bone as Pelvis.
This means that motion layers would be unusable with this set up.
Which would be a terrible shame, because procedural animation is one of the key advantages of CAT
over different animation systems.
If we would try to reenable the inheritance just for this animation, it wouldn't work either.
The only solution I came up with is to delete the Root bone when using motion layers.
Animate the cycle you want.
Let's say this would be it.
Collapse the layer.
Which means that it bakes everything you have in the layer stack into one absolute layer.
Now save just this layer as a clip.
And load it on the rig where you still have the Root bone.
And it will work fine.
This is a bit of a nuisance for sure and you will have to keep more .max files on your hard drive
because of this.
But in my workflow for example I keep animations separated in different files anyways, so this
doesn't affect me at all.
But anyway, you will encounter this problem only with the motion layers and you can still
use them this way.
I have looked around the internet quite a bit and a lot of workarounds I have found for this,
were even worse or harder to set up than this one.
There actually aren't a lot of information about CAT anywhere and a lot of stuff I do
I realize how to do by myself.
But, I have tested everything and it works fine.
So that's it.
You can of course change the shape of that Root bone to whatever you like,
for example to an arrow like I did here.
I hope you enjoyed this video.
It was a topic I was asked a lot about.
If you would like to see more stuff like this support me on Patreon or with any other way
you would prefer.
And as always, share, like and leave some comments.
I read them all.
I am Miloš Černý and Thank You for watching.
Không có nhận xét nào:
Đăng nhận xét