View Full Version : IK not evaluating
05-19-2011, 06:40 PM
I'm wondering if anyone else has run into this problem, and if they've found a way to solve/avoid it:
What I'm seeing is that upon re-opening an animated scene, the wrist joint (typically only the left wrist, oddly enough) has wandered off its IK handle slightly -- that is, the end effector is not at the IK handle.
The only way I can get it to "snap back" into place is to either translate one of the arm joints, or stretch the arm (which ultimately is just translating the arm joints).
Even if I undo, the IK works all hunky-dory from that point onwards -- until I reopen the scene again. This is fine (relatively) for interactive renders, but it doesn't help so much on the render farm...
Here's a little more detail, if it helps:
*Using Maya 2009.
*The IK is over a three bone chain (shoulder, elbow, wrist).
*using stretchy IK (translating joints based on distance of IK control to shoulder)
Any insight would be appreciated -- I'm running out of things to look for...
05-19-2011, 06:57 PM
I suppose I should also mention some things I *have* tried already:
I've tried forcing a DG evaluation on all nodes and the IK nodes specifically, but that doesn't seem to "update" the state of the IK/effector.
I've two joint chains (IK/FK) blending into a bind chain using pairblends -- I've seen some weird things happen when connecting 3D data (.translate, .rotate) rather than 1D data (.tx, .ty, .tz, etc.), so I've reconnected everything using the single inputs/outputs. That didn't seem to solve anything, so I disconnected the IK joints from the bind joints altogether -- but still the problem persists.
The only work-around I've found so far was to have a preRender script run that "nudges" the IK joints, forces a DG evaluation (necessary for it to update in batch mode), and then nudges the joints back -- but this only seems to work most of the time...
Even with a work around though, I'd still really like to know what's going on. :P There must be a better way!
05-19-2011, 11:04 PM
Solved. For those interested, problem source and solution below:
I had been using nulls (groups) above my joints to "zero out" the transforms, so instead of
I was using:
LT_Arm_01_Jnt_Adj <-- Null
____+LT_Arm_02_Adj <-- Null
________+LT_Arm_03_Jnt_Adj <-- Null
The issue seems to have stemmed from where my effector was getting parented -- it was being parented to LT_Arm_03_Jnt_Adj rather than LT_Arm_03_Jnt .
Anyways, it seems to confuse Maya when the ikEffector is parented to a null above a joint rather than a joint itself.
--But only when reloading scenes.
It shouldn't _really_ have mattered since both occupy the *exact same point* (since my joints weren't actually translated, the null parent was), but there you have it.
I hope this saves others some headaches and sleepless nights...
05-20-2011, 01:57 AM
Woah, Lumavore - thanks for this, actually. I had the exact same problem on an old rig and I decided to blame it on bees (I hate bees.) Now that you explained what was causing it, I did have a look at it and it did turn out to "bee" the problem after all.
It would seem like an inconsequential bug (because it usually snaps back into place the moment you touch it) but atleast I know what's causing it.
05-23-2011, 02:03 PM
Just to add to this, I had a similar problem last year with rigs that had been working fine for a while in maya 8.5, but after we upgraded to 2011 the IK sometimes had the same problem. After a little troubel shooting I was able to fix the issue by setting the joints prefered angle. I never had to do this in 8.5, but 2011 seems to want it set, even if the joint chain is bent when created. If anyone else runs into this problem, this is one more thing to check for. Now I always set this, just in case.
05-24-2011, 07:34 AM
Thanks for that Richard, I forgot about that -- manually setting the preferred was something else I tried while trying to solve the above issue, and while it didn't quite fix the problem I was having, I did notice that setting a preferred angle *did* seem to make the problem less extreme.
Definitely something I'll be paying more attention to in the future.
05-24-2011, 10:19 PM
So, seems I celebrated a little too early -- seems the ikEffector STILL wanders off the handle on some shots, though not as obviously now.
What's more, I'm finding I now get warnings for cycle errors coming from the ik end joint's .matrix attribute :P Though I'm not entirely sure the cycle error is actually breaking anything...
Back to the drawing board...
05-25-2011, 01:14 AM
Ok...think I've got it this time.
Parented in the wrong direction (the above mentioned cycle being the tip-off): I should have parented to the joint *above* the null (the elbow), not below (the wrist). Trouble is that now the offsets from my stretchyIK (which were on the null) wouldn't be inherited into my ikEffector -- but an addDoubleLinear seems to remedy that quite well.
Looks like we're back in business! Cycle errors gone now too!
05-25-2011, 01:14 AM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.