Unreal Engine 4 Tutorial : How to use Sync Groups | Sync Markers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys matt here today i wanted to show you a very useful feature uh that is quite hidden and i'm not sure people are talking a lot about it at least from what i see in the uh in the community and in forums um and in unreal engine this is called sing groups and with it comes the possibility among others of course to synchronize your transitions over steps which means if you transition uh from animation a to b you will be able to preserve your i don't know i'm not sure how to call it the the foot phases the food cycles the the footing uh doesn't matter really how you call it uh what i'm going to do instead of talking um too long i'm just going to show you the result with and without it and you'll see for yourself let's get started [Music] okay so what i've done for the purpose of that video is that i've created a very basic uh system where i have a a start animation that blends uh into a loop and then i have a stop animation but it's the stop animation is not relevant for for the video what i want you to take a look at and see for yourself is the transition from my start animation to the actual sprint loop um i think it's pretty tricky for you to say exactly when i transition from from uh from my start to my loop um obviously i have a longer blend but the important thing that i want you to to see here is that the legs are consistent across all the the movement what i've done as well to also prove the point while moving is that i've created a very also simple mechanic that when i press left control and hold i'm i'm in um the crouch mode and same thing when i transition from crouch and back uh you can you can see that uh the the food cycle is is is preserved and and very consistent and smooth you can see it in game and you can see as well on the on the left uh the left screen so on the the preview one uh even though i trigger a lot of transitions there's no like scissoring or anything now let me show you the effect when i don't use sync groups so i'm just gonna quickly deactivate it from here from the start and from crouch okay this is how it would look like if even though you have you know uh blends between your start and your loop and then between your two loops this is the result you would have without using syn groups so you can see here uh it's it's very noticeable uh you can very easily notice the moment where i transition from start to loop because there's something wrong happening with the legs and same thing when i switch to crouch even though i have a pretty long blend which means that the motion is still smooth when you look at the legs you have some pretty funny things happening and you don't want that usually when you when you create animations you know you've spent some time creating some cool animations uh you start building your systems and then the actual blend which is nothing is just you know your data blended with another data uh without using syn groups you would have something not very appealing but this is important to remember this now the the pretty cool part is that it's actually very easy to set up it's it's requiring only two two actual steps the first one is just to mark your animations with what unreal calls sync markers and then you will have to make sure your animations that are gonna have to be synchronized are using what unwill calls syn groups so let me show you how it's done the first thing i did is to mark the animation so this is the start to sprint animation that's one animation that i took from mixamo this is a pretty tricky one because it's very short usually when i when i uh make start animations you have a lot more steps also because when you see here the character hasn't reached full speed at least to me and it's hard to transition to a loop at that moment uh so it's it's it's good to remember to have you know many more steps than we have here and even to include at least one cycle of your loop in your stars that way you have you know you have buffer to transition smoothly to your uh to your to your loops so um i had to cheat a little bit so what i've done is that here i just recognize that frame as a left step and then this one the moment where my right foot is just flat on the ground i have added a right step uh don't pay attention to the the typo i've just missed the the key here but i i didn't want to redo everything so the important part is that my right steps are uh having that typo everywhere and then the engine remembers that so this is for the idle to sprint animation i've done the exact same thing for my uh sprint loop okay left step here right side here one thing pretty important how how to add these uh because i have them so let me just remove this one at the moment just find a frame that is um actually the good one for a step so when your foot are flat on the ground and then uh here under the the notifies track you can right click add sync marker in your case you would have a new sync marker and then you will type say left step the moment you create one it will be then available onto existing sync markers and you can see i have my my both of my sync markers here so uh just click on the left step and then you will be able to just add it if there's a pretty cool feature as well very simple but pretty cool still that you can copy and paste them over so if you had a another left step here somewhere in the in the animation you can just press ctrl v and then it will just paste it wherever your marker is and it will just prevent you from right clicking you know and and use the drop down menu so start animation done the loop animation done and we need to do it in our crouch as loop as well so same thing right left right left okay now the second thing we need to do is actually to tell unreal that these sync markers are part of one group that will have a unique name and then all of the animations that are supposed to be synchronized over steps using that scene groups need to tell the system that they're part of that syn group and then suddenly your sync markers are going to be available for the system to synchronize your steps to do this it's on your animation clip details here you have a a property that is called syngroup and then you have group name here you can give any name you want uh but you just have to remember it because this is uh this is a name that's gonna be shared across all of your animations so i've called mine steps sync press enter then you will see here that it's part of the scene group step sync and then what you can do is just copy the name over making sure your start animation is in it that your loop animation is in it and any other animations that are supposedly uh gonna have to be synchronized uh need to enable this scene group as well right to wrap up let me just quickly explain how this works under the hood so we'll just um i'm just gonna draw really pretty things now uh so we're gonna take the example of our transition from our start to a loop animation so this is this is gonna be my start animation okay um and then i don't remember exactly how it was but just let's just say uh somewhere around here we had our left step and somewhere a bit later right step and then i have my loop animation which is let's just say shorter and then you know it repeats over time as long as you want it to and then same thing uh let's just say on frame zero i have a left step and then somewhere uh halfway through my cycle i have a right step and then it keeps repeating over and over again okay now what i've done in my system is that i told unreal that when the time remaining of my star animation was less than 0.2 uh please start blending out to my loop animation for to keep things easier i will just pretend that 0.2 is actually exactly in between a left step and a right step now if you don't if you're not using uh synchronization what will happen is that you will start is that the same color yeah i think it is you will start blending to your loop okay so this is this is the actual time of the blend 0.2 okay but then then again this is your frame 0 and say 30. when you're not using synchronization unreal will just start your loop animation here at frame 0 which is a left step so in your start your left step is just already behind already done and so your character is just so the last step is just dragging behind your character and then you blend to an animation that is having the the left foot flat on the ground so you will have like the left foot will just come back um to the ground and you will have the left foot like dragging behind and you will have some kind of weird phase happening now when you enable the scene groups and synchronization unreal will know just because you let it know that we're exactly between in between left and right step that it has to start the loop at the exact same phase so what unreal will do is that he will look at your it will look at your um loop animation and 50 between left and right step is actually gonna be somewhere around here so maybe frame seven say okay pretending this is halfway so 15 and then it will just slightly uh shift your um it will not start at frame zero but at frame seven okay so then left step will be uh somewhere so oh sorry just me just like in in orange left step will be here and then right step will be here and then with the blend you will have a perfect match um and so your your footing will be preserve your foot sequences foot phases i never know how to to call this food cycle is going to be preserved this is this is actually how it works under the hood and that's it really see it's it's it's not rocket science it's actually pretty easy to understand how it works and it's even easier to set up so there you go you can start using it and your animation systems and and gameplay systems will definitely benefit from from the results if you haven't yet please consider subscribing to my channel uh if you've enjoyed the video found it useful leave a comment press that like button it's always you know you're a couple of clicks away uh from making me happier today uh you know receiving your support is just pushing me to create content so think about it thank you very much for watching i will see you hopefully very soon and until then take care have fun bye
Info
Channel: Matt Courtois
Views: 2,026
Rating: undefined out of 5
Keywords: tutorial, game animation, gameplay animation, motion editing, matt courtois, unreal, unrealengine, ue4, unreal engine, blueprints, animblueprints, animationblueprints, unreal engine 4, epic games, animation graphs, animgraph, unreal engine 4 tutorial, unreal engine 4 beginner tutorial, sync groups, sync markers, steps sync, step synchronization, synchronize steps
Id: lWRsPl_IX7c
Channel Id: undefined
Length: 13min 30sec (810 seconds)
Published: Tue Apr 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.