[Blender] Free addon: Dynamic Parent

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we'll talk about Dynamic parenting in blender often you may need an object in your scene to appear attached or parented to another object but only temporarily a common example is a character picking up a prop and then putting it back down later in the video I'm going to show you a somewhat complex example like this where we have the pistol in the holster then the character picks it up and excuse the crude animation but the character picks it up and puts it into another holster now it's attached to the body then the character picks it back up and holds it with two hands and at this point the second hand is also parented to the first hand so we can animate with just one controller and then the gun goes back into the holster and it's attached to the leg again this can be achieved with the child of constraint this constraint is very powerful however it is not straightforward to use that is why we'll be using the dynamic parent add-on which simplifies the process a lot you can now get access to all CG dive tutorials including my extensive paid courses unreleased videos and supporter only content for just 5.99 a month check out academy.cgdive.com subscription so let's start with a simpler scene and I'm going to show you how the child of constrained can literally drive you mad and why you should be using the dynamic parent add-on so here we have these animated spheres so I want this viewer at this point to grab the cube and move it over to this place and then it will move away and the second sphere will come and grab the cube again and move it to here and then the second sphere will move away okay I'm going to select the cube go to object constraints and use a child of in the target will be this fear so it will start moving it right away so at frame zero I'm actually going to disable the influence and press I over here then go to frame 29 which is the frame before the sphere grabs the cube and give it a keyframe and then on frame 30 give it influence of one and keyframe it so immediately that moved the cube so now we have something like this so this can be solved by pressing the set inverse button okay so far so good so here at frame 89 I want the influence to be one and then we move to the next frame where the sphere should release it and then we set the influence to zero but that causes the cube to go to the original position so let's undo and I can actually press this x button here that will keep the cube in place and let's keyframe this influence and see what we have okay now the cube is in some other random Direction okay let's undo um here after pressing the x button I see that I have some location information so let's keyframe that and keyframe influence and see what happens nope um maybe if I press set inverse nope so at this point I'm not even interested in trying to animate the second sphere which grabs the cube I just want to find the wall and bang my head so let's go to the beginning and delete all keyframes and delete the child of constraint and hold G to move the cube in the default position and now we are going to use the dynamic parent atom you can download Dynamic parent from this GitHub page it's completely free so you scroll down and go to download latest version just press that and download this ZIP file keep it as a zip file and in blender go to edit preferences install find the ZIP file and install it then you should see Dynamic parent here in the add-on options just enable it and the add-on will appear here in the sidebar under Dynamic parent and now let's see how to work with it I can go to frame 30 where the sphere is supposed to grab the cube select the sphere shift select the cube and press create and that will create the child of constraint now if I script through this animation you'll see that the sphere is moving and then add the frame where I press the create button the sphere will start moving the cube now let's go to frame 90 where the cube is supposed to be released from the sphere and I'll just press the disable button so again if I scrub through the animation the sphere drops it and releases it now the second sphere is coming so at this point it is supposed to grab it so let's select the sphere shift select the cube press create and the second sphere will start controlling the cube and over here it is supposed to let it go so with the cube selected press disable you know if we play the entire animation it works exactly as expected as you can see it was incredibly easy to set up unlike the manual method which can cause you serious mental distress the only thing to keep in mind here is that the cube shouldn't be parented to any of these spheres the relationship should be established with the child of constraints that the add-on creates now let's look at the complex example with a rig so here again it's important to make sure that the object or the bone in this case that will be parented and unparented is not parented to anything so this bone is not parented to anything and now let's say that at first I want the gun to be in the holster so here I have a special bone for the holster but if you didn't you can parent it to a leg bone but in this case I'm going to select the holster bone then shift select the gum bone and go to Dynamic parent and click create and that will create the child of constraint and now the gun is attached to the holster so let's enable automatic King and move this leg a little bit and then and then on frame 30 move it in space to show the parenting and then at frame 60 I'm going to press alt r o g to move it back into its initial position so now we have something like this now next we want the hand to grab the gun so let's move it a little bit here and then in frame 70 or so bring it close to the gun with the hand selected shift select the gun bone and press create and now we have the gun attached to the hips then the hand comes down and grabs it and now oops let's undo this the problem now is that I had both the hand and the gun bones selected and because of the child of constraint the gun is getting double transforms so I just have to select the hand and start moving and animating it so let's say that that now I want to place the gun here in the second holster so now we have the gun grabbing and coming here and then a bit later let's try to point it towards the holster and put it inside so at this point the gun is in the holster so I want to select this holster slot and then shift select the gun bone and press create and then I can move forward in time and move the hand away so now we have the character placing the gun in the holster and moving the hand away here I can animate the body a bit if I wanted to and the gun will stick to it now if I want to grab the gun again I guess I could get this keyframe and duplicate it over here in this one over here so now the hand goes back to the gun and at this point we want to attach the gun back to the hand right so select the hand shift select the component create I can select the hand and start moving it away from away from the holster right let's check what we have gun on the leg hand grabs it puts it in the second holster and then grabs it again okay we can keep going let's start moving this arm so I can place it roughly here please do better animation than me so now we have something like this and at this point we want this arm here to move the gun and the hand as well so with this hand selected shift select the other hand and press create and now I can keep moving this hand and it will move everything with it of course this relies on ik so you have to have ik on the arms here you see a little bit of a popping in the hand so let's see why let's start over actually I'm going to get rid of the child of constraint here in the LEDs keyframes and let's place this hand create Dynamic parent and let's see what happens it's looking good so here I should be able to keep animating this hand yeah and now it looks smooth so let's say that at this point I want to unparent this hand and move it away and I can also move this hand away and start trying to put this gun back in the holster okay and at this point select the holster bones you select the gun bone create and then I can move the hand away and I can try moving the leg a bit okay so that's a rough demo but I think you can see how you can easily parent and unparent an object within the rig the only slight problem with this workflow is that if I select the gun bone and check the child of constraints you'll see that the add-on creates a new child of constraint for each switch so here's the first constraint where the gun was in The holster and then at the end where we put it back in the holster We have basically the same constraint I asked the add-on developer about this and he said that because of a limitation in blender it is impossible to reuse these constraints but do not worry about it even though there are many constraints here only one of them will be active at any point so they are not making your rig heavier or anything like that if you learn something new please click like subscribe and check out academy.cgdive.com because at the CG dive Academy you can find all of my exclusive tutorials and exclusive content
Info
Channel: CGDive (Blender Rigging Tuts)
Views: 9,650
Rating: undefined out of 5
Keywords: blender3d, b3d, rigging
Id: zjfQ7My3KVI
Channel Id: undefined
Length: 12min 56sec (776 seconds)
Published: Thu Sep 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.