Inverse Kinematics - Control Rig

TirickTirick Posts: 225
edited June 2021 in Unreal Discussion

Has anyone been successful at setting up IK in the Control Rig? The way the bones in the Daz model are set up, as a chain from bend-rotate-bend-rotate, plays merry-hell with any attempts to use IK. I have even tried use IK on the controls at the joint rotation, but there is something fundamental I think I am just missing. I've managed to setup FK on the main joints, and I'll try to map a backwards solve so I can target joint motions through animations, but IK, at least for the legs and arms, seems unattainable.

FK setup:

IK Attempt (many, many failed attempts):

Any suggestions?

Thank you,

Tirick

Post edited by Tirick on

Comments

  • TirickTirick Posts: 225
    edited June 2021

    Well I think I found a solution to it. UE5 will have a native version of this, but there is a BETA version of the Fullbody IK which more or less should allow for nearly full replication of many of the body controls. I can't beleive I didn't find this before now.

    I still have a lot of setup to do and more playing around, but for anyone looking for the solution, this can be found in plugins.

    Tirick.

    IKFix.PNG
    1390 x 944 - 594K
    Post edited by Tirick on
  • Senor_MonkeySenor_Monkey Posts: 124

    I've used Dragon IK with mixed results on Daz characters before. I've had it working perfectly on one character, but not able to replicate on another. I've not tried with Control Rig at all though. However, there is this series of tutorials for UE5 that might hold the solution for you:

    https://www.youtube.com/playlist?list=PLNTm9yU0zou7TevR9IF5MZ7hh-hzj4UnH

  • Sounds like you solved it.  I'll throw this in here in case it helps later.  I haven't tried the Full Body IK node yet.  What I did with the arms was I made Control Nodes for the shoulder, elbow and hand which start aligned to the matching bones.  Then I set up the IK on the Control Nodes and apply the transforms back to the bones.

    image

    image

  • TirickTirick Posts: 225

    I'll play around with that, thank you!

  • TirickTirick Posts: 225
    edited June 2021

    David Vodhanel said:

    Sounds like you solved it.  I'll throw this in here in case it helps later.  I haven't tried the Full Body IK node yet.  What I did with the arms was I made Control Nodes for the shoulder, elbow and hand which start aligned to the matching bones.  Then I set up the IK on the Control Nodes and apply the transforms back to the bones.

     

    That was very helpful, thank you. I had to tweak the primary pole axis a little differently, but that could be an orientation thing. I struggled a little as I had the hand IK also controlling the hand bone, and that caused some extra bending in the forearm. As soon as I removed that it worked great. I'll add a separate wrist controller with the fingers and hand orientation off of that.

    The full body controller is worth looking into. It started to get a little wonky when I added bone rotation limits. I could also not quite figure out how to incorporate FK elements into the workflow. That could be my own ignorance, or a current limitation in the format. I think UE5 will have a more mature version of it, so I might need to wait for that. Your setup here works great. I can move the hand IK then shift/rotate the shoulder and forearm bend independantly, and still get a good control over the posing.

    Thank you! The mountain got a little smaller. Now I just need to build the rest of the limbs out and make sure they all play nicely.

    Post edited by Tirick on
  • ViallyVially Posts: 343

    The biggest issue that I have ran into attempting to do this is that the G81 characters are rigged with the "twist"  as an actual bone in the hiearchy of the character... So for the legs and arms you get 2 extra bones each. The UE5 Skeleton does have these bones, but they are outside of the Hiearchy.

    G8 Skelaten:

    • LCollar
      • lShoulderBend
        • lShoulderTwist
          • lForearmBend
            • lForearmTwist
              • LHand

    Because of these extra bones, the mesh is going to bend at the end or pivot points of the bone used to map the skeleton... (I.E. the lHand bone actually only goes about 1/2 the distance of the lforearm, where it is a child of the forearm twist bone. Same with upper arm, and legs. (G81 also has an extra "spine" bone or 2, not really an issue, but thought I'd mention.) This is why and where the very strange bending is coming into the animations and/or posing of the G81 character mesh.

    The UE5 skeleten does have the twist bones, they are, haowever outside of the IK hiearchy... so that skeleton will "bend" in the places expected.

    • Clavical_L
      • Upperarm_l
        • lowerarm_l
          • Hand_l
        • lowerarm_Twist_l
      • upperarm_twist_l

    And trying to resolve that exact issue is why I am here. Two solutions that I know would work.

    1. Use the UE5 Skeleton and remap to G81 character
    2. Re-Rig the G81 character, to have the same bone structure/hiearchy

    There are pros and cons to each option. The Ue5 Skeleton is going to be able to import and use animations and poses "on the fly", and there are tons of resources to imort those into the engine.

    If someone knows how to make sure I'm not going to destroy the G81 Character mesh (original) be re-rigging it, I would be willing to delve into modifying the hiearchy. Otherwise I'm just going to work on retargetting the UE5 skeleton.

  • ViallyVially Posts: 343

    Senor_Monkey said:

    I've used Dragon IK with mixed results on Daz characters before. I've had it working perfectly on one character, but not able to replicate on another. I've not tried with Control Rig at all though. However, there is this series of tutorials for UE5 that might hold the solution for you:

    https://www.youtube.com/playlist?list=PLNTm9yU0zou7TeivR9IF5MZ7hh-hzj4UnH

    I took a look at these, yes, very helpfull in setting up the control rig (important information that can be used and learned. I've even bookmarked it for later full review.})

    However, they are 100% based on the UE5/4.26 Base skeleton, so the issue with the extra bones in the G81 character Hiearchy is still a solid issue. These will not resolve the bending in the wrong place.

  • TirickTirick Posts: 225

    I haven't had too much time to play with IK (I got frustrated and move onto other part of the project), but I was having good luck with Power IK. Development on it has stalled a bit (I've heard he's focusing on UE5) but it has all the features of Full body IK but with some great additions. Also can handle multi-limb figures (like dragons, for example).

    https://www.poweranimated.com/

    Tirick

  • EllessarrEllessarr Posts: 1,390

    Tirick said:

    I haven't had too much time to play with IK (I got frustrated and move onto other part of the project), but I was having good luck with Power IK. Development on it has stalled a bit (I've heard he's focusing on UE5) but it has all the features of Full body IK but with some great additions. Also can handle multi-limb figures (like dragons, for example).

    https://www.poweranimated.com/

    Tirick

    power ik was bought by epic games it's now a epic game baseline program you can get it for free aslong you use it only with unreal. 

  • TirickTirick Posts: 225

    Ellessarr said:

    Tirick said:

    I haven't had too much time to play with IK (I got frustrated and move onto other part of the project), but I was having good luck with Power IK. Development on it has stalled a bit (I've heard he's focusing on UE5) but it has all the features of Full body IK but with some great additions. Also can handle multi-limb figures (like dragons, for example).

    https://www.poweranimated.com/

    Tirick

    power ik was bought by epic games it's now a epic game baseline program you can get it for free aslong you use it only with unreal. 

    Yeah, it is a bundled pack now on the store. I had issues with his sample level, it wouldn't work in 4.26. Otherwise his videos are fairly clear. It lead me to an epiphany about how IK works, I just burned out on testing and rebuilding it. I'll get back to it (I need to make a Dragon IK before long) but I'm busy learning how to make terrain textures and foliage volumes. 

  • ViallyVially Posts: 343

    Do they explain how to resolve the etra bones in the IK Chain for G81 Characters?

     

  • ViallyVially Posts: 343

    Skip through the insepid video intro (completely unrelated to the subject)

    Watch the part on Motion warping, for ideas and insperation.

    The pay veery close attention to the guy setting up Full Body IK for his demo. He starts from scratch, and isn't really eplaining much (more mumbling to himself,) but it is probably one of the more straight forward tutorials on initial setup I've found. just be prepared to pause and go back, and pause again.

    And "OH", there is a point where he mentions an optional switch. (it's after he has setup the initial 3 bones controlers and starts to talk about adding in joint limits to correct bending.) the "switch" is at the bottom of the CTRL group, and is named something completely different than what he says, HOWEVER; clicking it will add another bone control to the list and it WILL have the mentioned option checkbo within it. 

    I hope that makes sense. It's used for the knees and whatnot, to get them to bend in the correct direction.

  • TirickTirick Posts: 225

    The extra bones are in G3 through G8 as well (8.1 added some facial bones, but did not alter the base skeletion afaik). Power IK lets you ignore bones, explicitly. It also let you set rotation limits and effects and supports multi-limb (like spiders, for example). UE5 apparently will also introduce that. 

  • ViallyVially Posts: 343

    Yes, the facial "bones" in G8 and G81 get ignored, they are NOT within the skeleton hiearchy of the character.

    The issue has to do with the structure, not that they are extra, as I mentioned the "twist" bones are there in the UE5 skeleton, they are just not a part of the hiearchy for IK.It would be easier to work with if G81 had extra arms or legs, THAT could be firgured into an IK.

    It's when UE5 is expecting, Pelvis> Thigh> Shin> Foot,

    But gets Pelvis> Pelvis Twist> Thigh> Thigh Twist> Shin> Shin Twist> Foot this causes the problem, where the two "shin bones" meet is where it will bend in the IK chain, same for Thigh, same for pelvis.

  • ViallyVially Posts: 343

    So on that note...

    What is involved with re-rigging G81 Characters to correct the split bones?

    Is it something that can be done without destroying the original versions?

  • TirickTirick Posts: 225

    I didn't re-rig at all. I just brought the skeleton as-in into control rig and added the Power IK node. If I get some time I can open that project again and show you the partially working progress. I have not tested it with animations, and I had to disable some of the skeletal import settings. 

  • TirickTirick Posts: 225
    edited July 2021

    So this is super rough as it is in the state I more or less burned out on, but here is roughly how it works.

    Left Hand Power IK control node moves the hand node and is the driver/target for the IK solve. You can pull it out of position but the hand (and the chain) will try to follow it regardless.

    You can specify which bones the IK solver will ignore in the solve. This permits the arm to follow the node and bend only on the bones you want (like the lShoulderBend and lForearmBend).

    I then cycle through and have a dummy control follow the hand bone. There is a Left Hand controller that is parented to the dummy that is used to control rotation of the hand itself. 

    Lastly (and this was the epiphany, really) I rerun the IK solver using a similar hip dummy to the hand as a bridge. The Hip control is added in the second solver (I got to this thorugh watching the PowerIK demo/instruction videos). 

    Its messy, and I largely don't quite understand all of it, but it works. 

    Tirick

     

     

     

    PowerLHControl.PNG
    1737 x 911 - 881K
    PowerIgnoredBones.PNG
    1668 x 858 - 806K
    PowerLHDummyEff.PNG
    1602 x 877 - 867K
    PowerChainIK.PNG
    1767 x 903 - 929K
    Post edited by Tirick on
Sign In or Register to comment.