Create IK on the default Armature

Issue #178 resolved
sc created an issue

Hi guys, hi Thomas,

This is a suggestion not an actual issue, when i started using this awesome plugin, i used to convert armatures to rigify when i’m done with the import process, but as you already know this complicate things, visually speaking and also on the backward compatibility. (you can’t import poses anymore…) . One of the main reason everyone uses the rigify plugin is for IK ( me too ) but You can setup IK chains on the default armature with ease and it will be better than rigify ( way more clean) and you can keep importing poses, animation and all the good stuff.

So my suggestion would be to add A tick box in the daz importer panel that sets the IK bone helpers (hands , feets, pole bones) for the default armature. I can post the detailed process if you want to see how i do it.

Is this simple to implement this with code? I know python, javascript, c++ but i am not really familiar with the blender API and also quaternions and stuff related to 3d in general but i can definitely help on this

i will be glad to hear what do you think about this

Thanks

Comments (20)

  1. Thomas Larsson repo owner

    Did you try to convert the rig to MHX? It has IK but also a quite straightforward relation to the original rig.

    Adding IK to a chain of bones is easy, but what complicates things for G3 and G8 is that the upper arms, forearms and thighs consist of two bones, bend and twist. You can add extra bones to deal with that, but then you essentially end up with something like the MHX rig.

  2. engetudouiti

    I hope Thomas still keep up-date MHX2 as default importer IK RIG.😀

    because it offer many tools which I can use to make animation as default.

    One thing I afraid before, Thomas seems stop to pray with MHX2 Rig. but if you keep up-date for daz genesis rigs, I may prefer MHX than rigi-fy .

    One Rigi-fy problem is it is really good for user customize, as logo blocks. But it seems offer too many un-necessary bones generate for the block system. so I often feel, it take too long time, to switch IK FK,

    If I am real animator, I can not wait more than 5 seconds. to switch.

    On the other hand,, MHX rig seems difficult to customize, after generate ^^; So I hope,, if MHX can offer customizable system, like meta-rig.

    Though I almost content with Current RIg,,, (I may play again MHX .. It was stable I remember,,)

  3. Alessandro Padovani

    Hi @sc, if I understand correctly what you propose is just another “simple” rig other than mhx and rigify, that perhaps could mimic the new ik chains in daz studio 4.12. This way the user could have the same “rig” as daz studio. The idea per se is not bad, but since daz studio has strong issues yet with the new ik chains, perhaps it is better to wait for them to work fine before trying to import them.

    Also there are some users, like me, that like to make their own rigs, so a plain bones no ik figure to start from is good for us.

  4. Thomas Larsson repo owner

    Alessandro, the way I understand it is that IK in Blender works best if the arms and legs have two bones. But in G3 and G8 the arms have four bones (bend and twist) and the legs have three, which complicates things a lot.

  5. Alessandro Padovani

    Yes I agree on that. In my rigs I tent to merge extra bones and also use bendy bones that simplify things a lot. Especially for facial rigs. But that can’t be automated it requires some manual work. Also I enjoy making special rigs for unusual shots such as a deforming body for horror or sci-fi stories. Again requiring customizations of the original bones.

  6. sc reporter

    im at the office right now but i made a rig with simple ik i will post it here when i get back home , the idea is not bad but i found some issues that are not that easy to address.

    Take a look at this https://devtalk.blender.org/t/pole-target-and-inverse-kinematics-limits/5604

    basically speaking you cant have poles and bone limits at the same time, blender limitation ?!!!

    and also you can’t import poses with IK and poles enabled. the IK bones don’t follow the pose so it results in a weird pose.

    i did a rig with ik limitations (not bone constraints IK limits on the ik tab ) but it’s hard to tweak you need to play with locks and bone stiffness to get it working but it will be very shaky, so i don’t have the solution at this moment. I ll upload the blend file tonight so you can try it

  7. sc reporter

    Hi guys, so here is the rig i was talking about. i fixed the leg shake issue, it’s not perfect tho so there is room for improvement here.

    (blender 2.91 , diffeomorphic last commit)

    https://ufile.io/dc28tmm6

    I see 2 problems with this rig ;

    1. You need to turn off the IK bones before importing poses
    2. The hand and feet rotation need to be solved out , it’s not really an issue, we just need to figure out how to do it properly

    But im gonna keep saying that this is a better rig very simple and effective if we manage to fix the problems i've mentioned above

    The first one is easy i think a fix for this would be to make a driver who controls the ik influence bones and repostion them after the pose is applied.

    The second is a bit more tricky, it involves drivers too but we need to find out what’s the best driver config for this.

    One last thing, i can’t figure out the correct stiffness values for the arms in order to have smooth moves, if someone finds it, please post it

    Let me know what you think

    Thank you

  8. Thomas Larsson repo owner

    I added an experimental button that creates your ik bones. It is in the Corrections section.

  9. sc reporter

    Wow, you are fast let me try it . I did some fixes to the ik rig from yesterday, i added the copy rotation for the forearm, and i’m planning to add an ik bone for the neck/head, ill post the updated blender file once i’m done. BUT A BIG F THANKS thomas. We will never say it enough

    I forgot to mention one other thing. you need a function that checks if the ik bones is used before applying a pose, then if true turn off the ik influence and calculate the distance/rotation (quaternions?) between the ik bone and the closest non ik bones and translate the ik bones after applying the pose and finally turn it on. At least this is the only solution that i can think of. what do you think?

  10. sc reporter

    Just tried it and i’m impressed ! You did an awesome job, but i failed to give you a good ik system to implement so let me work on it a bit.

  11. sc reporter

    https://ufile.io/yhahzj8h

    This is the last version i came up wtih. I found out that rotation lmits and ik don’t play well together in blender so i wasn’t able to make the forearm following the hand twist without getting weird results. There are a couple of solutions we can try but all of them are heavy (adding extra bone with drivers) not the best move if you still want to apply poses. If anyone want to try it will be much appreciated. But overall it’s way easier to pose than straight FK or rigify, let me know what you think of it. Thanks

  12. Thomas Larsson repo owner

    I think IK sort of works now. There is a new Rigging section in the import options, which let you load characters with custom shapes and simple IK. There is also an option to connect the bones in the IK chains to their parents, to really make sure that the bones don’t break up.

    However, there is something fishy going on with extreme poses. Here are the first three base poses for G8F (Base Pose Kneeling A, B, C), first FK, then IK:

    Pose A and C look the same, but pose B is off with IK. This has something to do with the stiffness values of the legs, but the behaviour seems to be quite random.

  13. sc reporter

    Pretty sure it’s the bone stifness that needs a bit of rework , hopefully it can be fixed, because i’m starting to think that ik in blender is still a bit “clanky”. will keep working on it but in the mean time there are a couple of more urgent issues to deal with. Thanks thomas

  14. engetudouiti

    Actually I hope to pray and test this new IK rig more. (but I know it may not perfect IK which can actually lock bones correctly)

    then at same time, I hope to ask Thomas to change way to add IK bones if you can.

    At current we need to decide include IK chain as start import option.

    But some version can generate IK chain only when we need it. So I can test with keep default clean rig scene. without double import mesh etc again.

    If only test pray with one actor mesh, it not matter, but basically we may attach many cloth or weapon etc etc,

    so when Import add new IK rig may cause difficulity, when we need to get default rig. I feel.

    If new IK rig actually stable enough, I do not care, but I think it need more stablilty to use actuall walk animation etc.

  15. Thomas Larsson repo owner

    You find buttons in the Advanced Setup > Rigging section.

    I think that my original reaction, that the bend and twist bones would complicate things a lot, turns out to be correct.

  16. engetudouiti

    Ah OK I just worry about if I must need to choose option when import. so I suppose I can convert as I need.

    I suppose it is already OK to make manuall pose quick and render. yes I have seen some strange things, when I try to hard posing. (or too quick),

    when I first test, new IK rig not perfeclty return zero pose default shape, but maybe it had been solved with recent commits.

    If I can not find problem, (at least reset shape perfectly), I may prefer IK FK compatible rig from start. even thouhg IK posing, not perfect. (Fit FK to IK, or IK to FK conversion maychange pose slightly etc)

    Important thing is when return FK, it show bone arrangement and shape as same as default rig pefectly.

    If it changed somehow, I worry., it may difficult to add new shape keys etc.. with use original import files. (add new items later etc)

  17. engetudouiti

    I expect,, we will get pose preset system,,(import export pose file from blender,without use pose library, without use DS) for daz importer rigs.

    I already made simple pose preset function, for rigi-fy and default rig, but can not make ti cool as same as your dsf import option menus. and I hope to generate screen shot of pose, when export pose preset so I can easy find best pose, which I exported.…

    Though I do not know Thomas next plan ^^

  18. Thomas Larsson repo owner

    Yes, I guess this will be as good, or bad, as it gets. In version 1.5.1 simple ik is not an import option, but rather a new button in the Corrections section, so you only get it by mistake.

  19. Log in to comment