♪♪♪
(Wes Bunn) All right, so we are back. In the previous video, we got an overview of what
Animation Montages are, how they work, and what they can do for us. We also kind of stepped
through how we are going to set up our punching sequence. So in this video, we are going to
build our Animation Montage and set up that punching sequence, as well as do a little bit
of animation retargeting to clean up some of our animations as well.
So, let's continue. So inside of our project here, I am going to hop down to the Content
Browser. Under the Animations folder, we are going to Right-click in an empty space. We are going to go
up to Animation, and then choose Animation Montage. Now, it is going to give us the
Pick Skeleton dialogue box here. If you had any other Skeletons, they would be populated here.
We only have the one, so go ahead and select it. It is going to give us a new asset in the
Content Browser and ask us to name it. So let's name it the "PunchingMontage," like so.
Then, go ahead and Double-click on it to open it up. Now, that is going to open Persona
for us. Notice that we are now on the Animation tab of Persona and that our Graph tab is no
longer present as we are not working inside of an Animation Blueprint. Our Mesh and our
Skeleton tabs are still here, but our Graph tab is currently gone. So traditionally, or
not necessarily traditionally, I guess it depends on what you are doing at the time,
but most of the time if you open Persona with an Animation Blueprint you will get the best
of both worlds because you will have all 4 tabs available and presented to you. So before
we start working on our Montage, I wanted to take a look at our animations really quickly
because there is something I wanted to point out. So let's go down to the Asset Browser
here and let's choose our MontageExample_Start, this is our Punch Start. Let's play that.
It is kind of playing pretty fast inside the viewport here; that is because it is a short
animation and it is just looping over and over again. I guess it is probably better
to illustrate this with a punch, so let's choose one of our punches (MontageExample_Punch_1), actually.
So if you look inside the viewport as I scrub through our MontageExample_Punch_1 here, notice
what happens to our Character as we do so. So you can see there is a little bit of stretching
happening. His left hip is all kinds of wrong. (Laughter) So, we are going to fix that with
animation retargeting. So the way we can do this is inside of our Skeleton Tree over here,
which can be accessed from the Animation tab or the Skeleton tab right here, what we are
going to do is click the Show Advanced Options box here. So go ahead and click that. It is
going to give us the Translation Retargeting column. Notice all of these settings are currently
set to follow the Animation. When I say that, I mean that all of our bones over here are
currently following whatever the animation is doing. So we want to change this. We want
to make some adjustments to this. So what we are going to do is there is kind of a quick
way we can cheat and kind of do this, especially in our situation because we are only doing
a one-way animation retargeting sequence here. We are only worried about taking the animations
from our Character that had different proportions (using the same Skeleton but different proportions)
and doing the retargeting on this Character. If we had to do animations from this Character
and pass them to the other Character, there would be a little bit more work involved in
that. So for our purposes, this is going to be pretty simple. So, let's Left-click on
our root bone here. That is going to select all of our bones in our Character. Then Right-click
on our root bone and then down under Bone Translation Retargeting, go ahead and choose
the Recursively Set Translation Retargeting to Skeleton. Now that is going to set all of
our bones to Skeleton inside of our hierarchy here. Now if we scrub through our Timeline,
you can see that our animation has been cleaned up. Our hip looks better. The punching looks
better. However, our Character is kind of floating up in the air a little bit now. So
you can see that. We can fix that. We can go over to our pelvis bone and we are going
to change this one individually. So let's click the drop down here and go ahead and
choose the Animation Scaled. So go ahead and choose that. That is going to pop our Character
back down. He is still floating a little bit, but once we get in game you won't see that
as much. I think that will be fine. Then, we need to hop back to our root bone. Just
to be careful, make sure that our root bone does indeed follow Animation instead of the Skeleton.
Everything else can follow the Skeleton. So that should clean up our punches.
If we go over to our ThirdPersonIdle now, that is also going
to fix our Character's arm so it is no longer dislocated as well.
So with that, we are done with our retargeting for now. Let's hop back to our PunchingMontage,
so let's go back to that. Double-click on that. In this center window here, this is where
we are going to be setting up how our Punching Montage essentially works. So let me expand
that up a little bit so you can kind of see that a little bit better. There are several
sections in here. There is the Montage section. This section up here, if I go back to our DJ example... I did the
air quotes there; you didn't see it. (Laughter) In our DJ example, this is essentially our crate full of songs, or
records that we can play our animations in. So we can pull all of our animations in here.
All the animations that we want to use essentially can be stored in here. Then inside of our
Sections, this is essentially going to be our playlist so we can decide what gets played
when and how. Then there is Notifies, which we will work on a little bit later in this
series. A couple of videos from now we will come back to this and start working on Notfiies
so that we can play a Particle Effect whenever we have our Notify in place. We will actually
set that up in here as well. There are some things that we need to do in here as well,
so we will get to that in a moment. Then, there is Curves. There is no Tracks for Animation
Montages. But Curves and Tracks can be found on animation sequences as well. So you have your
Curves, Tracks, and Notifies on animation sequences as well. So, let's work on our Animation
Montage. Let's queue up our crate full of tracks here. The first thing we are going
to do is grab our MontageExample_Start here. We are just going to Left-click and drag that
into the middle track here on our Montage. So go ahead and do that. You will see that our
Character starts playing that animation. Let's grab the MontageExample_Punch_1 now and drag
that in. Left-click and drag that in, like so. You see it gets put onto a separate track
for clarity. Let's go ahead and grab our MontageExample_Punch_2 now. Drag that in.
Then, let's grab our MontageExample_End_1.
Let's drag that in and then our MontageExample_End_2. So now you can see that our Character plays
all of those animations back-to-back here. There is a little bit more work we need to
do inside the Montage section here. Let me pause this because this is getting a little
bit distracting. So I am pausing that. We need to actually set up and define our Sections
for our Montage here. So we can do this. This top section up here; this top section... (Laughter)
This top part up here is where we can put our Sections. So to do that, we can Right-click and we can
go down to New Montage Section. So go ahead and select that. It is going to ask for a
Section Name. Let's go ahead and give this a descriptive name such as "PunchStart" because
we are going to add a Section for each of our animations here. So PunchStart. Now that
we have our PunchStart here, (a Montage has to have a Section by default which is why
there is this Default Section here) we can actually delete that. So let's select that
and hit Delete. Can I select? Delete. Oh, Right-click on it; that is what I want to
do. Let's Right-click on that and choose Delete Montage Section because we only need the PunchStart.
Then we will add Punch 1, Punch 2, Punch End 1, and Punch End 2. So let's go ahead
and add those. Let me re-pause this. Let's Right-click, add New Montage Section, and
call it "Punch1." Right-click, add a New Montage Section, and call it "Punch2". Right-click,
New Montage Section, and "PunchEnd1". Right-click, New Montage Section, and "PunchEnd2". Now
we need to move these Sections into place. So what we are going to do is Pause it one
more time. Stop playing. Let's grab our Punch... (Laughter) It started playing again. Let's
grab our PunchEnd2 here and let's move it to the start of our Punch End sequence
here, so it is right about there. You can Mouse Wheel Up to get it lined up. It doesn't
have to be 100% accurate, but as close as possible to the start. So there is our PunchEnd2.
Let's grab our PunchEnd1 and move that over as well into position, like so. So something
like that. Let's grab our Punch2 sequence, the start of Punch2. Put that in, like so.
Let's zoom out, get our Punch1, and place that like so. So now that we have defined
our Sections, we can actually hop down to the Sections section of our Punching Montage (Laughter)
and define how our playlists are going to play out, essentially. So first of all, you can
see that our Character is playing through all of those sequences are playing back-to-back
on the Preview line here. We are going to hit Clear to clear all those out. So hit
Clear. It is going to allow us to preview each individual Section as we would like.
So starting from the top, what we are going to do is click right here where it says (it is kind of cut off) PunchStart.
Go ahead and click on that PunchStart. Now we can choose what the next
sequence is going to be played. So go ahead and click the Punch1. You can see it has been
added now, so we are getting PunchStart and Punch1. Now we can click on Punch1 and then
add Punch2. So now we are getting PunchStart, Punch1, and Punch2 played. Go ahead and click
on Punch2 and click on Punch1. Watch what happens when we do this. See that it changed
colors and it didn't actually add it. But what it has done is said, "Okay, I know what
you are trying to do. You are trying to loop these two back-to-back." So if we Preview,
you can see it is PunchStart. Punch1 and our Character is Punch1. Punch2, Punch1, Punch2.
But we have no way to actually break out of Punch1 and Punch 2 and play either our PunchEnd1,
or our PunchEnd2. So we need to make some adjustments here really quickly. We can do
that inside the Notifies section. Our Character is actually punching kind of fast here. We
will adjust that right at the end here before we wrap up this video. So let's add our way
to get out of our looping sequence here. Let's go down to the Notifies section and let's
Pause. What we want to do is as we scrub through, we want to add a Notify Event towards the
end of our punches to check and see if our player is still holding down the Punch button.
So somewhere about right around in here, somewhere towards the end. You can see here is the start
of Punch2 and the end of Punch1. What we are going to do is Right-click inside the Notifies
bar here, so Right-Click and go ahead and choose Add Notify. Again, this is where we
can add Particle Effects, or sounds, but we are going to add a New Notify Event. So click
that, New Notify. It is going to ask for a name. We are going to call this "IsStillPunching1."
So "IsStillPunching1" is what we are going to call that first one. When we select it,
you can look in the Details panel in the upper right. What we want to do is let's go to the
Event section and expand that. Under Montage Tick Type, click the drop down here and there
is an option for Branching Point. So, this is going to give us a Branching Point for
this particular Event or this particular Notify. So when we get to this point, it will fire
off an Event where we can branch and go to a different section if we need to. So let's
do the same for the end of Punch2. So we are going to scrub the Timeline a little bit more
towards the end, somewhere around in here toward the end of Punch2. Let's Right-click,
Add Notify, and New Notify there. Let's call this "IsStillPunching2". Let's select it.
In the Details panel under Montage Tick Type, let's change that to Branching Point. Okay,
I think we are setup now with our Animation Montage. There is one more thing that we need
to do before we close out. Well, two actually. The first is that our punching sequence looks
kind of fast. Well, it is up to you. If you would like to keep it like this, that is fine.
But if you want to change that speed, you can go down to the AnimAsset Details under
Rate Scale. It is currently playing at 1.0. You can change that to say like 0.5; he will
punch slower. Or if you want to change it to 1.5, he will punch a little bit faster.
I actually think I am going to keep it at default so that this Montage plays at regular
Rate. I thought about changing it, but I changed my mind. So we are going to keep it at 1.0.
But if you would like to change the playback speed of this animation, you can do it right here.
So the last thing that we need to do is set up what is called a Slot. Now, a quick
rundown of what a Slot is going to do for us. We are going to get into this when we
actually set up a Slot in our Animation Blueprint later. What a Slot is going to allow us to do
is kind of split up and selectively play this Montage on our Character's body from
say for example, the upper half of the body. So if we had a reload animation and we wanted to play that
reload animation but we didn't want to create a reload animation for a Character that is
standing, for a Character that is crouched, or for a Character that is jumping, etc., we
could have one reload Animation Montage. Then, play that Montage in a Slot. I am doing air
quotes again. Play that animation Slot on our Character. Then what we could do is say, "Okay, anything..."
The best way to describe this actually is here inside of our Skeleton Tree.
So do not apply this Slot to anything below the pelvis. But do apply the Slot to anything above the pelvis.
So that will allow us to play two animations on our Character based on a bone.
So we are going to get into that a little bit later and break that down a little bit
better once we get to that. But we need to set that up in here first before we can do
that. So to do that, we are going to go back up to our Montage section. There is a little
Magnifying Glass icon here. Go ahead and click the Magnifying Glass icon to open our Slots
and Groups (Anim Slot Manager). The window opened up off-screen; let me drag that in. So what we are going
to do is Add Slot. It is going to ask us for a Slot Name. We are going to call it "UpperBody"
because we want this to play on our upper body. But before I actually hit Enter here,
let me just say this to you as well. This is not actually defining that we want to play it
on our upper body yet. You can name the Slot whatever you would like. This is just for
reference to let me know where I want this to play. We still need to define exactly how
that is going to be applied to our Character's body. So, I just didn't want you to associate
the naming of the Slot with where it is going to be playing because that is not the case.
But for our reference, we are going to call it "UpperBody". So let's go ahead and hit
Enter. Then, let's Save and then we can close our window. Now we need to actually set that
Slot. So click the drop down here and call it the DefaultGroup.UpperBody Slot. So let's
go all the way up to the left up here inside the Animation tab of Persona and Save so that
we save everything. With that, we are going to pause here. I think that is enough for
this video. In the next video, we will hop into the Animation Blueprint and being hooking
up our Punching Montage here. So, let's wrap and we will see you in the next video.
♪♪♪