-
Notifications
You must be signed in to change notification settings - Fork 5
Optional IK control for limbs.super_finger #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mad_master
Are you sure you want to change the base?
Conversation
These bones are used to attach sub-rigs, so they should also be moved in sensible way. Although it is very unlikely that fingers would have children, it's no reason to just break it.
Hi @angavrilov ! We've been checking the code here @MadEntertainment and we have some comments:
|
In limbs.super_finger (i.e. the more complicated style finger with a scaling master control) the individual bone controls use the circle widget, and it doesn't have any other kind of 'tweaks'. Sphere widget is also what BlenRig uses.
Remember that this is fingers what we are talking about. In my understanding IK is mainly useful for holding something, or onto something with some play between the object and the hand, where you otherwise would have to adjust all of the fingers manually to avoid unnatural slipping. Thus, for one, fingers have 3 bones so just a pole is not enough. You probably want to be able to define the base grip exactly and only have the IK adjust it. Building IK on top of FK allows using all of the FK controls to specify the base shape. The second concern is that since finger IK is a special case use, building a complicated IK rig that would be duplicated 10 times is not really justified in my opinion. In BlenRig, which I used as an inspiration, the IK constraint is simply slapped onto the user-accessible FK control bones.
Well, I based it on the master branch because I have no idea when that branch would be merged, and whether it is even stable to be used at all ;)
This awfully ugly script I hacked together ages ago in order to be able to view how rigs are put together: https://github.com/angavrilov/blender-scripts/blob/master/armature_map.py The fact that blender doesn't have any easy way to follow links between bones in constraints, parents and so on as if they were hyperlinks makes it really hard to understand what's going on without a map... |
I.e. make ORG bones follow the user-specified rotation fully, so that IK constraint sees it as-is too.
d1af9c6
to
e456cce
Compare
Used prop_search, inverted IK_FK, split applying layout_layer_selection_ui to non-fingers into a different commit so it can be handled separately. |
BlenRig has this feature, so Rigify was behind in this aspect. Since this is a feature for specific situations, which applies to 10 fingers if enabled, it is implemented in a lightweight way using the minimal number of new bones; specifically, IK is applied to the result of regular FK transformation, so existing FK bones can be used to tweak the shape. Another effect of that is that when IK is off, FK->IK snap simply normalizes the finger by absorbing as much of rotation as possible into the master control. This makes the operation useful even if IK is not used or even generated. For IK follow parent, it makes zero sense to follow the palm bones, so the rig has an option for explicitly specifying the parent bone. Natural choices are the hand, or a separate utility bone for something held in the hand, if the metarig has it.
Using names like 'f_ring.01_master.L' is somewhat silly, and 'f_ring.01.L.001' for the tip control is outright bad. This changes those to 'f_ring.master.L' etc.
e456cce
to
665ed2a
Compare
About IK stretch, I can't find a way to implement a good stretch without adding more bones. |
I wanted to learn rigify code base better, so I decided to try adding a somewhat involved but not very big feature. Since BlenRig has IK support for fingers, I thought implementing this may be a good exercise. I also did some tweaks in the finger code.
Since finger IK would be useful only for certain situations, and there are 10 fingers, I tried to implement this using as few new bones as possible; specifically, unlike with limbs, IK is applied as a correction to the FK shape. Thus there is only one new control, and two internal bones for switchable follow parent.
Bone relation diagram with IK: https://www.dropbox.com/s/4ca5bbskscysuuh/rigify-new-finger4.svg?dl=0