Parent object at a certain keyframe and also unparent it later


#1

Hello,

I would like to keyframe “parenting”. To be more precise I would like to parent an object to another one at a certain point during an animation and also unparent it again later.

Is it somehow possible to do this?

Thanks so much.

Jeany


#2

parent constraint.

Although to key the parent on and off you will probably want to parent constrain it to a locator or something as well, then key the weight from one to the other.

-Brad


#3

Brad has it correct, you will want to do a parent constraint. keying constraints can be a bit confusing if you haven’t used them before (I’m not sure what your experience is, so forgive me if this is a bit simple).

First of all, make sure there are no key frames on the object you wish to have (parent) constrained. Go to the frames that you wish to have the swap happen. Group the object to itself and name this new empty group to something easy like obj_ConstrGRP.

Create a locator, and name it World_Loc.

Select the object you wish to be parented to, then shift select World_Loc, and shift select obj_ConstrGRP.

Do a constraint -->Parent Constraint.

In the channel box, click on parentConstraint1, and set World_Loc to 1, and obj_ConstrGRP to 0. Set a key for both attributes. Move one frame forward in the timeline and set WorldLoc to 0, and obj_ConstrGRP to 1. Set a key for both attributes again.

If you have done this correctly, the object should appear to be unparented up until the frame you chose, then will act as if it is parented after that frame.

Let us know if theres any trouble…!

m


#4

Hi Brad, Hi Mike,

first of all thanks to both of you for responding.

Mike,
thanks for your very detailed explanation which is really nescessary in this case, so no worries ;-).

I have tried to follow all of your steps but when it comes to animation the object… well “kind of” moves into the directions of the joint it is parented to but it never is actually in the same place. The joint is part of a characters hand and the object is a box that he should have in his hand.

The object rotates and translates with the hand but as I said it is not in his hand. Also sometimes the object does funny 360 flips which the hand doesn’t do.

Maybe I am getting something wrong here. I thought it would probably be a question of pivot points but changing those doesn’t really make a big difference. Where does the locator have to be at the time I make the contraint? At world zero or where the object is? The box has to be in the exact position where I want it to be in the characters hand right?

Mmmh. I can’t really point out what causes my problem.

I hope you can help me out.

Is it actually possible with this method to have the object parented to another hand as well? Because the box is handed over to another character. Yes, things are getting complicated, sorry for this.

Thanks again.

Jeany


#5

sounds like your keys on the constraint might be slightly off or maybe missing all together. check the graph editor to be sure the constraint is switching.

If you want to hand off the object to another character, use the other characters hand as the second constraint instead of the world locator.


#6

I haven’t had any problems using this. And you don’t have to set anything up.

 [[b]ZV Parent[/b]](http://www.highend3d.com/maya/downloads/mel_scripts/animation/ZV-Parent-Master-5156.html)<-----Click Me!!![](http://www.highend3d.com/maya/downloads/mel_scripts/animation/ZV-Parent-Master-5156.html)

#7

Kyle, actually I haven’t even set the keys for swapping the object yet. First I wanted to see if it is parented correctly at all without swapping it. But it’s not correctly parented.

Xminus, this tool looks really cool. I will definitely try this out.

Thanks.


#8

you have to set keys for swapping the object. otherwise it is parented to two objects at the same time which will cause weird flipping and such.

zv parent looks sweet. I’ll be checking this out as well.


#9

I’m just curious why is this necessary?


#10

Emil3d:
I strongly feel it is a bad idea to have keyframes and constraints on the same object (Green keyticks in the channel box indicate this). If you have a group above the main object that gets constrained (obj_ConstrGRP), that means you can set keys on your main object without any conflict with the constraint.

jeany: Ya, its a bit of a pain to wrap your head around initially. It’s a hard to troubleshoot what you have without actually seeing the scene, but it SOUNDS like you don’t have the parentConstraint keys set correctly. Remember that you want to have either the World_Loc or the obj_ConstrGRP weight to 1 at any given time. If you don’t have this, the constraint will be trying to blend between the 2 different constraints giving you a ‘half parented’ deal like it sounds you are experiencing.

Also: Yes, just leave the World_Loc at the world centre, and don’t move it.

I too will check out ZV parent. The workflow I suggested is a level of rigging that needs to be easier for animators and other non-rigger types to set up.


#11

Oh, of course, I thought the constrained object itself is not animated in this example. If animated it is not just a bad idea but a must to be in a group.


#12

Yes, you were right, I haven’t had the keyframes set. Somehow I thought the swapping begins with parenting it to my second object. Didn’t get I already had to set keyframes before that happens.

So thanks a lot.

Now I know how to do it classic way and in addition I have a cool script to do it the easy way ;-).


#13

Glad it worked…!

m


#14

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.