Blender: The 'Child Of' Constraint Demystified

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody johnny here in this video i wanted to tackle a constraint that had given me some trouble for a while that's the child of constraint in general it seems pretty straightforward but once you start using it it has some quirks that i wanted to work out so i put together this video to hopefully demystify it for you just a little bit to keep this simple we're just going to create two objects the first one is going to be a cube and that's going to be our parent the next one will be a sphere and this will be our child we're going to want our cube to move across as soon as it reaches underneath the sphere it's going to connect to it drag it along with it release it about here and then the cube will continue onward so first let's go ahead and insert keyframes for the movement of our parent i'll press the i key and insert the location i'm going to jump ahead 100 frames and move my cube over then i'll insert a second keyframe there next we want to create a child of constraint on our icosphere we'll do that under the constraints menu and add a child of constraint using the target eyedropper i'll choose the cube if i play the animation now you'll see that the icosphere moves exactly in sync with the cube however i don't want the icosphere to start moving until the cube is underneath it so what i want to do here is go ahead and change the influence of this constraint to zero and then set a keyframe now while my cube moves my sphere won't it's at this point that i want the cube to start affecting the sphere so i'm going to set a new keyframe here at a value of 1. you'll see when i did this that the sphere moved over away from the cube as if the influence had been won the whole time we can fix this by using the set inverse button what this does is creates a new relationship between the sphere and the cube based on where the sphere is keyframed when we click this you see the sphere jumps back to where it was and now this is the new starting point of its relationship to the cube if i scrub backwards you see we get some weirdness the reason for this is if you watch the influence as i scrub through this you'll see the influence goes from zero to one and we don't want that we want the influence to be zero up until the frame before it becomes one so i'm going to back up one frame and on that frame set the influence to zero you'll notice now down here in the dope sheet that the influence for the child of constraint has a solid bar from frame one to frame 28 that means there's two keyframes one at either end but the value doesn't change then at frame 29 the value becomes one and then as we scrub forward we see that our sphere is moving along with our cube it's at this point we want the cube to drop the sphere and to no longer drag it along the first thing you might think is to go ahead and set a new keyframe at 1 for the influence move ahead of frame and set it to zero but as you can see the sphere jumps back to its original position because that's the only location that the sphere has been placed at so we're gonna have to make some adjustments to the sphere itself jumping back to the first frame i'm going to go ahead and set a location keyframe for the sphere now i'll scrub forward and it's at this frame frame 61 that our sphere needs a new keyframe the question is what is the keyframe that it needs well if we jump back one frame we see this is where we want the sphere to stop moving so i'm going to go ahead and insert a keyframe now if i insert a location keyframe you'll see that all of the channels x y and z all have solid bars on them and if i move forward a frame the sphere jumps back to where it was this is because blender still thinks that that sphere is located at that previous point even though it's being affected by the constraint so adding a new location keyframe doesn't actually change its location it just re-inserts the same value so the question is how can i get this location put into a new keyframe this is where a keyframe option that you may have seen but not known what it does comes in handy if i go to the eye menu you'll see that we have a set of keyframes that start with the word visual this means the evaluated position currently of that object so if i insert the visual location of this object you'll see that the y and z locations stay the same but the x has changed that means this is keyframed at this point but now if we move backwards in our timeline we'll see that our location is really messed up if we scrub backwards in our timeline things just got squirrely again what we have to do here is similar to what we did with the influence we want the original location of right here to be the same until the frame before it changes to its new location so what i'm going to do i'm going to insert my regular location keyframe this just duplicates the original location of my object which is back here but because my influence has been won it's been moved over now i'm going to go ahead and grab my influence keyframes and move them ahead one frame i'll move forward to that next frame and insert my visual location and then finally move my influence keyframes back if i play this now i get the effect that i'm looking for so let's review what's happening here we start off with zero influence with our two objects keyframed at their original positions at this keyframe we simply reiterate that the influence is zero on the constraint at the next keyframe we change that influence to 1 and our cube starts dragging our sphere at this frame we reiterate that the influence is still 1 so that it remains constant across these frames and also we reiterate the location of our sphere being still the original location so that all through this time the original location is what's been affected by the influence of the child of constraint so in this frame we add a new location of our sphere which is the location it would be at at the end of our constraint and we shut off our constraint if we take a look at this scene we see the exact same thing happening except this time the cube is parented to a path and instead of just inserting a location keyframe and a visual location keyframe i've also inserted a rotation keyframe and a visual rotation keyframe there's also a handy way to do this in that you can insert location and rotation and visual location and rotation at the same time this whole process is going to come in really handy in a future video where we look at the ability of a claw arm to be able to pick up an object move it and set it down somewhere else but have a nice connection between the arm and the object i hope this explanation has helped to demystify the child of constraint just a little bit it's kind of tricky but i hope it makes a little more sense now so as always i hope this inspires you to make something awesome and until next time i'll catch you later
Info
Channel: Johnny Matthews
Views: 16,487
Rating: undefined out of 5
Keywords: Blender, Constraints, Back to Basics
Id: ul6dDAOc7zY
Channel Id: undefined
Length: 8min 29sec (509 seconds)
Published: Tue May 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.