Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Parent Constraint Forgetting Animation

Parent Constraint Forgetting Animation

Anonymous
Not applicable
7,776 Views
8 Replies
Message 1 of 9

Parent Constraint Forgetting Animation

Anonymous
Not applicable

I'm animating a fight between two rexes. At one point Rex 1 grabs Rex 2 by the neck, so I have Rex 2's center of gravity parent-constrained to Rex 1's head (so Rex 1 can shake him around and Rex 2 will automatically follow.) I finally managed to figure out how to key the constraint on and off on a separate animation layer. I have the 'Blend Parent' node and the 'Node State' added to the anim layer, and I've keyed them so that the constraint turns on right when Rex 1 grabs Rex 2's neck. The problem is, the constraint works properly but it causes Maya to "forget" the keyframes I already had set on Rex 2's center of gravity control. So even if he's not following Rex 1, his COG control remains motionless through the whole timeline as if I never keyed it.

 

What am I doing wrong?

0 Likes
Accepted solutions (1)
7,777 Views
8 Replies
Replies (8)
Message 2 of 9

kirbysteele
Advocate
Advocate
Accepted solution

Hey stephanie,

 

That is a frustrating problem, and unfortunately that is just how maya works. You can't put keyframe animation on any channels that already have some kind of constraint. How to get around this is to put the control (or whatever has keyframe animation on it) inside of a group. Then the group is the object that gets the constraints. This way the control will inherit the translation and rotation from the parent group, but it will maintain its own keyframe animation as well. 

 

So you're going to need to put Rex 2's center of gravity into a group then constrain that group to Rex 1's head.

 

Note: One thing that will probably happen when you turn on the parent constrain after Rex 2 has been animating is that Rex 2 will jump to a new position. This is due to the offset values on the parent constraint, but it is easy enough to key values before and after turning on the constraint to keep Rex 2 in the same position.

Message 3 of 9

Anonymous
Not applicable

Thanks for your response. Unfortunately I can't group them because they're both from referenced files, but I will definitely try this out on the next shot. I don't think I'll be using referenced files anymore after this; they just seem to cause way more problems than they fix.

 

Thank you again!

0 Likes
Message 4 of 9

mujuningaiza
Advocate
Advocate

The  best way is as @kirbysteele said, you could use custom attribute to toggle btn Rex 1, Re 2 and World, using SDK or condition node would be fine to toggle them but as said parent group not a controller

0 Likes
Message 5 of 9

Anonymous
Not applicable

I tried this out on a new scene and it seems to work so far. Thank you so much! This will hopefully save me a lot of time. That is so frustrating though, I feel like Maya makes it so difficult to key such a simple command. Ah well.

0 Likes
Message 6 of 9

Anonymous
Not applicable

The constraint works but is now causing massive viewport lag. Any suggestions?

0 Likes
Message 7 of 9

kirbysteele
Advocate
Advocate

Hey stephanie,

 

Sorry about that. I'm not sure that I can give a good answer without taking a look at the scene. If you can upload it, I will take a look and see what is going on.

 

Since it seems like your saying the problem is connected to the parent constraint I'm not sure this will help, but here are a few trouble shooting steps that can help with lag if you can't upload the scene.

 

  1. If your model was fine and has slowley started to lag your model might have build up quite a history when modelling, this can cause maya to lag as it is processing all this in the background. Delete non-deformer history can reduce some of these calculations.
  2. Another thing that can bog down the modeling panels is smooth preview being used on a lot of objects.
  3. Organizing the scene using display layers to only show the necessary pieces for animation.

 

Thanks!

0 Likes
Message 8 of 9

Anonymous
Not applicable

Thanks so much for your quick response; turns out it seems to only happen when I key the 'Node state' for switching the constraint on and off. I keyed just the 'Blend parent' node instead and there seems to be no lag so far.

0 Likes
Message 9 of 9

Anonymous
Not applicable

Hi, 

look at this tutorial : https://www.youtube.com/watch?v=GkDNwFZgc-Y 

I had the same problem and I think it will help you or to someone with the same question

0 Likes