♪♪♪
Wes Bunn: Hello, everyone. My name is Wes Bunn
and I am a Senior Technical Writer with Epic Games.
Today, we are going to be talking about Skeleton assets in Unreal Engine 4 (UE4).
I will help clear up some of the common misconceptions about Skeleton assets.
I will show exactly what Skeleton assets can do, and why they are
an important part of importing and animating characters inside UE4.
If you are already familiar with animating characters in animation tools like
3DSMax, or Maya, or Blender, then you probably have a
solid understanding of what is involved in animating a character.
We will cover the process of animating a character from a high-level
very quickly just so that we are all on the same page.
Usually, first you create the outer appearance of your character as a Skeletal Mesh.
The Skeletal Mesh is usually the 3D model you visually see.
Then you set up the Skeleton, which is rigging the character.
Rigging the character includes adding and defining the bone or joint hierarchy,
which you can manipulate into poses.
Then, you can animate those poses by keyframing those
individual poses over a timeline, which you can use to create animations.
If you are familiar with the older stop-motion style animation where you pose a character,
take a picture, then move the character into a new position, and repeat;
this is a similar concept to keyframing animations.
You can use keyframing to create most any animation you want
such as running, walking, punching, or whatever you want your character to do.
This is usually how we externally create animated characters.
In a moment, we will talk about how UE4 takes and applies
those animations to your characters inside UE4.
I keep saying character, but you could actually create anything.
For example, you could create a kite and use that as your Skeletal Mesh. You could add
bones or joints to make the spine, and use additional bones to animate the kite's tail.
Once you have the Skeleton asset ready, then you can import it into UE4.
One of the biggest misconceptions about Skeleton assets in UE4 is importing.
The misconception is that each Skeletal Mesh you import must have
a direct 1:1 connection with its own unique Skeleton asset inside UE4.
This is not necessarily the case.
To clarify, let's take a step back for a second.
As we mentioned a moment ago, in most 3D applications
a Skeleton is a digital hierarchical framework used to
define the bones in a character.
In many ways, the Skeleton mimics a real biological skeleton.
In UE4, the Skeleton asset is less like
a 3D representation of an actual skeleton, and it is more like a list.
The Skeleton Tree is the list containing the bone and hierarchy information for a Skeletal Mesh.
The Skeleton Tree is used to drive animations for the associated Skeletal Mesh,
as well as some other things which we will get into a little bit later.
UE4 looks at the Skeleton asset and the Skeleton Tree,
and finds all of the bones and the hierarchy between those bones.
I can use that information to play animations for the character or multiple characters.
I want to emphasize that the Skeleton asset
and the Skeleton Tree can be used for multiple Skeletal Meshes.
You do not need a unique Skeleton asset for each imported Skeletal Mesh.
There are some stipulations, which we will touch on in a moment.
UE4 only cares about the bone and hierarchy information
for the Skeletal Mesh it is assigned to.
Let's say we created a Skeletal Mesh inside of our favorite 3D modeling program.
Then, we go through the rigging process and hook up our Skeletal Mesh to a Skeleton.
Perhaps we even create a walking animation for him that we want to import as well.
By the way, this is my sad skeleton.
Yours will most certainly look better than mine.
We are set.
We want to import the Skeletal Mesh and the walk animation into UE4.
Along with the various FBX import options, we can assign a
Skeleton asset for our character to use.
A Skeleton asset will automatically be
created for us whenever we choose to import Skeletal Meshes
and choose not to assign a Skeleton asset.
Remember, the Skeleton asset is a list that will keep track of the bone location
and hierarchy information of the Skeleton asset
we used when we rigged our Skeletal Mesh.
The Skeletal Mesh is just passing that information
over to the Skeleton asset inside of UE4.
We clicked Import. The character has been imported.
He is skinned, and he is rigged.
He has a walk animation, which makes us very happy
because we now have a character inside UE4.
But we are not content with that.
We want another character.
We go back to our favorite 3D modeling program and create another character that looks a
little bit different this time.
For this character, maybe we also created a run animation that we want to import as well.
We rigged this character in the same way as our first character.
All of the bones are in the same hierarchy location,
and our bone names are the same.
All of that information already exists in the Skeleton asset
we created when we imported our first character.
Since both characters set up the same way and only the Skeletal Mesh has changed,
we do not need to create another Skeleton asset when we import our second character.
When we import the second character, select the Skeleton asset as part of the import process.
The Skeleton asset was created when we imported our first character,
so it has all the setup information.
We can do this because the bone and hierarchy setup for our two (2) characters are the same.
Our second character has been imported.
He is also skinned and rigged, and we imported a run animation for him to use.
Since both characters share the same Skeleton asset,
both characters can now use the walk and run animations we imported.
The characters can use these animations without any problems
because they share the same Skeleton asset.
UE4 knows the bone and hierarchy information of both characters,
which it will use to drive the animation
when it is applied to each Skeletal Mesh.
You can even take it a step further and create a smaller character,
or a child in your favorite 3D modeling program.
As long as you rig the character the same as the other two (2) characters,
keep the same bone naming convention, and keep the same
hierarchy setup, then this third character can use
the same Skeleton asset the other two (2) characters are using.
Now all three (3) characters can share animations between each other
because their information is the same.
This is very useful because we do not need to create
a set of separate set of animations for each of our characters.
The other characters can share the base animations,
and then we can concentrate on unique animations
we want to provide for each individual character if we would like.
Although each character can share animations between each other,
there might be some adjustments we want to make to ensure
our animations aren't stretched or compacted based on which Skeletal Mesh
the Skeleton asset is referring to when it is playing animations.
We will touch upon this more in a moment when we jump into the editor.
The retargeting process will help alleviate some of those issues.
Retargeting is another thing the Skeleton asset will do.
The Skeleton asset keeps track of bone information for location and rotation.
When using retargeting, the Skeleton asset also contains and uses bone transform information.
If you are completely new to using skeletons in UE4,
you may be wondering what was that? Don't worry.
We will use this information in a moment when we jump inside the editor.
Retargeting is fine if we have characters that we rigged the same.
What if we had a character with four (4) arms, or a tail, or something like that?
Would we need to use a different Skeleton asset in this case?
That may not be the case depending on the setup of your Skeleton asset.
Let's use the example Skeleton asset.
As long as our base bone setup and hierarchy are the same, including the naming convention,
we can add things to it like extra arms, a tail,
or something like this, for example.
This is perfectly fine.
We do not need to use a separate Skeleton asset when we import this character
into UE4 because the base bone information and hierarchy are the same.
When we import the character, it would also be able to share animations with the previous
three (3) characters we showed a moment ago.
This character may need some supplemental animation to animate the tail or extra arms,
but you would at least have the shared animations to start with.
Any characters that don't have a tail or extra arms would not use that data.
Only the characters that have those additions would use that data.
This is perfectly fine.
Things become problematic when we create a character,
but significantly change the bone hierarchy, or rename any of the bones
in the hierarchy and then choose to import that character.
In those cases, we would need to use a separate Skeleton asset.
For example, here is a setup of our character's arm.
We just said we can add things to the hierarchy, so this is perfectly fine.
As soon as we change the hierarchy, like so, that is a problem.
UE4 will look at the bone and hierarchy information, and see the order has changed.
Even though each example is using the same amount of bones,
the hierarchy and potentially the naming convention
might have changed, which would be problematic.
The same is true for our Skeleton asset example.
Adding bones here in the arms would be a problem as well.
The hierarchy is now different and we would not be able to share Skeleton assets when
we import this Skeletal Mesh.
This is also true if you rename your bones or use different bone names.
If use different bone names and the hierarchy is the same, you wouldn't be able to share
Skeleton assets because the Skeleton Tree is not the same.
The takeaway is adding to things is okay,
but renaming bones or reordering the hierarchy is not.
It is not the end of the world.
There are other measures you can take in these instances
to share animations between characters that use different Skeleton assets.
There is some extra work involved, which is the retargeting process we talked about,
and will show once we get into the editor in a moment.
Now, we know a little bit about what Skeleton assets are in UE4.
Skeleton assets are essentially a list of bone names and hierarchy information.
Skeleton assets are used to drive the animation of characters in UE4.
Skeleton assets can be shared among multiple Skeletal Meshes as long as the base bone and
hierarchy information are the same.
What else do Skeleton assets do for us?
We also mentioned that Skeleton assets are used in
retargeting for different Skeletal Meshes.
We will jump into the editor to showcase this in a moment.
The tiny character and that large character
share the same Skeleton asset and the same animations.
Skeleton Retargeting may be needed to ensure the animations aren't disproportionally
stretched or compacted when playing those animations on their respective meshes.
Animation Retargeting will allow us to share animations between
two (2) Skeletal Meshes that are using different Skeleton assets.
You might be thinking in order to share animations
between two (2) Skeletal Meshes, they must use the same Skeleton asset.
This is generally the best case scenario as there is very little work involved in getting
the Skeletal Meshes to share animations unless you are doing Skeleton Retargeting.
In the event your characters do not share the same Skeleton asset and you want them to
share animations, you can use retargeted animations.
Animation Retargeting takes a bit of extra work to set up and this is something we are
going to show inside the editor in a moment.
Skeleton assets are also used to create sockets, save notify names, curve names, and slot names.
We are going to show how to set these up inside the editor as well.
Very quickly, let's say you wanted a character to carry something in their hands.
We could create a socket attached to the character's hand inside the Skeleton asset.
Then, we can populate that socket with a sword or a gun, and as the character moves or plays
an animation, the sword or gun would move along.
Any other Skeletal Meshes using the same Skeleton asset
would also be able to populate and use that socket to attach things.
Sharing Skeleton assets makes things easier because essentially,
we don't need to create a socket for each character.
Notifies can be used to fire off particle effects or
sounds at a defined point in an animation.
For example, there could be sounds of footsteps as the character is walking around.
However, you can also create custom notifies which will fire off events in Blueprint script.
Notifies work like a normal event in Blueprint script
and can be used to trigger pretty much anything you want.
These custom notifies are saved along with the Skeleton asset.
You can reuse custom notifies with multiple characters that use the same Skeleton asset
without having to create the notifies each time you want to call those events.
It is very important to save your Skeleton assets.
When creating notifies, you will be working inside
an animation where you can actually add the Notify.
You will need to save that Skeleton asset because that is where the notify is attached.
Otherwise, you may lose the notify.
Save often, worry less is my motto.
Before we wrap up this video, I quickly wanted to talk about some other things.
Skeleton assets are also used to save curve names.
Curve names can be used to influence Morph Targets, modify bone transforms,
or drive the change of any Material Parameters you may have set up.
If you want the character to exhibit a blush or a facial expression
driven by a Material Parameter, you can use a curve to drive that change.
Curves need to be saved with the Skeleton asset and not in a particular animation so
they can be reused across multiple characters sharing the same Skeleton asset.
Finally, we have slot names.
Slot names are a way you can set up and perform split-body animations.
For example, you could define a slot called Upperbody which starts at the hips.
We can then use that slot to apply animation to anything above or below the slot.
We could play a walking animation on our legs while our
Upperbody performs a gun reloading animation, for example.
As with Notifies, curves and sockets, slot names need a place to be saved.
Slot names are saved along with the Skeleton asset allowing you
to use the slots across multiple characters which use that Skeleton asset.
You can kind of see the trend here.
There is a lot of repurpose and reusing,
which is why you need to save your Skeleton asset.
I know we covered a lot here.
I would like to pause now.
We will pick it back up in the next video where we jump inside the editor and
demo and drive home the concept of using Skeleton assets inside UE4.
We are going to pause here and we will pick it back up
in a moment inside the editor.
♪♪♪