Help please: problem animating skeleton with multiple joints/ikHandles

Thanks in advance for any help anyone can provide with this frustrating problem.

I’ve been animating in Maya for years (using keyframes and dynamics) but I’ve never used joints and IK.

I’ve built a model and rigged it. It’s a rigid “mechanical” construction with 9 separate moving parts, which pivot and slide. (Picture something like a crane arm or bulldozer attachment: straightforward “mechanical arm” type model.)

I’ve made 3 nurbs circles as “handles” to control the animation, which are connected either to “root” joints or to ikHandles. I use a combination of straightforward Maya parenting, parent constraints, point constraints and pole vector constraints to connect everything together. A few of the joints have their motion constrained to certain axes or to certain end points/start points.

It all works perfectly: I can grab any of the 3 NURBS “handles” and move them, and all the connected pieces all move the right way.
However there’s a big problem when I start animating:

I move along the timeline and set keyframes, moving the NURBS “handles” to adjust the position of the model. It all looks great, and each frame is “correct” when I move the slider to that frame, but in the animation, nothing moves. All the frames are exactly the same: Maya simply renders the current frame over and over.

Eventually I figured out that the problem had to do with the NURBS “handles” moving, and the model’s ikHandles and joints not following. When I stopped using the NURBS “handles” and grabbed the ikHandles directly, setting keyframes with those, then suddenly my animation was working.

But there were still problems: certain portions of the model move, and others don’t. Again, everything looks perfect, frame by frame, when I manually view each frame using the timeline. But the animation ignores certain components of the model, which simply don’t move in the rendered frames; they stay in the positions they’re in when I look at the current frame (the frame I was looking at when I hit “batch render.”)

As I mentioned, I’m using a combination of different constraints, with actual “parenting” kept to a minimum. I’m not using Animation Layers, “weighting,” or Driven Keys at all.

Can somebody help me begin to figure out what’s going wrong? Please let me know if there are any important missing details in my story. (I appreciate everyone’s patience with a skeleton “newbie.”) Thanks very much.

ADDENDUM:

To make this 100% clear: If I set up my animation, keyframing the movement of the NURBS “handles” (circles parent-constrained to ikHandles), and then output it by manually advancing each frame and manually “rendering current frame,” and then stringing those frames together, the result is perfect—everything moves correctly. But if I “batch-render” the frames in question, the model doesn’t move (although the non-rendering NURBS-circle “handles” do).

Mentalray is not maya. unseen to you maya exports the data to mentalray. Because updating is heavy process for mentalray maya optimizes things that do not update. This optimizer sees maya connections to relevant inbound attributes. But the process is not perfect, it can oly see connections that are formal*. Ik handles typically are not.

You can either turn off the optimizer. This sometimes works.

Or you can bake your data down to easily readable connections.

Or you can just dummykey the ikhandle.

  • For example a expression that uses setAttr, sometimes ik handles.

Thank you very much for responding and trying to help!

I just tested your theory by switching over to the Maya Software Renderer and batch rendering the same sequence (i.e. moved the NURBS "handle" to move the model). The results were the same as before: "Render Current Frame" gives me the right results at various points along the animation, but the batch render simply produces the same frame over and over.

So whatever's going wrong, happens before Mental Ray enters the picture.

I'm intrigued by what you're saying about "formal" connections. It's obvious to me that something's missing from my animation; simply pulling the pieces around with ikHandles (parent-constrained to NURBS shapes) isn't sufficient, even if it "works" frame by frame (as I've described).

I tried to add keyframes to the whole model's hierarchy (selecting the model in the outliner and hitting "s") but then the entire model "locks" to this new keyframed position, and the NURBS "handles" can't move it any more. This suggests to me that your explanation is correct; the movements I make with the ikHandle chains aren't keyframing and are being overridden when I try to "actually" keyframe.

I'll look into using "setAttr" expressions, and "dummykeying" the ik handle, but I'm not sure I understand either.

Any further advice you could give would be very much appreciated.

Using a "cut the gordian knot" technique, I simply put together a .MEL script that advances through a sequence of frames and renders each of them.

The result is exactly what I was looking for, with no further changes necessary. All animation moves the right way.

(The rendering takes place "in the foreground"; Maya is unresponsive while running this script and the images preview in the render window as if I was doing it all manually; I suspect I'm taking a speed hit as a result.)

This suggests to me that there's something fundamental that can be done with regard to the "batch render" command itself.

One of the things people get wrong with maya is that they assume batch render is the same maya as your gui. It is not, it is a fully separate maya process with different set of rules. Theres no GUI for one thing, therefore theres no gui triggers.

Using a "cut the gordian knot" technique

Thats fine if you have enough licences. Batch rendering gives you much more bang for the buck, since you get more computers to crunch. Otherwise the difference is neglible, if you have enough memory.

Can you make a maya ascii* file that removes all important bits, but exhibits the problem and post it?

entire model "locks" to this new keyframed position, and the NURBS "handles" can't move it any more.

Does not matter you do it with the baking module before you send to batch, you never retain that change yourself in the gui. Sort of the idea here. Just do the same with all joints selected.

*maya ascii means as in not maya binary, I wont open binary maya files form external sources.

Thanks. Yes, I vastly prefer batch render and wish I could do it that way.

I'll carefully explore what you're explaining. It's difficult because I'm not really understanding what's "going wrong" -- the fact that I can get perfect results with a simple .mel rendering loop and can't get anything like it while batch rendering confuses me. I've pored over the "batch render" options looking for some kind of caching to turn off or on and not found anything.

(For example, I know that dynamics-based rendering has an option where you can move to a specific frame without making Maya compute all the dynamics from the beginning of the scene to that point, which saves time while working but (of course) negates the purpose of the animation -- you don't see what the frame in question would actually look like. What I'm dealing with is like the same problem in reverse: the batch render doesn't seem to be actually advancing through the frames and following the ik/fk chains the way the GUI does.

Thanks again for your help. I'll try to get together a simplified ascii file and upload it.