Cleaning Up Mocap in MotionBuilder

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this is Matthew Randall and in this tutorial we're going to be looking at motion builder and how we can actually smooth motions and fix errors in our motion capture so in this example we've got some kind of extreme problems here let me just play this through so it's a it's we've got someone crawling so obviously and by crawling they're going to be obscuring some of the markers so that's potentially gonna create some problems and as they turn round here so let's just focus in on their legs as they turn around here so they're cooling and as they turn around we've got some really a lot of wobbling here and a lot of wobbling there and what's happened is they've got right to the edge of the volume so they've got to kind of position in the motion capture volume where we're not really able to track the markers that well and so we've got a lot of errors and stuff in our data great so what I want to do is I want to smooth that out okay now one of the things I could do is I could just say I know I could just look at one of these angles that's rotating so I'm kind of looking at this angle here okay so I can select it I might have to do it through the navigator there we are it's managed to get it okay so we've got this kind of ankle joint here and then let's look at the rotation here it's gonna F on there and you can see where we've got where we've got this you can see it's quite a lot of noise and things going on here is popping that we've got a big pop they're big bit of noise there all sorts of things happening there okay now what we could do is motion blur has a whole set of filters built into it okay so what we could do is kind of select the area that we're kind of concerned about so let's just kind of say this area here okay alright and then what we could do is just go into filters so filters is inside I think normally you've got the asset browser open in here so if you go into this resources tab there is a filters tab in there if you can't see that you can just go into windows and filters there okay so this filters built into it a really good filter to use for fixing rotations is the Butterworth filter okay and what the Butterworth filter does it doesn't just try to smooth it sometimes if it identifies a keyframe or a frame that's really out of place it will just remove that keeper will just kind of ignore it'll just kind of smooth it in such a way that it just ignores that keyframe rather than trying to smooth and include that keyframe into its smooth okay so it's good yeah so the algorithms got a bit more kind of I want to say intelligence but that's not really an intelligent algorithm but it's good it does it does a few a few more sloughs it's slightly more sophisticated than just a simple smoothing algorithm okay so and yeah if I go into it's going to go back into field so I go to filters I can select Butterworth and we've got a start and end point already selected okay and what we're doing is we are just smoothing these selected properties just the ankle the start and end point is already selected by the fact that we dragged on our stage to select this area this region so now if I just go preview you can see that it's smooth this area and let's just try that out let's just see what that looks like okay so you can see it has smooth this area yeah and it has to some extent smooth that joint yeah and now what we could do is extend that to the next joint down okay but actually really the thing I want to kind of focus on is actually that's not really fixing our problem because it's kind of like the foots kind of sliding and slipping all around the floor it's not you know the actually where the toe ends up isn't making sense okay so just smoothing this the rotation data isn't going to be able to get us where we want okay so what I want to be able to do is actually kind of smooth where these toe is in in 3d space ie the Tran relation of this toe and then we'll want to be able to smooth rotations but keep this toe sort of pinned to where it should be on the ground okay and in order to do that I need a control rig okay so all I can do without a control rig in this situation is just basically smooth rotations and if I smooth the rotation of and and what and what you can see is if I smooth the rotation of one joint then it kind of throws off all the preceding joints because I've got no control over it there's no control very controlling what's going on okay so in this sort scenario really just smoothing rotations isn't really going to get us and or just smoothing the raw emotion data isn't gonna get us where we want okay so I'm going to click cancel to cancel that and let's think about how we want to do this properly I want to create a control rig for this character okay and and in order to do that I need to put this into a tee pose so I can just go I'm just going to create a new window it's gonna add a viewer let's pop it over here let's switch it into schematic and then what I'm going to do is literally just zero these rotations okay so I think I'm gonna just select 0 rotations just doing the rotations just so that I've got it in a in a property pose to be fair for the purposes of what we're doing here and filtering it's not gonna be the system is actually going to be to Pinacate as it were about exactly what pose this is in so I probably do I could probably get away without doing it for this particular pose but if I had someone crawling for example and the system might get confused when you start characterizing it start kind of thinking well hang on a minute are these joints really legs and feet because they're not really your legs or arms or whatever because they're not where I expect them to be so the so it might confuse a characterization process and we're not using this to do any retargeting or a lining of motion so it doesn't need to be a hundred percent but it needs to be accurate enough for the characterization process to work okay so I'm just going to go through this process anyway so at least you can see how I'm doing it and and if you don't need to do it you can skip this bit okay right so I'm just going to go through there just gonna go zero the rotation neck what I don't want to do is the shoulders I think I want to do the arms like that those rotations see what we've got yes in fact it could control Zed that because I think what I want to do is I don't want to do the arms either so I'm just going to go like do okay and excellent I could twist the arms around and hands around a little bit but I think I'll do okay so with these zeroed what I'm gonna do is characterize this so what I want to do is go into throwing my assets browser here and then just drag on character drag it onto the hip okay the way the joints are named from the vikon capture system that we use to capture this motion and thus it that Moke motion builder can automatically use those joint names to to characterize the rig so that's not a problem okay so I'm gonna go characterize yet it's a biped brilliant okay now what I need to do is I can select the character but I need to create a control rig for it so now we're gonna go control rig excellent so now I go FK okay yep okay and now we've got a control rig for it okay now what you'll notice is there's no animation on the control rig we need to put the animation onto the control rig so going back into our characters here I'm going to go again make sure we're still on character I'm going to go into nan and what you'll see is we're back to ignoring the control rig and just go the original motion data right okay what I want to do is I wanted use this for true of your mane and just go bake plot and plate bake Lisa's of control rig I want to click on this and because what MotionBuilder has a bad habit of doing and maybe there's some default so I could set up as a bad habit of plotting at 30 frames per second which isn't the frame rate that we've got here the frame rate we've got here is 120 frames per second and we want to preserve as much of the data as possible so that our smoothing works better and our edits work better etc etc we don't want to be crashing this down to 30 frames per second at this stage right okay so I'm gonna go plot okay so now you can see we've got the control rig selected and you can see that we've plotted all our motion data now onto the control rig wonderful okay right so now what we can do is we can now start using the control rig to actually clean up our motion and and resolve any problems that we have okay so I'm gonna come round here so I'm just gonna I mean there's a lot of issues here the fix up I'm just gonna focus on this area here okay just to kind of help me focus on it I kind of like to be able to kind of play the same area over and over again so I'm kind of looking at this and going okay I think we want to go from about 750 to about I'm gonna go 1,200 okay so I'm just gonna dial that region in into the start and end points here so I'm going to put my start at point out 750 and my end point at 1 1 sorry 1 to 0 so 0 and I picked that up by just moving the timeline and looking at this frame number here okay so with that set now if I press play what you should see is it'll just loop that section okay and that just helps me focus on that section and and kind of work on that section also I don't need this schematic anymore so I'm gonna get rid of that okay so we've got more real estate to look at our motion okay so what I'm gonna do is and I'm gonna first thing I'm going to do is first thing I want to do is smooth the translation of these books these flips kind of wiggling around okay so I want to just start off by smoothing the translation okay using the I can handle Zahn the control rig right so you see it's kind of bouncing around okay now what I don't want to do is if just smooth this if I just smooth this then what's going to happen is all of that all of that error is going to basically start moving down this rig so in the same way as I mentioned before if we fix a rotation it kind of makes it kind of moves the error down this rig because it would whatever we smooth there is you know whatever we've smoothed there if this was rotating to compensate for the error here well now we fixed the error here this is compensating for something that's not actually happening so basically the error kind of percolates down the rig when we're fixing rotations what you could argue is when we fix translations it kind of goes the other way if I fix this translation this is still going to do its rotation right so what's gonna happen is this is this this foots gonna start wiggling everywhere and then and then I fix that this this is gonna start wiggling everywhere and then a week and then it's gonna start wiggling everywhere so the error kind of travels up the rig so in order to stop that what we want to do is you want to use pinning okay so what I'm gonna do is I'm going to I'm gonna grab the hip okay in fact I really want to treat the hips as kind of a stable place so I'm gonna select both hips and just pin them both the rotation and the translation there I don't think the hips have got any real errors on the data or there's nothing much there that I'm particularly concerned about so I really want to focus on so I really want to just preserve that data so with regards to this leg let me just make sure I select the right leg because I have a habit of always selecting the wrong leg okay my spatial skills aren't what they should be okay so I'm gonna click on this knee and then what I'm gonna do is again just move this to the top of this vitruvian man you can probably see it all in your view and then just click I'm just gonna click the pin transformation okay so I'm kind of happy for this leg to rotate because again that rotation comes down here so I'm happy for the leg to rotate but what I don't want to happen is I don't want but I don't want that they need to be moving around okay and all right so I've pinned that knee the translation on that knee great excellent by default the feet are already pinned and I think for the moment I am just going to leave the pins in there okay and but I might come back to that okay great now what I want to do is remember it's the it's not the this is the ankle so so this is this joint here what I want to do is I want to smooth the translation of this joint here so that's the foot so I want to select the foot okay great okay so now what I'm going to do I want to select the foot I want to look at the translation on that foot let's just press F and we can kind of see where we're working here okay and you can kind of see in this region that we're looking at you can see that that there's kind of all kinds of little bits of noise here and a little bit so where it's kind of moving around you can see where is flicking around and causing us problems etc etc great okay so what I'm going to do is again I'm just gonna take this I I'm just gonna just take what I could do is kind of be if I want to spend more time on this and not smooth bits that I don't want to smooth I'd probably look at you know you know for each joint where I want to smooth it and where I don't want to smooth it what I'm gonna do is just treat this 750 for the person is too tall just treat this 750 to frame 1200 as the range that I want to fix on all the joints okay just to kind of simplify things a little bit okay so we've got some noise here we want to fix this okay we've got it selected brilliant let's go to our filters so I'm going to use the smooth translation okay now it's worth kind of going through and noting some of these different filters and so if I just pull up the documentation here I just did a Google motion builder filters and this information it was really easy to access okay I'm just gonna click back actually because I was kind of looking at detail at one of the bits here but this page here gives you all the information on all the different filters that are available so it's well worth looking through and as much anything else it helps you understand how to kind of refine the settings of some of the filters so for example this there's some settings that you might think well to make that smoothing you've got to increase the setting sorry to make this movie more aggressive you've got to increase the setting well actually sometimes it's the opposite so it's well worth just looking at a documentation to understand how you're using the filter okay I'm not gonna go through your documentation here because that would make the tutorial massive and I don't want to do that okay but I'm just pointing you to it okay excellent okay let's go back to motion builder right so I'm gonna use the smooth translation okay and what the smooth translation does is and it does smoothing but it kind of thinks about it as a translation rather than a rotation so it's kind of thinking about sort of pinning pinning that the joint in in 3d space a little bit more and doing things in a way that rotation wouldn't do okay and so when the normal smoothing algorithm wouldn't do so I tend to use this for the smoothing translation and curves okay great so I'm just gonna accept the defaults and just click and what I'm sorry before I do anything I need to set an input and output range so we're going to just stick with our 750 1200 that we've had already and I'm just going to click preview okay you can see before I do you can see it's framing the range that we're working in so I can see that I think it's this range here great so I can see that inside the F curve viewer here so I'm just gonna click preview and you can see it's smooth those motions out right and and I can also look at those results now it's not gonna fix the whole foot so don't look at a fix for the whole foot we're just looking at this point at the end of the translation here let's just play that and see what that looks like now actually it doesn't look like it's done very much and the reason for that is I have forgotten an important step with this an effector here select it so it's already selected okay and also by clicking on it because I haven't confirmed that I wanted that smooth operation as soon as I click anywhere else what it's done is it's cancelled to smooth operation there as well you can press counsel in the interface but if you click anywhere else just remember it will just cancel the smooth operation you need accept it or apply that smoothing operation for it to remain permanent okay so what I needed to do was I needed to actually turn the iCade blend for the translation right up to 100 percent okay so that yeah whatever I'm doing with this foot it has an impact right okay great so now what I want to do is again I'm going to set my range 750 1200 I do Singh's have to keep putting the range in which is a little bit dull and anyone could point out what I'm doing wrong there and then let me know in the comments but I think that's just kind of the way the interface is unfortunately so you will end up just kind of putting the range numbers in there but I suppose in theory you should be putting different range numbers for all your different curves anyway rather than just using the same range for all the different curves that you're smoothing out okay okay so smooth translation let's click on that okay again accept the defaults just go preview and again it's smooth it just like it did before but hopefully when we play it this time you can see it has actually smooth the joint so again we've got some wiggle at the top here still but that's not what we're trying to fix what we're trying to fix it just where the toe ends up and that toes moving quite nice and smoothly okay so I'm going to go I'm going to stop and I'm just going to go except so now that smooth is permanently on the toe great so now what I want to do is I want to start fixing and this ankle right so the ankle is kind of twitching around a bit okay I want to kind of fix this ankle so what I'm gonna do is yeah what I'm gonna do is go out this foot so I just need to scroll up hopefully yeah there we go I can go out of this foot and I want to select the ankle okay and and then what I want to do is sorry actually before I do anything now that I've smoothed the foot I want to pin the foot because I start fixing this ankle it's going to start messing this up again so let's pin the foot we just want to pin the translation I'm happy for the foot to kind of rotate around little bit I just wanted to stay where it is connected to the floor right okay great okay or connect to the floor when it you know in the way when it's supposed to be connected to the floor okay great okay so again there's pop out of this so we've pinned the foot now I'm going to select this ankle and this time one of those is just fix the rotations okay so this time I'm just selecting the rotations I'm going to select I'm just going to put in the range again 100 okay and this time what I'm going to do is I'm going to use the Butterworth filter like we did last time again I'm just going to accept the preset I finally did it to be honest I find the often find either the the default value sorry pretty good for my purposes I don't really find a need to kind of fine-tune it too much and yeah okay unless I'm really trying to kind of do something unless something's really causing me a problem you know and then I kind of stick with the default okay so now we're going to do is go preview okay now it's smooth that out let's have a look what we've got and that seems to be smoothing out quite nicely so I'm gonna stop and I'm gonna go except one of the things you might notice though if I start playing this is it has again just like I said it has cools the knee just to kind of wiggle and wobble around a little bit okay all right but remember we pinned the knee okay although I didn't pin the rotation so maybe that's something I should have done yeah I might just clear I can undo that I might not be able to undo that oh yeah I can undo it so I've done of control Zed let's try and pin the rotation down as well on the knee so that we're not affecting the rotation of the knee and then we're gonna go and do this again let's select the ankle select our range 750 1200 okay and then what we're going to do and again a lot of this is you is yeah there is some experimentation with this as well there's no kind of like this is how you do it you just kind of try things out so let's preview that okay and let's press play okay and let's see that's kind of fixed on me mmm hasn't had a huge impact there okay so what I'm going to do is I'm going to accept it anyway okay and I've got a feeling that if I actually just grab this knee and just turn up the translation and rotation properties of that knee let's see if it will just keep his original data try and follow its original path rather than trying to be influenced by what's going on below it let's have a look okay okay well these locator seems to be moving around a bit but I'm still quite I'm quite happy with what the knee itself is doing so I'm not desperately worried about that I'm just gonna have a look at that knee again no I think I'm happy with that okay so let's just try this process again on the other foot so what we're going to do is again I'm just going to go into that knee I'm going to pin the knee okay I just want to pin the translation and then what I'm going to do is I'm going to go into the foot step foot up the track up the the plenty there and then what I'm going to do is select the translation you see it's all sorts of noise and stuff in here we can zoom into there that we need to fix as well great and then what I'm going to do is select the same range again 750 1200 okay and I'm going to go smooth translation okay and and then we'll do its go preview let's have a look what we've got let's see what that looks like that's looking pretty good I mean I could argue that I might want to be a little bit more aggressive with the translation but actually no even those bits that kind of look like noise from this level when you zoom in on it are actually a fine so I'm I think I'm okay with that great okay so and what I want to do now is pin this just gonna pin it so I'm just basically using the same technique that I used last time I'm thinking that I want to pin the rotation of this boom okay and go back into onto the ankle and this time going to select the rotation of the ankle and again I'm just going to select my range to be some 52 1200 and then I'm gonna go into the Butterworth filter just go preview okay let's look what that looks like I might have made my classic error which is not to press except on the not to press except when I smooth this foot so what I'm going to do is let's unpick let's select the foot I've got the foot selected again select the translation have a look did we accept that let's have a look again and I think this sort of what friends I'm looking at here translation of the foot yeah I've worked out what the problem was I'm looking at the wrong foot I'm looking at this foot and I want to look at this foot so let's select the correct foot he's always a good idea okay still selecting the wrong foot let's go to the correct foot this one here I always find that that works if you go to the correct first let's just try that okay so let's unpin that okay and hopefully that hasn't caused a problem with our other foot as well that's okay that's looking fine good good good this unpin unpin the correct foot okay so we're working on this foot yet and you are you see all the noise that we did smooth out but because I didn't accept it it just undid the smooth forming okay let's try that again so you've got the translation smooth translation let's do that preview except because we're kind of happy with what it was doing yep so now we've accepted that great and we come back out of here okay so now what I want to do before I go any further yes I want to pin that let's come back out again and now what I want to do is I'm gonna go and look at this ankle okay and I'm gonna go and smooth this ankle so I'm gonna same range we're going to use the Butterworth filter I've got the rotation selected here I'm gonna use the Butterworth filter again just accept the defaults I'm gonna go preview okay and we shall is sort of look what that looks like yeah this is a huge huge improvement on things I think okay and so I'm gonna go except there is a little bit of dithering in this knee it's kind of going up and down a little bit when you're looking at and also when you're looking at motion data it's always worth just playing it back in real time I finally if you're trying to analyze motion just by scrubbing it and you're playing it back at the wrong speed things don't necessarily kind of make sense okay there's still some odd bits but I'm hoping that if I just grab this and do that is that going to help fix that so I feel I feel like there's still some odd rotations going on in this in this knee let's have a look at the rotation data yeah see there's some odd bits going on in that knee that I want to fix and it's kind of twisting this and making that go a little bit funny maybe if I just turned the rotation down let's have a look will that have less of an impact at that point and maybe if I earn pin the rotation yes definitely having an impact there isn't it so what I'm gonna do is and what I want to do is I want to smooth this rotation so I'm going to up the rotation here and then what I'm going to do is I'm going to unpin this ankle so look see what that does for me so if I unpinned ankle and remove the translation on the ankle that's oh look what that does for us okay so it's still got some weird things going on so what I'm going to do is click on this joint now and hopefully the way I've got this configured now let's just check I've got my pin on there that's fine and so the way that I've got this configured hopefully what will happen is any correction I do in the rotation on this joint will simply be absorbed by the rotation in this joint okay that's what I'm hoping and will happen okay all the rotation and translation of this joint okay let's see what happens of God let's see let's see what happens okay so I'm just gonna go so this is proved a little bit trickier than I thought so again I'm just going to go 750 500 see if our pinning works again I'm just going to go do to do Butterworth's and just go preview and so look what that does for us I think that's working okay I just think that it needs now we now need to smooth the translation so I'm gonna go accept and then what I'm going to do just simply go on to the translation they're just trying to think of that should be fine that should everything we've got should work there so it'll go on to the translation and what I think I might do is just quickly pin the translation on this ankle as well so I don't want the ankle to move around okay so any change that makes the translation here should be just resolved by the rotation of this joint not moving the joint around okay again trying to stop the smoothing causing noise and errors elsewhere in the motion right and great so now that I've done that do did you do let's select the knee again and what we're gonna do is yeah you see this kind of some something that some kind of pops there in in the knee there you can see there's some little pops there that are causing us a problem okay it's Troy hopefully we can fix that what I don't want to do is have it traveling up the hip okay great okay so now what we're going to do is we're going to go and 750 1200 okay and then what we're gonna do go smooth translation preview let's have a look what that looks like it's getting better is getting better in fact yeah that has improved that has taken out some of the errors okay great I think that's kind of fixed it and we're not going errors coming traveling up here so that's kind of fixed a lot of issues there so I'm gonna go stop I'm gonna go accept okay once I'm happy with it obviously what I want to do is bake everything I've done in this control rig back onto the original motion so we go back up here to of a trivia man bake plot okay again being aware of this thirty frames per second default I'm just going to click on the options here select 120 frames per second because that's what we're working with and go plot boom boom boom and now what we should have is a cleaned up motion for this section okay so that's how we clean up motion that was quite a complicated example that we did so hopefully and the sort of motions and things that you've got to do are going to be easier to clean up that than that I mean that's quite a quite a lot of debris dated data there that wasn't just like a bit of flutter or jitter in in in in you know in in in the imposition or something like that and that was actually like quite a lot of data loss that we were trying to fix there so I'm really happy with the result of that and hopefully that's give you some really good ideas of how you can smooth motion using motion builder okay
Info
Channel: Mathew R
Views: 4,263
Rating: undefined out of 5
Keywords: Mathew, Randall, MotionBuilder, Motion Capture
Id: QSclC82HANU
Channel Id: undefined
Length: 35min 26sec (2126 seconds)
Published: Thu Mar 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.