Retargeting using Rokoko (COMPLETE guide) - Blender 2.8, 2.9, 3.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to cg dive this is part of the cg dive makeup and retargeting series this is going to be a longish series so here is how the videos are organized first if you haven't watched the first three intro videos please watch them you'll learn my definition of retargeting and the goals of this series you'll also find out where you can get mocap data from and how to import it into blender and now this is the second wave of videos so to speak in which i'll be reviewing each of the retargeting add-ons and solutions that we have for blender we'll learn how to use each tool and what its strengths are but then no matter what i don't use retargeted animation will almost always need some cleanup so the third module in this course is going to be all about cleanup and actually using their targeted animations you can get early access to these videos when you support cg dive on patreon or gum road all links are below okay this video will be about the rococo retargeting addon and it's going to be a long video i want it to be a complete guide which can take beginners to at least intermediate level with this add-on if you're an experienced user use the chapters on youtube to find the techniques that may interest you i decided to start the second module with it because it is one of the simplest retargeting tools that you can find if i try to outline the strengths and weaknesses of the rokoko remapping tool i'd say that it is easy to use robust it gives good predictable results it is fast to be honest i haven't done any stress tests but it works quite fast in everyday situations and this add-on actually makes fpx import in blender faster than it is by default so even if you're not going to use any of the features of the erococo addon you can just install it and keep it activated and you'll get faster fbx imports and you can use this add-on free of charge some of its limitations are limited bone mapping so you can only map one bone of the target rig for each bone of the source rig that can be a problem for advanced users but in general this will be fine at least 80 to 90 percent of the time there are no dedicated tools for retargeting to ik chains which is something that very few tools actually have but i'm going to show you a work around to make this work even with rococo and finally there are no dedicated tools for tweaking the retargeted motion that's another advanced feature that is nice to have but instead of this we can always use native blender tools the nla in particular so we can still tweak and edit our targeted motion okay so the first thing that you need to do to work with the rococo add-on is to download it from the rokoko website rococo.com so when you get to their website you can go to 3d software find the blender link and here you can download rococo studio which is a separate software we are not going to talk about it here and you can also download the blender plugin so click on download plugin and in here under blender click download and that will download the add-on so we can download the add-on for free and without registering but to actually use the add-on you'll need a rokoco id which you can get from here so if you don't have an account from this page click on sign up here and create your account i'm not going to show you how to do it i think i think you can all create an account for an online service you know how it is you enter your email and password and then you have to go to your email address confirm and so on so please do that and then we'll go to blender go to edit preferences add-ons click install go to the folder where install the add-on find it and install it and then we also have to activate it there is something i need to clarify here the rococo add-on is not just a retargeting tool it is actually mainly a way to connect blender to the rococo mocap suit and your cocoa mocha application the rococo studio that we saw earlier however in this video i'm going to focus exclusively on the retargeting tool and i'll simply ignore all of the other features okay so if i expand the end panel i'm going to have the rokoko add-on in here okay and here is why you need the rokoko id basically unless you login in here you won't be able to use any of the features of the add-on so i'm going to log in with my credentials and sign in and as soon as i signed in i can see the actual features of the add-on and i just have to say if any of this signing up and logging in in the rococo service doesn't work for you i wouldn't have any idea why so please contact the people from rokoko their email address is hi rococo.com so here we have some features for connecting to rococo studio again i'm not going to use those and i'll simply focus on the retargeting tool uh also there is an updater which is very nice i wish that more add-ons would have that so from time to time you can just check for updates and it will tell you if there are any updates in this case i'm up to date and here under info you'll find info about the license documentation and so on and also if i create just any object and look under object properties there is the rococo studio live setup so again this is something that will help you connect to studio again i'll ignore that and focus on the retargeting tools okay let's start and the bare minimum that you need in order to work with retargeting is a rigged character which will be your target and you also need another armature which contains the source action that you want to retarget and if you want to follow along and practice with me i'm going to share with you all of these scenes that i'm going to use in this tutorial so if you'd like that please download them from my free base mesh repository on gumroad okay let's start with the simplest example when it comes to retargeting we'll retarget our source action which is this dancing action and i also have a bunch of other actions here but this dancing action seems to expose a lot of problems in the retargeting process so i'll be using it a lot and we'll retarget that to a simple fk rig which is this here a simple fk rig that is in the t-pose this is the simplest case because mocap data also comes in the form of of fk rigs and its rest pose is almost always a t pose if i check the rest pose of this armature just click on rest pose you'll see that it is a t bose so when the target rig has basically the same structure is the source rig that will make things easier so let's start with this this way i can also give you an overview of the main features of the arrow and then we can add complexity step by step and by the way when i said fk rig i meant that if i go to pose mode all bones are simply parented to each other in a hierarchy so this is the root of the whole hierarchy the base of the spine and the upper leg bone controls the lower leg bone the foot is connected to the lower leg bone and so on it's just a very simple hierarchy which is exactly the same as in the source ring so let's go to the rococo add-on and see what we can do to set things up so focus on the retargeting section here and first and foremost we need to set our source and target rigs so our source will be the mocap data that i have here and our target will be the fk rig so pay attention to the rig name and set it up here i want my fk rig when i add both of them i can now press this button which says build bone list so let's press it and i'll expand the m panel so i can see the whole of my names so what we need to do here is to match one bone of the target trick with a corresponding bone of the of the source rig okay and probably because i've done this before i have a lot of these bone pairs set up correctly already but let's pretend that i didn't and i'll just remove all of these entries and i'll set them up manually for the sake of practice okay i'll select both armatures and go to pause mode and that will allow me to select bones of both armatures so the first bone that i need to match is the miximo hips and the hips is a very important bone is the root of the whole armature which means that it moves everything with it and that is a very important bone to match correctly it is not always called hips it could be called spine or pelvis or whatever in my target rig this root bone is also called hips so that will be easy to find i'll just go here and type hips and choose the hips bone and that way i match the two root balls so the next bone is the spine and here is the spine and i need to verify what the corresponding bone is called in my target rig it is spine001 so search for spine choose it next spine one on the source rig and spine002 on the target rig okay and just keep going like that and enter these fields now here's something interesting the source rig has just one neckball whereas target rig has two as i said this is one of the limitations of the rococo retargeting tool it can match only one bone to another bone in other solutions we may be able to do more sophisticated and complicated relationships between the two rigs but in rococo is just one bone to one bone so now we need to choose which bone we are going to match and my recommendation is to go with the first neck bone which here is called neck one so i'm going to select it and the rest of the bones have perfect correspondence so i'll just keep matching them head to head and so on something to pay attention to are the naming conventions in the mocap rig the limbs on the left and right are called left and right so left arm right arm whereas in my target rig it is arm.l for arm.l and so on so make sure to match dot l to left and dot r to right this process can be a little bit annoying but you only have to do it once and once it's all set up you can reuse it and retarget as many actions that you want if this is an important rig and you're going to use this naming scheme often you can actually export it to a json file and then anytime you work with these armatures you can import it again and then you won't have to much all of these bones manually but now everything is set up and i'll just keep all of these default options that we have and i'll simply click retarget animation and there we go my character is dancing just like in our source animation something that you may not like is how this character was moved to the position of the source armature so i'm going to press ctrl z then go to object mode get the source armature and press alt g so that it moves in the center of the world and now if i retarget again the character will stay in place so i move the mocap armature out of the way but when i actually retarget i want to place it in the center of the world and that's it this is our first retargeted animation i think that was fairly easy to do so let's keep going and keep adding more complexity okay so the next exercise is actually very similar we're just going to have a different rest pose for our target rig so i'll move the source out of the way again and hide the fk collection and i'll unhide the fk with an apos collection so here we have the exact same character rigged with the exact same rig it's just that it's rest pose is an impulse meaning that the arms are at an angle rather than coming straight of the torso okay if i move the arm and then switch to rest position you can see that the a pose is the rest position so i'm going to clear these transforms and then in the rococo add-on i'm going to switch from fk rig to fk apollo's rig so that rococo is retargeting to the correct armature and then i'll build my bone list and now because i'm using basically the same names in this rig as in the previous one rococo kind of remembers them and so i think all of these entries are actually correct i'll have a quick look and you should do the same as well okay everything seems fine with the bone pairs so let's move the source rig in the center of the world and then try to retarget and now if we play the action you'll see that we get the dancing animations but something is very wrong with the arms and that is because of the different response between the target rig and the source rig since the arms in each rig have an offset of about 20 to 30 degrees between each other the retargeted motion also inherits this rotation throughout the whole action and i've seen people trying to fix this by going to the arm and then going to the graph editor and then trying to fix this problem by by moving the whole curve for one of the axis of this arm up and down something like this and now indeed we got something that looks a little bit better but it's still not quite there yet so i don't recommend this solution so let's undo to the point before retargeting the animation and now i'll select my source rig go to pause mode select all bones and choose pause clear transform all when you do this make sure that you don't have auto keyframe on you don't need to set any keyframes you just want to temporarily place this source rig in the default position and then i'll go to front view select the select the left arm and rotate it down until it matches the rotation of the target rig and i'll do the same on the other side i wish i could use x mirroring here but because of the naming of this uh moh copyright i cannot use it so i'm going to eyeball it and now before i actually retarget the animation i'm going to switch from rest to current and that way instead of using the rest pose of these amateurs i'm going to use their current pose as the initial pose and now if i retarget you'll see that the retargeting result is correct and i didn't have to manually move any curves or anything like that if we compare this to the initial result with the pure fk rig you'll see that they are very similar if not the same okay let's move on and let's try to make things more interesting now i'm going to hide my fk rigs and unhide my rify rig so this is not a vergified tutorial i'll assume that you know at least the basics of how to work with rigify if you don't i have a whole series on rigidify and i think it's one of the best reader five resources on the internet most rigofy tutorials show you how to use the human meta rig whereas in my tutorials you'll actually learn how rigify works but anyway i'll assume that you know how rigify works you have a so called meta rig which i have here you match its shape to the shape of your character and then you press generate rig which i have already done i already have my uh rig here but i'm i'm going to generate again just so that everything is uh reset to defaults and then we can start trying to retarget to regify and here i have a little friendly critique to the people from rococo they did a tutorial on how to retarget to rigify and in that tutorial they say something like oh you know just don't generate the rig parent your character to the meta rig and then retarget to it and uh no that's not realify that is the same as saying just use an fk rig that is not the point of rigify the point of riggify is that you get this sophisticated and complex rig with icon controls and so on that is easy to animate with so ideally we want the best of both worlds we want our control rig and we also want to retarget to it so in this part i'll i'll still keep things simple and we will retarget to the fk controls of this rigid5 rig which will be much simpler but using ik is also very important it's essential for cleaning up retargeted animation data so i'm going to cover it later in the video don't worry about it but let's go to item and switch all lumps to fk so the left arm i'll switch to fk right arm fk make sure that you're switching the ik fk toggle leg to fk and the other leg to fk as well and then i can clean up my rig a little bit i don't need the fingers all the ik controls and arm and leg i can control tweak controls and i'm going to hide the meta rig because i'm not going to use it at all the meta rig is just there to generate the actual control rig okay and now we are ready to retarget also notice that here my character is in the t pose just like my source armature so i'm going to be able to use the rest pose and i don't have to worry about editing the pose of the source rig so i'm going to keep the mocap as my source and just switch to my rig which is my generated riggify rig is the target and i'm going to build my bone list again in here generally the rococo addon will do a very poor job of matching the bone pairs it kind of goes for the deformation bones which in rigify are bones that are controlled by the control bones so they don't move on themselves and so you won't be able to use them as target bones so let's just get rid of all of these entries and we'll set them up manually okay so first we have the hips and the hips as you remember is the root of the armature so we need to retarget it to what is the root of the target amateur and the root of the target armature is the torso this box shape as you see it moves everything with it so let's set that to the torso and now i have a bunch of spine fk bones in the riggify rig there is one here one here one here and one here and here i have three spine bones so i'm going to skip the first one which is being controlled by the torso anyway so i'm going to match this spine control to this spine bone in the target rig this one to this one and this one to this one so just pay attention to their names spinefk001 zero zero two zero zero three for the neck we have an actual neck control bone here so let's set it as a pair for the neck and we have a head control as well the shoulders again will be matched to the shoulders left arm to the left upper arm fk and so on i hope you get how this works you just check the name of the source rig bone over here and then you check the name of the corresponding bone in the target rig and then you make sure that you match them in this menu here so it's really important that you understand your rig and it's also important to be really careful when you set up these bones here but if you set up everything correctly then you should be able to retarget so i'll move the source rig in the center and click your target and i'll get a decent result now i'm seeing something weird so i'll most likely messed up something with the names here so i'm going to undo and let's see if i can find the problem yes i have retargeted the upper leg to the upper arm in riggify the upper leg is called thigh so i'll retarget to thigh fk dot r and let's try this again and now we get something much much better however there are some problems with the feet and that is something that i want to talk about if we compare this to our initial fk rig which we can be fairly sure that is it is retargeted correctly you'll see that the legs of the uh redefine rig sync quite a bit more than that of the fk rig so let's undo and the reason for that is the way the riggify spine is a setup if i go to pause mode here and i move this control you'll see that it actually controls the legs and then this one the second spine fk bone also controls the legs whereas the next fk spine bone controls the upper body if we compare that to the source rig you'll see that all bones are connected in a straight fk chain so i'll quickly show you one way to fix this i'll go back to my meta rig and select the first bone of the spine go to the bone properties regify type and here in the options i can set the pivot position to one instead of two when you have a pivot position of two rigidify creates a pivot point at the second spine ball so the hierarchy is divided like this the the first two bones control the lower body and the other two bones control the upper body when we set a position to one then all of these three bones will control the upper body so i'll make sure that my pivot position is set to one and generate the rig and that updated my rigify rig now if i go to pause mode and move this second spine bone you'll see that it controls the upper body and now i'll switch to fk again because after generation rig if i changes everything to ik in rokoko it seems that this upper deck is messed up again so let's set it back to the thigh fk dot r and now if i move this armature in the center and retarget you'll see that we are not getting the sinking of the feed that we had before if we compare this to the fk rig it is basically the same result and that is a good solution it gives us a good result but what i don't like is that we mess with the rig we mess with the rig controls and the question becomes what if i don't want to change my spine control what if i want to keep it the same well i came up with an workaround for that so i'm going to in my meta rig set this um set the pivot position again to 2 and generate again and now i have this behavior again where this second spine bone controls the lower body i'll set everything to fk and the solution that i came up with is to create an intermediate rig an intermediate fk rig to which we'll retarget and then the final the actual riggify rig will be constrained to that rig so let's just do it i think it will make sense while we work on it so i'm going to make a copy of this whole riggify rig and isolate it and i'm going to hide layers that i don't need i'll i just want the fk controls and then let's go to pause mode and see what bones we are going to need i'm going to need all of the fk controls for the legs which is which are over here i'm going to need the root or the torso and then all of the fk spine controls no i don't need the chest and pelvis controls so i'm not going to select them uh i want the fk arms the shoulders the neck and the head and now with these selected i'm going to go to edit mode press p and separate bone and that will give me another armature rig 0 0 2 so rig 0 0 1 i'm going to delete and rig 0 0 2 let's rename to intermediate fk rig and then go to pause mode select all bones go to viewport display disable the custom object right click and choose copy to select it and that will disable the custom objects for all of these bones and that will give me this simple fk rig to which i can easily retarget the only problem at this point is that a lot of the bones are disconnected so i'm going to set up a simple hierarchy so i'll enable x mirroring in edit mode and parent the foot to to the shin toe to foot foot to spine and then let's build the spine chain okay the hands are still disconnected so pairing them to the lower arm in this case i'll leave the torso control alone uh i won't parent it to anything and you'll see why in a second okay let's go out of local mode and now i can go to rokoko and i want to retarget to my intermediate fk rig build bone lists and here i'm going to want to retarget the hips to the spine fk rather than the torso and everything else seems to be matched correctly so let's move the armature in the center and retarget and let's see here we have the intermediate rig and it is retargeted correctly okay so now how do we make the actual riggify rig move with it uh it is very simple i'm simply going to shift select the riggify rig so that i have the intermediate rig and the riggify rig selected and then go to pause mode with both rigs selected and now i just need to i'll actually go to local mode i just need to constrain the bones of the rigified rig to the bones of the intermediate rig and i can do that very easily by selecting one bone in the intermediate rig then shift selecting the corresponding bone in the rigifi rig pressing ctrl shift c and choosing copy transforms and there you go our riggify rigs jumped to this position it will be easier if i clean up my rig layers and i'll keep constraining okay and i'm going to constrain the torso to the copy of the torso actually the other way around i have to first select the copy of the torso then the torso and copy transforms and now this copy of the torso is not really moving which is not very natural you'll see you see that the torso which should be the root of the whole armature is not moving at all so i'm going to select all bones and uh clear all transforms for a second and here i'm going to select the first spine bone then shift select the torso this is all for the intermediate trick and press ctrl shift c and choose child of and then play the animation and you'll see that the torso is now animated and something that we could do is uh to turn on the rotation for the child of and then set inverse and now the torso is only moving and not rotating which is probably the most natural thing that it can do okay and now my character is animated the retargeting is looking good and at the same time i still have the original behavior of the fk spine which is to move the lower body right now i cannot really move it because it is constrained and to really transfer this motion to the rigifi rig i have to actually bake the action so select the riggify rig go to pose mode select all of these bones that we have here and uh press spacebar or f3 and look for bake action and set it up with these options press ok and that will delete all of the constraints that we set up and we'll bake the motion and there we go uh the emotion is now baked to the actual wigify rig and everything work and i can almost hear you saying yeah that's nice but um the whole extraction of the intermediate fk rig is a lot of work well uh we got you covered if you have our add-on game rig tools this whole process of extracting the armature and constraining it can be simplified down to a couple of clicks and our add-on is pay what you want so you can get it for free or support us it's up to you i'm going to have a link to it and once you install and activate it you can go to gamer tools and actually let's start over i'm going to get rid of this big texture bring the rig into the default position delete the intermediate rig that i did that i created earlier and now when i have game rig tools i can just go to pause mode and select all of these bones that i want to extract again and now i can go to generate game rig the original functionality of game rig is a little bit different but we can use it here and i'm going to set the constraint type to none and turn off these options bind to control rig and then i have to set um extract mode to select it so that i extract the actual bones that i just selected and i'll press ok and here is our rig extracted and cleaned up and cleaned up from the shapes and everything so the only thing that i actually need to do is to parent the bones manually just like before so that's the only manual step that i need to take okay and once i have this armature working i need to constrain the rigify rig to it so we also have a tool for that i'm going to go to utility tools so to make sure that this function works correctly i have to go to pause mode and again select all of these bones that i want to constrain also the shoulders and now i'll press this button and it will ask us what we want to constrain to and we want to constrain to the rig underscore deform with copy transform just press ok and now if i go to my intermediate rig it will control my riggify armature then i can then i can set this source rig in the center go to rokoko and i have to switch to my rig deform build bone lists and all of the bone names are set up correctly retarget and now the connection between the intermediate rig and the riggify rig is already set up i just need to go to rigify select all bones bake and now we have the actual action baked we can improve this workflow even more by using the action bakery in gamerg tools so i can retarget as many actions as i want to the intermediate rig and then i can use the bakery to bake them all at once to rigidify it but i'm not going to go there because this video is not about the game break tools but if you learn how to use our add-on you'll be able to do this process very quickly okay now i'll try to tackle working with ik or retargeting to the ik controls or in any way transferring the source motion to the ik controls of my rig i'm going to hide the intermediate rig and focus on my rigifi rig and now because this is rify it has a special feature to bake any animation that you have on your fk controls to ik controls if i just go to item and i'm going to unhide my ik controls and i want to work on the legs so if i select any leg widget whether it's ik or fk doesn't matter i'll get these properties for the leg and in here you'll see features that allow you to snap the fk controls to the position of the ik controls and vice versa and next to it you have the action button and this action button rather than just snapping the controls to the current position of the other controls it breaks the whole action from one set of controls to another set of controls so what we want here is to bake the ik to the fk and we want to do it for the whole action so all i need to do is press this button and then confirm and after a little while if i scrub through my animation you'll see that my ik controls for this leg move along with the fk controls and now i can actually switch to ik mode and you'll notice that my animation does not change whereas if i go to the other leg which is not baked yet and switch to ik mode the leg will just stay stationary so now i have to bake this action for the other leg as well and there we go now this leg is in ik mode and the other one as well and if i play this animation you'll see that the motion was preserved so this is a great feature in rigify it works really well the results are great but there is one little problem with it it is really really slow you saw that the process took about 20 seconds per limb and that is just for 70 frames imagine if you have hundreds and thousands of frames that becomes very very slow and it's just not practical so for small animations or if you just have a lot of time you can use this tool but in actual production you may need another way that is faster so let's see if we can find such a way so i'm going to undo and lose these baked animations on the ik and let's try another approach this is an approach that i learned from my friend mario musuff he is using it in production and it produces good results i'm going to select all of my widgets here and clear the transforms and then i'll select my fk foot widget and then shift select the ik widget and press ctrl shift c and choose child of and now if i scrub through this through a timeline you'll see that the ik is moving with with the fk one problem that we have is that this widget which controls the rotation of the thigh or the direction of the knee is not being controlled by anything so there are two ways to address this one is to constrain this ik widget to the fk control and so i could select my fk control shift select the ik control and then ctrl shift c copy rotation and that would make the ik control move more or less the same way as the fk control and now if i change to i from ik to fk you'll see that there are slight differences but it's acceptable the other way is to constrain the ik to the source rig so i could go to object mode shift select the source or amateur go to pause mode select the upper leg of the source shift select the ik control ctrl shift c copy rotation and this one i need to set to local space to local space and now if i disable this constraint you'll see that both produce slightly different but still very close results and they are also very close to the fk results so it's up to you which one you want to use you should experiment and see what gives you the best results but then i need to do the same thing on the other leg so select the fk foot shift select the ik foot ctrl shift c child off and then set inverse and that was a mistake the position of the ik control won't be quite correct so let's select all in clear transforms and now in this state i'm going to click set inverse and that will set the ik control in the correct position and from there it should behave correctly so ideally first set your character in the default position and then add the child of constraint that is the best workflow just like i did it on the right leg and then for the thigh i can control i'm going to constrain it to the source rig with copy rotation and for consistency i'm going to go to the other leg and also use the mocap constraint and delete the other one which was from the fk control okay and this one i need to set to local space to local space and now i can switch to ik and i'll still have my motion looking good and i can use the ik controls the ik controls still only move and are animated based on constraints we need to bake them in order to be able to use these actions so i'm going to select these ik controls all of them and then press spacebar or f3 depending on your settings look for bake action and bake with these settings press ok and you'll see that baking for these two legs took only a second rather than 15 seconds per leg with the frigify tools so this way you can set your ican controls and bake them much faster and as a possible trade-off you may be sacrificing a little bit of the accuracy of your action here you can see the slight difference between the ik and fk action but for most purposes this should work fine okay that was nice we learned some ways to retarget to ik controls but that was very rigidify specific and so let's look at a more custom rig so here i have a custom rig and while it may look simple it is kind of a nightmare for retargeting because the legs and arms are both in ik and only in ik and for the knee direction i'm using this ball target which is a very common way to orient the knee of a character i think it is much more common than what we have here in riggify so let's see what we can do here here i have the rigs set up from while i was preparing to record this but let's get rid of them and do it again my source is my mocap rig and the target trick will be the human ik i have an fk rig here which is just for tests and comparison i'll show it to you later but let's choose the ik rig and build the bone list as i think i said earlier one of the most important things with retargeting is understanding your rig and as always i first want to make sure that i'm retargeting the hips the top bone of the source armature to the correct bone of the target armature in this case that is my hips control it moves the whole rig with it aside from the ik controls so i'm going to retarget the hips bone the hips bone to the hips control bone the spine neck and head should be fairly easy these are my spine bones here and i'm going to retarget them to the spine bones the neck bone to the neck bone and head bone to head bone and that is already set up for me in here the shoulder bones also overlap and now we come to the arms and legs here the upper arm bone of the source is already correctly matched to the upper arm bone of the target however this is an ik rig so do we need to retarget these bones let's just keep it that way and see what happens but we'll pay special attention to what the hands and the feet are targeted to so i can see that the left foot is retargeted to my ik foot dot l which is this widget here and that is exactly what i want this bone controls the ik and it also rotates the foot and same with the right foot and now i'm looking through this list but i'm not finding an entry for the hand and that is something that i didn't get the chance to mention earlier but in rococo only bones that have a keyframe appear in this list and if you select the hand of this rig you'll see that it doesn't have any keyframes the lower arm has some and the spine bones have some but the hands don't so in this animation the hands are just parented to the lower arm and they don't have any action for themselves so i'm going to select both hands go to frame one or any frame ready and press i and create any type of keyframe it doesn't matter which one i'll just create a rotation one and rebuild my bone lists again and now if i look through the list i have my left hand and right hand in the list and they're retargeted to ik hand dot l which is my ik handle and that is exactly what i want and the right hand is also retargeted to the right ik handle so that is looking good let's bring the source rig to the center and try to retarget and we have something very funny we can see the dancing motion but something is definitely off and now if you look at our rig and play the animation again you'll see that the pull targets don't move and of course they don't move because we haven't retargeted them to anything so here is a special solution that i came up with i'm going to undo first and i'll go to edit mode for my source rig select the connection of the elbow press e to extrude a new bone constrain it to the y axis and make it about this length and again with the tail of this bone selected i'll press e again and z to extrude it straight up and i'm going to rename these bones this one will be arm arm pull helper dot l and this one will be called arm pull dot l so this is the actual pole and this bone just helps to orient it correctly okay now if i go to object mode and play my animation you'll see that the helper bone kind of goes out from the elbow but it is simply at a 90 degree angle to the upper arm and what i really want is for it to show the direction of the elbow so something like this so if i go to pose mode select the lower arm shift select the helper press ctrl shift c and choose copy rotation and then for the copy rotation constraint i'm going to switch to local space to local space and influence i'm going to set to 0.5 i found out that with this setup i'm getting something that is very close to the elbow direction and now in edit mode i'm going to select both of these new bones right click and symmetrize them and now this one won't be set up correctly yet i need to go back to edit mode because of the naming conventions of the source rig the symmetrization doesn't work perfectly so all i need to do is select the helper bone shift select the upper arm ctrl p and parent it with connected and i also need to go to this bone and change the target bone to the right forearm and now it behaves as i want it to and let's do the same for the knees extrude a helper bone extrude the actual pull rename them symmetrize them parent this bone to the upper leg on the right side then in pause mode select the lower leg shift select the helper ctrl shift c copy rotation local space local space 0.5 and same on the other side so now we have these bones that we can use to retarget to our poles and to have them appear here in this list they need a keyframe so just select the poll targets skip the helpers they're just here to orient the actual polls and then i'll just insert any type of keyframe for example location and rebuild my bone list and now four new entries were added to this list and those are the poll targets for my source and they are correctly mapped to the poll targets in my target rig i'm not sure if that is because the names match or because i did this before but by now i think you should be able to map your bones so that shouldn't be a problem and i'll move this armature in the center and let's switch to rest pose and try to retarget again now this is looking much better but something is still off and this has to do with the rest pose of these rigs that we already learned about the rest position of the source rig is a typos whereas the target rig is in apos so let's go to edit mode for the source switch to pause mode clear all transforms and rotate these arms to match the orientation of the target rig and now something you can do is to select all bones go to the armature tab create a new pose library press the plus sign and add new in this way you can access your pause anytime and that will help you if you want to retarget many times and now i'm going to switch my pose to current and retarget the animation again and now we are getting something that is much much better it looks better but the legs are a little bit overextended and that is because of the height of the hips control so one way to fix this is to select the hips control go to graph editor find the location axis that controls the up and down movement of this control which is most likely the z-axis and isolate it in here grab the whole curve and move it down by pressing g and then y okay this is almost perfect however if i can i prefer to fix this kind of stuff using the retargeting tools so let's undo and we can do that by disabling this auto scale option and we'll do that in a second let me just wrap up the ik section so i hope this will give you enough ideas as to how to retarget to ik controls by the way you can use this same technique with the pull targets in refi because in rigidify this thigh control can be switched at any point to a pull target you just have to go to your rig properties and click toggle tool portal tall toggle pole and that will give you this type of pole target if you prefer it and if it helps you with your retargeting something else that could be useful is the intermediate rig technique that i showed you you could create your intermediate fk rig constrain your main rig to it and then retarget to the intermediate trick and then you could add these helper bones and pole bones to the intermediate rig and that could work better with ik and custom breaks there are too many variations in too many variables so i cannot give you one technique that will work all the time for example in this rig the ik also controls the rotation of the hand if that wasn't the case then maybe the retargeting process would be different the pull target is not parented to the ik control but it could be and then maybe the process would be slightly different so i cannot cover all possible cases but i hope this gives you enough pointers to make your own rig work but if you hit a roadblock feel free to contact me on discord for example and maybe we can figure something out okay now let's see what the auto scale option does and how it can help us solve our problem with the over extended legs okay this is the state of our retargeting that we have and let's undo so far we always retargeted with this auto scale option enabled and this option is great it actually works most of the time most of the time you can just enable it and forget about it when we retarget the source and the target armatures generally have a different size sometimes it is almost the same like in this case and other times there may be a big difference i'll show you an example of that as well but with this auto scale option the rococo add-on automatically calculates the difference for us and we just need to press the retarget button and that's all however there are cases when this automatic calculation doesn't give us the results that we want like in this case for example so let's disable it and just for fun let's make the source armature really big and then we also need to bring it in the apos so here is where this pose that i saved will come in handy i just have to go to my pose library and click this magnifying glass and that will put the armature in the pose that i saved you have to be careful in pause mode all bones need to be selected if i if i only have one bone selected and press this button then only this bone will be set in the pose so i need to select everything and hit the button and now with auto scale off and pause set to current i'm going to retarget and here is what happened basically the root of my target armature the hips was moved to the hips of the source and now my character is kind of dancing in the air so that's not what i want i'm going to undo and so we obviously need to scale this armature down rather than up and the rule of thumb is that you want the root bones the hips in this case of both armatures too much so i'll enable x-ray and for my target armature i'll disable shapes from viewport display and that will give me the bone display and now i'm going to scale this armature so that the hip bones kind of match in position and now i'm going to try to retarget again and we are getting something very very reasonable if i unhide my fk rig which i have already prepared it has the animation already there you'll see that the results are very similar but if it doesn't look right to you you can undo scale your armature again up or down let's see what happens if we scale it down a lot retarget and the pelvis of the character went down by a lot so i like this size so our target and that's it okay this rococo video is kind of getting long but this is cg dive so i guess that's fine we covered all of the important stuff i just have two more examples for you and i want to let you know that your target rig and your target character doesn't need to be perfectly humanoid like this cartoony animal here it is still fairly humanoid but it has a long body and short legs quite different than the source but other than that it has a humanoid structure and it's even in the t-balls it's rigged with a rigidify rig and i set everything to fk mode so that i can retarget and demonstrate it quickly but the same ik techniques that we covered in the previous sections will work here as well and so i have everything set up here sorcery target rig and all the bones are correctly matched to each other so i'll go to object mode place the source rig in the center of the world and retarget and you'll see that the animation was retargeted correctly for the most part there are two problems one is that the feet are sliding quite a lot this is particularly bad with this dancing animation and i did all sorts of tests with this character and other similar cartoony characters and i could not find a simple solution that works by just pressing retarget so some sort of motion cleanup will be necessary in this case and the other problem that you may have noticed already is that these toes are kind of flipped and this seems to be a bug i reported it and the people from rokoko said that they would look into it this seems to have something to do with the proportions of the rig generally it doesn't happen when both rig source and target have similar proportions but here is a solution that i found i'm going to undo i'm going to uncheck auto scale again and scale my source down quite a bit until the hips bones of both armatures match and with this size i'm going to try to retarget and here it is with this size i'm getting properly retargeted animation as far as it is possible with this character and the tools are not flipped if i undo and if i make the character really small and retarget again um not in this case but sometimes depending on the size of the rig even without the auto scale option the toes are flipped um and so you have to find the right size which gives you a good retargeted motion and does not flip the toes here is an example where the toes have lift and if i change the size of the source rig a little bit then they're fixed again and this is the last example that i have for this video and here we are really just trying to see how far we can push this retargeting stuff for this example i chose a walk cycle and i'm going to try to retarget this to the dinosaur character you know again i have everything set up already to save some time but when i'm editing the video i'm going to overlay a graphic here to show you which bone of the raptor is mapped to which bone of the source armature one thing that i want to mention quickly is the pose that we are going to use for targeting clearly the dinosaur is not in t pose and i was expecting that i would have to create a really special pose uh rest pose for the source armature as well but that wasn't the case i was expecting that maybe i have to um kind of make the character bend forward or something like that but really all i need is this is my response the t-pose and here i have saved the pose for targeting already and all i needed to do is to orient the arms down the spine and legs are all in their default position so now i can go to object mode press alt g to place the character in the center of the world and try to return it and all things considered this motion from a humanoid character was retargeted quite well to a dinosaur character so that's all i have for rokoko in the upcoming videos we're going to explore other retargeting add-ons like autoric pro rhynium and so on and later on we are going to focus on cleaning up using and combining retargeted motions
Info
Channel: CGDive
Views: 2,262
Rating: undefined out of 5
Keywords:
Id: Nyxeb48mUfs
Channel Id: undefined
Length: 60min 51sec (3651 seconds)
Published: Thu Oct 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.