Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: IK with pole vector problems. Maya

  1. #1
    integer
    Join Date
    Feb 2012
    Location
    Toronto, Ontario, Canada
    Posts
    41

    Default IK with pole vector problems. Maya



    Hey,

    I keep running into the same error when creating pole vectors for my IK handle. Whenever I set the pole vector, the joints rotate out of position. I have no idea why it keeps happening.

    Before attaching the pole vector



    After attaching the pole vector



    This happens all the time for me. Even when I follow tutorials. So I have no idea why it's happening. Is it because the joints aren't completely straight, but a little off center (the ankle isnt directly under the hip)? They are all oriented properly.

    Here's how I do it all.

    -orient the joints
    -create IK handle
    -create circle nurb for pole vector control
    -point/orient circle to knee joint
    -delete constraints
    -move control out from the knee, using object move axis
    -freeze transforms on control
    -attach pole vector to control

    Im wondering if I have an option set on something that I shouldn't. There's no options for the pole vector. Just weighting. Maybe the ik handle options??



    If anyone could shed some light on this. I would be extremely thankful.


    Thanks

    Stefan

  2. #2
    for loop
    Join Date
    Jul 2010
    Location
    Austin, TX
    Posts
    208

    Default

    Is it because the joints aren't completely straight, but a little off center (the ankle isnt directly under the hip)? They are all oriented properly.
    The hip, knee, and ankle need to create a flat plane to maintain proper orientation, if they are off, then it will give strange results.

  3. #3
    integer
    Join Date
    Feb 2012
    Location
    Toronto, Ontario, Canada
    Posts
    41

    Default

    So it seems. Thanks Matt.

    But, if that's the case, what if the arms and legs aren't completely straight? For instance, sometimes the A-pose, the arms are slightly bent (creatures). How would you get around that?

  4. #4
    Happy Mutant
    Join Date
    Mar 2010
    Location
    Champaign, IL
    Posts
    109

    Default

    are your ik chains longer than 3 joints? as long as you only have 3 joints, those 3 points will always define a single plane

  5. #5
    tiny dancer
    Join Date
    May 2011
    Location
    Seattle, USA
    Posts
    199

    Default

    Quote Originally Posted by StefanLipsius View Post
    So it seems. Thanks Matt.

    But, if that's the case, what if the arms and legs aren't completely straight? For instance, sometimes the A-pose, the arms are slightly bent (creatures). How would you get around that?
    Yes!!! I'm curious what the "official" way to handle this is.

  6. #6
    integer
    Join Date
    Feb 2012
    Location
    Toronto, Ontario, Canada
    Posts
    41

    Default

    They are 3 joints long. I've found that if you do the controls for the foot first, the foot won't move, but the knee will still move.

    I get the 1 plane thing. But, when you create an ik handle, it creates a plane by itself. So you have the line that goes between the hip and the ankle, but then you also have 2 lines that follow the bones. No matter the angle of the bones, there will be a flat plane between those two. That's why the bone doesnt move when you create the IK. But, once you attach the control as the pole vector, it seems to align the knee joint to be directly between the control and the line going between the hip and ankle. That's where the movement comes in. So I guess the real question is how do you get the control to keep the same alignment that the IK has. If that makes any sense...

  7. #7
    integer
    Join Date
    Mar 2010
    Location
    Seattle
    Posts
    39

    Default

    If you could show us that same image with your joint LRA display on for those joints it may be easier to point out what's causing your problem.

    But if you're in an A pose or a T pose you just need to make sure the joints are all on the same plane, as well as the forward facing axis of all of the joints in the chain. If the forward facing axis isn't parallel to the plane(which should put the axis directly on the plane if the joints are), applying the IK chain will try to correct it for you, but won't necessarily get it right.

    For the best results I make sure to have every joint in the chain sit on the plane with the forward axes aligned parallel to it. This is how I set up my chains for IK and I haven't had any issues with them or PVs.

    I hope this is helpful!



  8. #8
    Tuple
    Join Date
    Jul 2011
    Location
    Sweden
    Posts
    15

    Default

    Intresting topic, would be nice to see what tricks peoples use for this issue.

    The way I do it is getting the initial Polevector channel values from the IK handle, pipe those values on a locators position, creates a null around that locator, moves the null to the startJoint of the chain.
    Then I aim constrain the locator with the IKhandle as world up object, aiming towards the start- and end joint.
    This locator should now give you the correct vector that you can offset to a more suitable position and then apply a PoleVectorConstraint to without offsetting the joints.

    I got this scripted, but this should be about it if I remember correctly. I'll double check tomorrow once I get hold of my hard drive forgotten @the office.

    Hope this helps
    /Emil

  9. #9

    Default

    personally i find it easier using vector math, its covered really well in this vid:
    http://area.autodesk.com/masterclass...class3_q1_2012

    if your not comfortable doing it yourself theres loads of free scripts out there that do it, have a look in the zooToolbox
    Lee Dunham | Rigger
    ldunham.blogspot.com

  10. #10

    Default

    In some occasions I'm able to fix this issue by toggling off then back on the Inherits Transforms under the transform attributes on the ik handle.

  11. #11
    undefined
    Join Date
    Feb 2012
    Posts
    12

    Default

    Quote Originally Posted by StefanLipsius View Post
    how do you get the control to keep the same alignment that the IK has.
    Hi Stefan,

    You might want to snap the pivot of the control to the middle joint of your 3 joint chain before making the pole vector constraint between the control and the ikhandle for the 3 joint chain.

    Hope this helps,
    Regards,
    Nate

  12. #12
    Co-Founder Rigging Dojo
    Join Date
    Jul 2008
    Location
    Austin
    Posts
    527

    Default

    the problems of pole vectors and rotation come from the fact that the joint orients are jacked up.

    If you have any values except "bend" (what ever axis that is) then you will have a jump when you constrain your pole vector. Maya joints are so easy to mess up when editing that this happens to people all the time.

    Fix your joint orients and all the other workarounds go away. Rule ,root node of the IK (orient values don't matter, bending middle joint - only one value in joint orient, child joint also doesn't matter, that center joint that the solver has to "solve" has to be correct or there is trouble.

  13. #13
    integer
    Join Date
    Feb 2012
    Location
    Toronto, Ontario, Canada
    Posts
    41

    Default

    Nate, I actually do that already. I remember seeing a tutorial somewhere where they got you to snap it to the middle of the chain, not the joint itself, but somehow select all 3 joints, and it will go to the middle. I just forget how to do that.

    But I think I understand it a little better now. That pic mzahmbie posted helps a lot. I guess for those arms, the best way is to make them straight, like a t-pose, but then rotate the shoulder joint, then adjust the joints using 2 axis only, leaving the third one untouched?

  14. #14
    integer
    Join Date
    Mar 2010
    Location
    Seattle
    Posts
    39

    Default

    I'd say that's the cleanest way to do it until you get used to working with joints. That's what I did when I was learning, just carefully rotated the arm/leg into place(and translated in parent space towards/away from parent joints to adjust length). When you get comfortable with it you can also use the joint orient tool to get the orientation of the joints cleaned up. If you understand aim constraints that's pretty much what joint orient tool is doing, but in a way that doesn't move the children. And constraints to get the chain of joints onto the same plane.

    Also, Brads advice is dead on, Maya joints are fickle. If you keep your joints right you don't have to do workarounds.



    Quote Originally Posted by StefanLipsius View Post
    Nate, I actually do that already. I remember seeing a tutorial somewhere where they got you to snap it to the middle of the chain, not the joint itself, but somehow select all 3 joints, and it will go to the middle. I just forget how to do that.

    But I think I understand it a little better now. That pic mzahmbie posted helps a lot. I guess for those arms, the best way is to make them straight, like a t-pose, but then rotate the shoulder joint, then adjust the joints using 2 axis only, leaving the third one untouched?

  15. #15
    Co-Founder Rigging Dojo
    Join Date
    Jul 2008
    Location
    Austin
    Posts
    527

    Default

    @joint orient tool in Maya and the new orient joint tool when moving joints both suffer from the same problem, Maya can't orient a joint in parent space, only world space so if the joints are in a 45, relaxed A stance, the joint orient will be wrong ( I would love to be wrong on this but I have tried so many variations to try and make it work)

    Brad

  16. #16

    Default

    One of the tricks I learned for this a few years ago (and I've got a script that handles it now) is to take the following steps as I'm setting up my pole vector:
    1. Point Constrain a locator to the hip and the ankle (or the shoulder and elbow)
    2. Delete the point constraint
    3. Aim Constrain the locator to the elbow with an up of the shoulder, wrist, hip, or ankle, depending on your setup.
    4. Delete the aim constraint

    Now you can move the locator freely in your aim and up axes, and have it to snap you knee/elbow control to--and no more snapping out of plane when you add a pole vector :)

    As a bonus, you can also use the locator as an aim if you're setting up joint orients to orient them into the plane.

  17. #17
    Co-Founder Rigging Dojo
    Join Date
    Jul 2008
    Location
    Austin
    Posts
    527

    Default

    Joe this works great until there is a bad joint orient at the bend. then you still get a jump.

  18. #18

    Default

    just curious, do you guys not recommend using vector math to get the pole vector position then?
    I use it without problem everytime.
    Lee Dunham | Rigger
    ldunham.blogspot.com

  19. #19
    integer
    Join Date
    Mar 2010
    Location
    Seattle
    Posts
    39

    Default

    For placing the pole vector target initially or when needing to match to an FK I'd say vector math is great. But if you're placing the mid joint/s in what will be an IK chain it's best to keep the joint orientations clean from the get go.

  20. #20

    Default

    ahh cheers Micah, thats what i missed...
    Lee Dunham | Rigger
    ldunham.blogspot.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •