Animation Montages | Adv. Anim Application [UE4/UE5]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome back to advanced animation application today we're going to be looking at animation montages in unreal engine and why we use them how we use them when we use them what we use them so let's begin we're gonna go to the animation folder that i have set up we're gonna go to let's go to like i don't know combat um we'll get like a dodge roll or something i know you can't see that here we go so the way that we create an animontage is we need an animation asset uh which is an animation that has a green line underneath it i don't know if you can really see that too well you can see that it has a green line underneath is an animation sequence what we're going to do is we are going to right click on this and we are going to create a montage let's call this tutorial roll montage call it whatever you want i don't care okay and so now if we click on roll tutorial montage you can see that it is an animation it's just you know a looping action whatever we have our blend options over here so i blend time uh blend in blend out the type of blend that it is and then over here we can actually specify what montage slot it gets played in now we're gonna look at this a little bit later so now that we have a montage set up how do we use it well well i'm glad that you asked if we just go into my player character and we go keyboard r maybe what we can do is we can get out mesh we can go play play montage and we can literally just play a montage from absolutely anywhere you could even play a montage on something from you know another actor if you wanted to if you had a reference to it obviously um montage to play tutorial roll montage and now if i was to press the r button we play that montage and you can see it just it does it's got root motion in the animation and that's being you know that's being used as well now you can see that if i keep pressing r it's going to keep playing it over and over again it's a bit whack this is where the play montage node actually comes in really handy so you will notice if you type in any montage there is another and a montage node uh this one sucks this one just straight up sucks ass i wouldn't use it it's just why it has less options than this nice one so when you are looking for play montage don't use this one use this one this one is much superior the reason being that it has these extra execution nodes so this one here is immediately as the animation starts playing so let's just make a variable called um is busy or something and so when we do this is busy get set to true and then when the animation blends out is busy is set to false and then what we can do is have a branch and only play this montage if we're not busy right so we're using these execution out pins to basically say okay well we can't just play that animation over and over again so if i just keep spamming r you can see that it's uh it's waiting till the animation's finished until it lets us do it again and now we're in water so obviously this bit of logic that we've set up is extremely primitive um but this is sort of the basis of any kind of you know action system where you've got exclusive actions that you don't want to be playing over the top of each other and interrupting each other and blah blah so why do we use montages uh particularly this play montage node so the thing about montages is they are a one-off animation that has you know a start and it does its thing in the middle and then it finishes and then we go back to you know regular whatever was going on before in comparison to a state where you know often it's a looping animation so like a running animation is a state you should use montages for all of your actions so another thing to note about montages particularly this play montage node is you can call this in blueprint you don't have to go to your anim graph and you know somehow funnel everything through play montage in the in the anim graph or use a state or something you can just call this node straight in blueprint now another key thing about any montages is what slot they get played in so this one here you can see that it's default group dot default slot if i go to my animbp right here default slot so you can see that there is some logic before this slot and some logic after this slot now because i have this placed in this particular spot all of this stuff before it so all of this you know foot locking ik and all of these like additive leaning poses and you know crouching and torso states and that kind of stuff will get overridden by the montage that's playing so if i hit play and i do a punch or something none of that other stuff is getting run anything before that isn't getting run well i mean technically it is getting run but it's getting overridden by the the montage however anything after this slot does get run so you know i have um some torso rotation stuff and more torso rotation blending and foot ik and so basically for me that means you know when i'm attacking the torso of the character can still rotate in the animation so if i click here and then move there you can see that my character's torso rotates same thing you know if i attack here he attacks towards the ground if i was to aim up here you can see that he's attacking up you know towards the where the cursor is so that's one way that the positioning of the montage slot in the anim graph is important because you know anything before it will just get it'll kind of get discarded and it'll just play the animation exactly how it is over the top of it now you can have more than one montage slot in your anim graph so you can see here i have a slot for get up animations and the death animations and the reason i do this is because the get up animations i don't want them to be affected by any of the you know the looking at stuff or the you know the torso rotation things so i opted to use another slot rather than just disable everything for this one animation type now another thing that these slots are useful for is if you only want your animations to play you know on the top half of your character so you know they can walk along as normal but then you can play a like a waving montage or something and they'll you know their legs will keep walking if you want to learn a little bit more about this node here the layered blend per bone you can do so in this video in which i talk about in a bit more detail one more thing to note about montages is you can put notifies on them so you know you could put logic like um notifies that play sound effects on your montages um you could do you know when the when the weapon traces are active and you know what the the parry window of a parry animation is and stuff like that you could do that all with anime notifiers and anime notify states which i have a video for coincidentally right here another quick thing that you might want to do if you're using montages quite a bit is on your character have a variable called current montage um you can actually make a variable of type montage and montage and instead of just playing the montage straight like that what we are gonna do is select the montage from here so punch tutorial whatever and just put that into here and you know this hasn't really changed much except now we actually have a reference to what the current montage is now the reason that's handy is because we can actually say stop and in montage and if we have a reference to what the current montage is we can stop it now if you're only ever playing one montage at a time this will work it'll get the most recently active montage on the skeleton and stop it but something i figured out is all of my actions in my action system uh you know they're all using montages blah blah blah it's all good however i use other montages like when i switch foot position you can see that little additive montage there sometimes if i wanted to interrupt one of the attacks so let's say we're attacking but then we get shot in the head we want to cancel that animation if i was just using that stop any montage node without specifying a particular animation for it to stop sometimes it wouldn't stop the animation because it would be stopping that little foot transition animation instead of the you know the sword swing or whatever so that's just something to note it is a good idea to always have a reference to the current montage and you know you can set this to null so you could say on blend out um set this to none and you know that's perfectly valid so that kind of wraps up our video for today that was and in montages how i use them personally uh the method that i use them you know the node that i use in particular use them through blueprints so using them on the logic side of things rather than in the anim graph where it can get a little bit you know bit because you're going in and out of different components to just do one simple thing basically to recap they're best used as one-off actions so attacks climbing over objects and stuff dialogue talking actions you know characters emoting and that kind of thing and you can actually kind of integrate them into you know your gameplay logic um rather than it being something that is just resultant it can actually cause events in your your gameplay so if you learned something new from this video make sure that you subscribe for more because there's always videos coming out and it's you know we have lots of fun we learn lots of stuff if you do want to learn with me in real time i do stream on twitch so i've linked that in the description and if you do want to go one step further in supporting this channel and the tutorials and me and my cats then you can do so through patreon for as little as one dollar per month also in the description so very big thanks to all of the patrons every single one of you i genuinely sincerely really appreciate all of your generosity so with that being said i guess we say goodbye [Music] goodbye [Music] actually [Music] you
Info
Channel: PrismaticaDev
Views: 32,970
Rating: undefined out of 5
Keywords: ue4 animation blueprint, ue4 animation montage, ue4 animation retargeting, ue4 attack animation, ue4 dodge tutorial, ue4 dodge roll, ue4 montage tutorial, ue4 montage notify, ue4 montage loop, ue4, ue4 tutorial, ue4 tutorial for beginners, ue4 tuts for you, unreal engine animation tutorial, unreal engine animation blueprint, unreal engine anim montage, unreal engine action system, ue4 action animation, ue4 climbing animation
Id: 2dmqKf6w5J8
Channel Id: undefined
Length: 12min 26sec (746 seconds)
Published: Wed Feb 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.