Motion Symphony: Dev Update - Cut Clip Support, Optimisation & Trait Tags

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there and welcome to this dev update for motion symphony uh another quick casual one uh maybe not so quick but we'll have a look at some new features that i've been working on these are features that absolutely are essential before release uh and i've made a lot of big progress on that so i'm pretty happy with that i'm going to talk a little bit later about release maybe not release date but about the release and how it's looking for release how close it is um i won't give an exact date that's for sure but we are getting close but yeah more on that later let's have a look at the new features so support for cut clips is now complete and ready to go some people might not care about this that's fine um but you know there's probably going to be a fair few people that aren't going to have mocap data and they want to use motion matching anyway uh good luck to you but yes i have tried to support cut clips as best possible with motion matching in motion symphony a lot of the techniques that i've done to do that are similar to motion matching for unity with a few extras that i've found unique to ue4 so this is a cut clip animation set uh it's made by kubold uh the movement adaman set pro which is available in the marketplace it's a very well-known animation set that a lot of people use so i thought it would be a really good test to see how motion matching goes with it and you can see it's working pretty well now yes there is support for cut clips but i have to stress the caveats um it's very important i don't want you getting the wrong ideas you will never get the same quality of animation with cut clips as mocap data end of story i'm talking not even close okay so here's some mocap um let me turn off this debugging quickly my sim search debug zero okay so this is mocap here with the walking animations and you can you can see just by looking at it that the animation data is very dense there's a lot of animations there's a lot of variation when we go over to the cut clips it's a lot more um it's a bit more rigid this is just a lot less variation and that's just the nature of it there's not really much you can do to get around it there's also additional work involved with cut clips that you need to be aware of especially if your cut clips are bad and finally if your cut clips don't have transitions so if you don't have starts and stops and transitions between you know here's a that's a start left 90 and you start left uh 135 etc it's not going to work uh the gap between poses and you know full-on running animation in a different direction is too big to bridge with motion matching um without these transition clips i mean technically you could but the responsiveness is either going to be poor or you ramp up the responsiveness so much that the animation quality just falls to pieces so yes even if you are using cut clips they do have to be a set that has a lot of transitions you will find that even kubold set has some missing transitions in the state in the strafe sets so for example from standing still to strafe right 45 you will have to make some messy blend or something to cover that gap but yeah just be aware of that but otherwise it is working and there's a lot of things that i have done to get it to work with cut clips it's surprisingly not as easy as you think um the the lack of continuity in the clips makes it really tricky and uh a lot of things need to go into compensating for that so let's i'll just go really briefly over that so one of the major things with cut clips that you don't get is that at the beginning of the animation how do you get past trajectory points when there is no animation and you can see if i look at the pose data i do have a path trajectory that is pre-processed which is nice so how have i compensated for this well there's two ways you can either extrapolate the past trajectory here or you can steal it from a previous animation so it's basically like tacking on a ford a run for loop as you can see i've put in here and it's stealing that bit of animation for the past trajectory you can do the same thing with the future if the if it's like a start and then and the clip ends abruptly so yeah that is one of the things i actually did this quite a long time ago but um in anticipation for cut clips but yeah that is one of the things the other thing is support for animation composites and blend spaces now i don't have the previews working for this because i've only just you know added support for this adding you know different types of animations but the previews will work when it's ready and yeah you can see here we can add they'll just show up blend spaces animation sequences and composites will show up in our animation list when we go to choose the system is designed so it won't let you add animations that aren't compatible okay so let's have a look at composites so what i mean by composites well the easiest way to fix one of the biggest problems with cut clips is to just extend them so in this case i've got a run forward start oops and i've tacked on two forward loops after it after it so the motion matching is going to treat this composite as one clip and just play it which is really useful because we don't have this problem here now what usually happens with motion matching is you get to this point it gets to the end of the animation and thinks oh i have to change pose because it's the end of the animation but then sometimes you know it'll get to here and then it'll flick back to here because that pose is actually also really good and it's in a different animation so you get this flicking back and forth it's really frustrating i've tried so many things to fix it in using other other methods but i find this is the best way to do it is to just have the continuity and ue4's built-in composites are perfect for that so those are completely supported and that problem is pretty much gone you can actually see most of my animations here are composites so any uh animation that's like a a start or a a plant i just make it a composite and add on those things now the the next thing is support for blend spaces and this is really important i'll have a look i'll show you the blend space because we can't preview it there it's basically it could be a 1d i don't know why i've made it 2d but 1d is support as well but it's basically an arching left and right blend space one of the limitations with motion matching is that you can only play the animations you're given and not really blends in between it will obviously blend from one to the other but it'll be really quick and you have no control over that so with a blend space instead of actually using the blend space as a blend space as we would traditionally and changing the parametric values we don't do that at all the blend space is just used to sample different points throughout the blend space and create post sets for those and we can make if we make them dense enough we get the same effect as a blend space which is pretty cool you can see here as i turn it's pretty smooth if i had a controller i only have a mouse and keyboard but if i had a controller you could get all the different arcs in between pretty well and it's quite nice so yeah that is blend spaces in here we can set what that interval is so along the x-axis 0.1 goes from zero to one so in this case there's ten samples along that blend space you could make it more dense or less dense it adds a lot of poses but when you're using cut clips you're getting very few poses anyway this is a thousand poses all together this whole set and that's with the blend space which isn't very much at all and when you optimize it you're searching 200 300 poses tops which is really a small amount to be searching for motion matching so yeah that is pretty much it for support for cut clips um again please remember the caveats it's not going to be as good as proper motion capture data made for motion matching yeah so let's move on from cut clip support and look at something else okay i'm going to look at traits now i talked about that briefly last time we so hang let me go to a different one that isn't cut clips so this one here um so we i showed you all these tags uh that we can do and one of the tags that i said i hadn't finished was traits and we can now create a new tag called a trait tag and we can give it a name so in this case i want i might hypothetically have some animations where the character is injured so i'm going to tag them all up as injured and i can type in the name on the tag there and it's going to pre-process that pose with the tag injured now i can also i'll just delete that i can also do that on the animation itself so down here i can add as many tags to the animation here and that'll apply to the entire animation that's probably going to happen a lot you're usually not going to have injured animations for example in the middle of your other animations but you can either use the tags or do it on the whole animation now you do have to pre-define your tags because the way they're combined with flags so you can have a combination of tags you could have injured and strafe tag active at the same time so yeah if you go to project settings we now have a section for motion symphony under plugins where is it motion symphony and if we look at traits we can add all these traits here so you can see i've got injured i could add in others but it doesn't really matter you can have up to 64 of these in motion matching for unity i had only 32 which is quite small but i haven't really had a problem uh with with that really and at the same time you've got these traits but you also have states so you can match out in and out of states and such so it's not really going to be a big deal i can increase that number in the future if required so that'll all be based on p on feedback but for now it's only 64. is the limitation for the number of traits we won't talk about actions that's uh well i'll talk about that a bit later but it's not something that's going to really really happen okay so uh more on trades if i go back here and we go to our blueprint our animation blueprint and let me just find a node so here's a motion matching node we can go down to the trade section and we can actually expose this as pin or we can just bind it to something so we might have for example motion trait that that's a variable i had in there um and but anyway we can say what traits we currently require uh and that can be based on our gameplay maybe the charac the player presses the holds down the control button and then the crouch tag is required i mean you could also just change the different state but maybe you want to simplify your states and you have it basically within the motion matching you say i require the trait tag it gets plugged in here and what the system's going to do is it's going to uh only search poses with that trait so you will only ever get animations with that trait additionally if you've optimized it it's it's it's actually separates poses out into different bins based on its trait and this doesn't matter which form of optimization you use it'll do this for any form of optimization that comes with motion symphony which i'll talk about in a moment so it actually helps with performance and also um animation control again it's really no different from making a different state and that's why i'm not too concerned about this feature in some cases i feel like you should just have a different state it's easier to debug it's easier to look at but if your state graph is becoming too complex then yeah maybe you could add some different traits and do it that way okay so that brings us to the i might actually get rid of that before i forget um let me unbind that remove binding there we go so let's have a look at optimization now that this is one thing that i have been you know i'm not going to release this unless it's got decent optimization i'm happy to say now that i'm finally happy with where it is at with the optimization i did show you a long time actually it's quite a while ago i did my optimization was using clustering clustering trajectories and then it's like multiple stages of clustering either way it colds like 97 of the poses however i've done further optimization to you know make it a little bit more cage friendly to you know just remove a lot of the overhead to try and minimize the amount of uh you know the time spent on motion matching and i'm pretty happy with where it's at uh it's you know most frames it's not even searching and therefore it takes the same amount as a as a sequence player and then on frames where it searches it's you know maybe uh like like playing two sequence players tops really so it's it's pretty fast and that's that's in debug mode and in the editor and everything so it should be even faster um you know once once it's done but yeah so it's not really very heavy now especially when you optimize but i wanted to show you the way it's now i've now set up the optimizations i've set up something called optimization modules and you can see here um i can just slot in an asset and this sounds kind of weird and it did to me even at first but it made sense after i thought about it for a while we can create these optimization modules which store the optimized data structure of the poses separately from the pose data we still need to maintain the original pose uh database for for sequencing i won't go into dsl on that but we do need to also organize the poses into structures that are fast to search and i've done it this way because i want to still be able to experiment with different optimizations motion symphony will come with two one is trait bins and one is multi-clustering is what i've decided to call it but there's other ways you could optimize motion matching there's you know um voxel cells there's kd trees there's uh layered axis aligned bounding boxes there's probably a lot more different ways to do it and so really if if studios or people that are just really super keen wanted to have a go at optimizing a motion matching search you can actually create your own and there's kind of a base class that you can inherit and you can create your own kind of optimization um full motion symphony but it will come with two the trait bins is very simple it's a linear search but it does separate animations by traits so that you will only ever search uh animations with traits that's just there as a kind of a base like a base case and then the other one is the multi-clustering which does all the sorts of clustering so yeah now though you can have these modules you can i can slot in and out if i someday come up with a better thing uh better optimization in the future you can just slide it in it doesn't affect your project or anything and which is nice because before it was built in and if i were to change that it would screw up your project and i don't want to do that so we have that there the other cool thing is the pre-processing time to do the multi-clustering is reduced significantly it used to take hours i'm not kidding and that's because of the hierarchical clustering which was the second stage of clustering and uh that was even with a relatively small data set and so i've changed that all to k-means clustering which is much faster obviously but i needed to come up with a way that it would be reliable uh and the the initial clusters would be chosen um consistently and also uh evenly spaced so that it you know would be fast and now it pre-processes in under a minute so yeah that hour-long or plus pre-processing is just too long for production i i could not release this in that state so i'm pretty happy with that where that's at so performance of runtime and performance of pre-processing significantly improved and i'm not going to do anything more on that until release that's ready to go okay so what else i think that's pretty much it i've done a lot of small things around here and there bug fixes crash fixes you name it i'm not going to go into all of that um i will touch on distance matching it is something i talked about before as my holy grail of motion matching basically um i did get it to work but i'm not happy with where it's at but at the same time i don't want to hold the motion matching back from you for too much longer um i don't know how long it's going to take for me to get this right because um it's not just regular distance matching it's within the motion matching set and it's it's a bit tricky to get that working so i've decided okay i've i've got the proof of concept it somewhat works um and i'm going to leave that all in there and it's going to be marked as you know experimental use at your own risk but yeah it's basically i can add in these distance matching tags and we can trigger distance matching during the motion matching so for things like starts and stops and the idea is that you don't have root motion you have you know controller based motion and then the distance matching is used to match your animation to the um match your animation to the uh movement instead of your movement to the animation which is the op basically the opposite of root motion so yeah this feature is experimental i really want to do it after release like completed after release but i i'm not confident that it's going to work enough to hold back the project any longer on this so keep that in mind that that's going to be the state of that in release but you will have regular motion matching my goal is to have a really really solid base for motion matching and i'm getting to the point where i'm really happy with the bass the ground work and the performance and if that is solid then i can build on features on that based on feedback but yeah there's uh that is something that i have been working on the only other thing that you might have seen in the preferences was actions so actions are basically like um in the wrong section uh project settings plugins motion symphony actions so you could define action names here just like traits but i am going to remove this uh basically actions are a way to explicitly play an animation within the motion matching data set however the more i thought about this the more i thought it's not really i don't feel like it's appropriate in ue4 in unity it it was required i had to do it there was no other way to explicitly play animations unless i did that system but in ue4 you've already got montages and there's a lot of logic tied to that and it's really quite in-depth system and you can just play it to a slot and i don't want to just undermine that system and try and use circuit that would be one a lot of work to to get all the same functionality back for that and two uh i'm not sure if it would actually be better so i feel like montages are still a better way to explicitly play animations when you're using motion matching there is a case for having a special kind of montage thing where it matches to your current poses as well so it picks the section where it matches and you know that can be done you could actually do that yourself i i might implement something like that in the future but that's also not something i'm looking at for the initial release of motion symphony all right so i've been talking a lot um but yeah that's pretty much all the features uh that i've added i'm getting really close to the end what do i need to finish there's a few bug fixes and quality of life i need to fix in you know the motion matching editor but otherwise the motion matching part of it is done like i'm really happy with it uh from there i only need to go back i need to check my pose matching notes my multi-pose matching notes my transition matching nodes my my regular distance matching nodes i need to make sure that they're working in a good level um i'm pretty happy with from what i recall i'm pretty happy with where they were last time i was testing them but i need to go back and and confirm once that's done um then motion symphony stage 1 is complete and all i'm going to do after that before release is documentation and tutorial videos and then it'll be out the door and available for you and following that i will continue working on those features that i are not going to make the cut but yeah as i said don't want to hold it back more unnecessarily for features that are kind of experimental and i'm not really sure if they will even work or not so there we have it thank you all for watching um i hope this was in useful i mean i hope this was interesting to you and i hope you are looking forward to motion symphony i'll keep you posted on twitter and videos and such and yeah i'll see you in the next dev update if there is another dev update it might might just be that by the time the next dev update is ready it's release time so we'll see we'll see thank you for watching see you next time
Info
Channel: Animation Uprising
Views: 946
Rating: undefined out of 5
Keywords:
Id: MTA1SIXMymk
Channel Id: undefined
Length: 22min 14sec (1334 seconds)
Published: Tue Apr 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.