Home Website Youtube GitHub

Biped template creates Ik hand with some values

Hello,

I built a rig from the biped template provided and the IK hands are not zeroed out. There are rotation values on arm_L0_ik_ctl and arm_R0_ik_ctl.

Also, is there a way to not separate the ik hand rotate and translates and make the ik fk switch in the synoptic work? If I turn off the “IK separated trans and rot ctl” on an arm in the biped guide, the switch stops working.

Keep up the great work!

  • Himanshu

Hi Himanshu,

I haven’t learned how to edit the synoptic yet. Our pipeline TD is implementing a different picker. But, as I understand, if you change the controllers from the template, you must also edit the synoptic to match the new controllers.

Also, you should expect to write some POST Python scripts to fix things that you don’t like in the rig. For example, we wrote 20 different scripts just for the base rig. Each character also has unique scripts.

You also have the choice to duplicate an existing module and edit it to act like you want it to. For example, I wrote a custom spine for our quadrupeds, so the spine controls still point Y-up, instead of Y towards the neck, because that is what our animators prefer.

For the hand, I didn’t like how arm_L0_ikcns_ctl was in world space, and arm_L0_ik_ctl had non-zero values. Also, our animators want arm_L0_ik_ctl to be the main control, so I swap the two controls.

So I wrote this in a Post script:

(This is modified from our real script, so it can run alone. It is just to show you the kinds of scripts you might have to write to design your ideal rig for your needs. There are not GUI options for every possibility.)

from mgear.core import attribute
import pymel.core as pm

### Orient the IK hands
for side in 'LR':
    handRef = pm.PyNode('arm_{}0_ik_ctl'.format(side)).getRotation(space='world')
    ikCns = pm.PyNode('arm_{}0_ikcns_ctl'.format(side))
    ikCtrl = pm.PyNode('arm_{}0_ik_ctl'.format(side))
    handChildren = ikCtrl.getChildren(type='transform')
    pm.parent(handChildren, None)
    ikCns.setRotation(handRef, space='world')
    ikCtrl.setRotation(handRef, space='world')
    # ALSO SWAP THE ORDER OF THE IK and IK OFFSET. arm_R0_ikcns_ctl should be child.
    pm.parent(ikCtrl, ikCns.getParent())
    pm.parent(ikCns, ikCtrl)
    pm.parent(handChildren, ikCns)
    oRoot = rigbits.addNPO(ikCtrl)[0]
    attribute.lockAttribute(oRoot)
    attribute.lockAttribute(ikCns, attributes=['v'])
5 Likes

Appreciate the detailed reply and the script, Chris. I am beginning to wrap my head around python and Qt designer so pre and post scripts are something I intend to learn to implement with mGear.

Thank you for your time!

Just an update: I managed to get the synoptic ik fk switch to work after turning off ‘‘separate IK trans and rot’’ in the guide template on the arms.
As for the rotation values on IK controls, just manually added ‘‘Rigbits> add NPO’’ on the IK control after building the rig.

So thank you again, Chris! :slight_smile:

1 Like