Home Technical Talk

Align/Orient to joint in Maya

interpolator
Offline / Send Message
Hito interpolator
Hey folks

I'm learning some rigging in Maya, after picking up animation (pretty easy compared to rigging).

Can't seem to figure out how to align and orient a circle (control object) to a joint. Can't seem to figure out any of the align and snap tools in maya, after scouring through the tutorials and user references in the help files.

the circle controls the wrist, I can parent the ik handle to the circle and parent the hand joint to the circle, but I need to move the circle to where the wrist is and align its rotation to match the hand joint.

Thanks in advance!

Replies

  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    What you are probably looking for are point and orient constrain (Animation menu, Constrain>Point/Orient), make sure "Maintain Offset" is unchecked in their options, you can delete the constrain node after your controller shape is in place.
  • Hito
    Options
    Offline / Send Message
    Hito interpolator
    Looks like the parent constraint did the trick mostly, feels like a round about way of doing it, but I guess i'm just accustomed to max. thanks for the help!
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah I am really missing the usefulness of Max's Align tool when trying to align stuff in Maya. It seems like a basic function and all the solutions are multi-step workarounds when I just want a simple one-click align like Max's.

    Is there really no Align like Max's out of the box in Maya 2008 / 2009? I've looked through all the standard menus and can't find anything which does the same thing.

    Maybe there's a script out there - I'll check tomorrow. If not, I'll write one, it'd be easy (which makes it all the more frustrating that it isn't there by default!)
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    Wouldn't be the first time a feature isn't in Maya, despite being easy to write...
    I haven't ever found an align as nice as Max's in Maya out of the box anyways, but I haven't tried 2009 yet.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Hmm, rebb told me about the "Duplicate Values" command which you can use to copy translation/rotation/scale from the channel box to another object, so that might be fine if you just want to align from pivot to pivot.

    However it seems to be harder to do more complex alignments, then again I tend to only want pivot/pivot most of the time.
  • Rob Galanakis
    Options
    Offline / Send Message
    I cannot believe there is no out-of-the-box align tool, especially considering how essential it is for animation. It would take literally a few hours to create and test something like that... You can try this script, supposed to be like Max's align tool:
    http://highend3d.com/maya/downloads/mel_scripts/modeling/misc/Align-Tool-4470.html
  • Hito
    Options
    Offline / Send Message
    Hito interpolator
    thanks for the links guys!

    are there any pitfalls that I should be on the look out for when rigging in maya?

    I don't think I'm doing anything fancy, just standard reverse foot setup with driven keys to control the knee twist and heel lift and such. simple IK arm.

    Is there a way to make the joints more easily selected? I turned on the display handle option, and it puts a cross where the joint is.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    You can change the size of joints in the Channel Box, that might make them easier to select.
    One thing that really annoys me about Maya's selection in general (especially becomes apparent when dealing with joints, lots of hierarchy relations), is if you select just the parent of a joint chain, it highlights the whole chain too, this can get very confusing especially since it highlights them the same colour as if you had actually selected them (eg. if you select 4 cubes, the last one selected will be green wireframe while the other 3 will be white).

    This means your main selected joint is green, while the children are all white, which makes it look like you have them selected, and I've found can lead to all sorts of annoying mis-binds when I think I have certain things selected but don't...

    Thanks for the script link, Rob, I'll check it out at work tomorrow.
  • Funky Bunnies
    Options
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    I haven't done a whole lot of rigging in Maya, but sadly there is no out-of-the-box orientation align tool that I know of that's as handy to us max users. That script Rob linked to looks good though. And there are some specific align tools in Modify->Snap Align Objects->...

    Anyway, as far as bone selection if you're having trouble, you're on the right track with selection handles. You can go to the attribute editor and change its location so its not in the middle of all the nitty gritty (attribute editor->Display->Selection handle). Also, Display ->Animation ->Joint Size will change the base size of all joints.
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    I cannot believe there is no out-of-the-box align tool, especially considering how essential it is for animation. It would take literally a few hours to create and test something like that... You can try this script, supposed to be like Max's align tool:
    http://highend3d.com/maya/downloads/mel_scripts/modeling/misc/Align-Tool-4470.html

    Does the script reflect how it's done in Max?? I can't seem to get good results. How are u supposed to get orient joint values from rotation?


    Hito,
    If you know how rotation order on joints affects axis and create yer control objects accordingly. execute the following script.

    else, before executing...
    yer nurbs circle fer instance.

    for example, a joint rotation order of xyz...
    The joints would then run along x axis.
    SO... create a nurbs circle with the x axis option chosen.
    ( or jes model/edit respecting that x direction. )
    then execute the following:



    /*
    cly_orientControlToJoint.mel v0.01
    Roger Klado was here
    because no one else will do it fer me
    November 14, 2008 ( jes keep swimmin' )
    transfer a joints position and orient to a control object. Zero out objects rotation values by burying it in a group
    usage:
    1. select a "single" joint whose orient and position values are to be transferred to a control object(s).
    2. Select one or more "target" objects to be re-aligned and re-positioned.
    ( order of step 1 and 2 is not important )
    3. execute this script.

    requirments:
    for predictable orientaion...
    script assumes control objects are created and or modeled respecting rotation order of joint.
    eg.
    axis ( if the the reference joint "runs" along it's x axis then your control objects intended head to tail should run along the x-axis as well )
    direction ( negative positive direction dictated by axis order of joint as well: control object is modeled head to tail or visa versa depending on desired direction )
    */
    global proc cly_orientControlToJoint() {

    // selections and error checking
    string $jointInQuestion[] = `ls -sl -fl -type "joint"`;
    if (`size( $jointInQuestion )` != 1 ) {
    error "cly_orientControlToJoint requires that only \"one\" joint be selected before running";
    }
    string $victims[] = `ls -sl -objectsOnly`;
    string $controlSelections[] = stringArrayRemove ( $jointInQuestion, $victims );
    if (`size( $controlSelections )` < 1 ) {
    error "cly_orientControlToJoint requires that at least one object for alignment, must be selected before running";
    }
    // selections and error checking end

    float $jointPositionValue[] = `xform -q -ws -t $jointInQuestion[0]`;

    //aim control and zero out rotation values by burying in a group ( target objects aligned and zeroed )
    for ( $c in $controlSelections ) {
    string $cGrpName = $c+ "RotateGrp";
    string $cGrp = `group -name $cGrpName $c`; // because zero rotation "home" values are good when animating
    xform -ws -t $jointPositionValue[0] $jointPositionValue[1] $jointPositionValue[2] $cGrp; // align the group not the object
    string $aim[] = `parentConstraint $jointInQuestion[0] $cGrp`;
    delete $aim; // clean
    makeIdentity -apply true -t 1 -r 1 -s 0 -n 0 $c; // zero possible transforms // to do: preference
    }
    select -r $victims;
    }
    // the end
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    Hito wrote: »
    Is there a way to make the joints more easily selected? I turned on the display handle option, and it puts a cross where the joint is.

    in addition to other suggestions.

    right clicking over the joint
    select, set angle, attribute editor

    Right clicking over a joint when skinning will save u a lot of time.


    Universal joint size :
    Display > Animation > Joint Size
  • Flynny
    Options
    Offline / Send Message
    Flynny polycounter lvl 9
    think the best rigging advice for getting correct orientation position has been to simply make your controller the child of the joint you want it to control. Zero out all the values on the controller so its perfect, then breaking the child>parent relationship. Itl pop out but will retain perfectly, only now itl be in world coordinates.

    Maya is basically a hack about sort of program ive found, doesnt even have a reverse keyframes functionality built in.
  • Rob Galanakis
    Options
    Offline / Send Message
    Flynny wrote: »
    Maya is basically a hack about sort of program ive found, doesnt even have a reverse keyframes functionality built in.

    That is like saying, I think American democracy is broken because Americans like cheeseburgers. Reverse keyframe functionality, what does that have to do with the type of program something is? Maya lacks things for sure, and it is growing old, but I don't understand how you can assess it as a 'hack about sort of program' as evidenced by its lack of reverse keyframe functionality.
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    Flynny wrote: »
    think the best rigging advice for getting correct orientation position has been to simply make your controller the child of the joint you want it to control. Zero out all the values on the controller so its perfect, then breaking the child>parent relationship. Itl pop out but will retain perfectly, only now itl be in world coordinates.

    put the controller in an empty group and orient that to the joint instead. Now when you zero out the controller's value, the rotation and translation will retain a "zero Home" relation.

    or jes run the script above to automate the setup.
  • Flynny
    Options
    Offline / Send Message
    Flynny polycounter lvl 9
    Or there is that too Claydough ;)
    Rob Galanakis i didnt base my opinion solely on the lack of a reverse keyframe feature, i only mentioned that as a point. Anyway it was just an opinion and i presented it as that "...Maya is basically a hack about sort of program ive found"

    And I stand by it ;p

    Besides im still in love with the way animation was done in XSI so Maya is never going to be all that good compared, still it get amazing results mind and the whole scripting mentality is amazing.

    Hito the rigging in maya can be very powerfull, once you get your head around the hypergraph it opens up much more!
  • Warbringerd
    Options
    Offline / Send Message
    Warbringerd polycounter lvl 9
    Hito wrote: »
    Is there a way to make the joints more easily selected? I turned on the display handle option, and it puts a cross where the joint is.


    An essential while rigging in Maya is Window --> Outliner. you can use the perspective window or any of the isometrics but if you get into overlapping bones (IK/FK switches) then the view widows become useless for selecting specific bones. The outliner is a riggers best friend. Also another way of isolating any chains to avoid overlap and or confusion is to put them on thier own layers in the channel box, its a great way to keep yourself organized.
Sign In or Register to comment.