Search Unity

FINAL IK - Full Body IK, Aim, Look At, FABRIK, CCD IK... [1.0 RELEASED]

Discussion in 'Assets and Asset Store' started by Partel-Lang, Jan 15, 2014.

  1. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    150


    Hello! Following the tutorial on how to get Final IK to move joins in the right direction, I've pre-rotated the joints in the prefab so that they end up in the right direction. However I can't seem to "undo" the rotation in play mode, it wants to try and move it into the bendy state rather than the neutral state from the idle animation.



    In the "natural" state (before I've tweaked the bone positions), it will bend in all sorts of awkward ways.

    With no Quadraped Grounder and no FullBodyIK component, the neutral idle animation looks like:



    Is there any way I can set the direction of movement for the joints without having it alter the idle states of the animation? Thank you!




    Edit:

    Have removed full body biped IK from the object as it's obviously not a biped. The grounder is still on the object but still no luck with making it work properly unless I "pre-bend" the legs in the right direction. I've tried the legs with CCD IK for the legs with rotation limits but the legs just remain straight.
     
    Last edited: Aug 15, 2019
  2. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,908
    Hey,
    It must be that CCD is updating before you move the hand to stretch it. Make sure your Animator is not in Animate Physics mode, that would cause your LateUpdate code to be out of sync with the IK. Also make sure your LateUpdate script is not at a higher value than CCDIK in the Script Execution Order. If you are updating the IK manually, you'll need to change it so that LimbIK solves first, then your stretching script and then finger CCD.

    Btw, if you switched LimbIK for ArmIK, that has automatic stretching built in and can also use the shoulder for some extra reaching range. Go to the "VRIK (Basic)" demo and copy the "Stretch Curve" over from the Pilot's arm settings to your ArmIK solver to get a good optimal value for the stretching.

    Hey,
    The Final IK Bridge was not written by me so I'm not exactly sure what it does. Could you check the Profiler please and see what kills it, send me some screenshots if you are not sure. 60 to 5 fps hog should show up there nicely.
    Does it help if you switched Grounder quality to "Fastest"? I don't think that's it though, the difference between the quality settings are just a couple of sphere casts vs a raycast per frame.

    Hey,
    You sure there is animation playing on those legs? That should overwrite the bending and straighten the legs.
    If that's not it, could you please send me that horse and the animation you were using so I could take a look myself? Haven't done much horse testing to be honest.

    Cheers,
    Pärtel
     
  3. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    17
    So in play mode after i have moved the body effects to where i want them, how do i save them?
     
  4. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    185
    Hi, I'm trying to use Final IK with Opsive's TPC to start a sort of "injured" state when taking damage. Currently I'm activating the Amplifier component to effect the Right Foot and and Body of the character, and it kind of works, but looks a little weird when walking (but pretty good when running - like Laura Dern running from the raptors in Jurassic Park). Is there anything else you could recommend for this purpose - just using Final IK without creating new animations to add a "limp" or injury to walk cycle?
     
    Last edited: Aug 18, 2019 at 6:56 PM
  5. Cyrusc

    Cyrusc

    Joined:
    Sep 27, 2014
    Posts:
    12
    Hi Partel, I know you get asked a lot about UMA and I'm sorry to continue the trend.

    When hooking up the VRIK to a UMA default male, there are extra bones in UMA that cause the IK to look messed up on the shoulders/arms in certain poses (see the left arm on the attached image). These bones ([Left/Right]ArmAdjust/[Left/Right]ShoulderAdjust) can be manually adjusted to make it look better in certain poses, the right arm on the attached image is an example of trying to modify the bones to make it look better.

    Is there any way to account for these bones in the IK solving? I tried adding twist relaxers that referenced the extra bones but that didn't work.

    upload_2019-8-18_13-5-37.png
    upload_2019-8-18_13-8-29.png
     
  6. rmon222

    rmon222

    Joined:
    Oct 24, 2018
    Posts:
    17
    Hi Partel, I'm running the VRIK (Hit Reaction) scene. I'm trying to not call Solve() every frame but instead only on raycast hits. The result is the model becomes unpredictable. Does VRIK.UpdateSolver() have to run every frame? Any suggestions on how to Solve() only when needed?
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,908
    Hey,
    Dragging effectors in Scene View was designed just for purpose of testing the solver, since you can't do that in a built game anyway.
    But it is possible, with a couple of extra scripts, please import this package.
    Create a FFBIKEffectorState object (Create/Final IK/FBBIK Effector State), that is a ScriptableObject that will store your effector values. Then add SaveLoadEffectorState.cs to your character, assign the "IK" field and the created FBBIKEffectorState object, then you can right-click on the component header to select "Save Effector State" and "Load Effector State". It currently only saves/loads effector positions, rotations and position/rotation weights. If you need other parameters and can't figure out how to add them to FBBIKEffectorState.cs, please let me know.

    Hey,
    Are you able to get the Amplifier to look good for the walk if you changed some parameters? I mean you could probably have one Amplifier to walk and another to run, then blend their weights based on which animation is playing. Or have 1 Amplifier and just tween the parameters.

    Hey,
    I just updated my UMA integration, added VRIK support, but didn't see any issues like that with the shoulders. Maybe they have been fixed for the next version of VRIK. If you'd like to check it out sooner rather than later, please PM me with your invoice number and I'll send you the latest.

    Hey,
    You can disable the VRIK component in Start and call ik.solver.Update() whenever you need to update it.
    IK needs to run every frame when animation is applied because animation just overwrites everything. If you don't have any animation, you'll also have to call ik.solver.FixTransforms() before ik.solver.Update() to avoid the solver solving additively on top of it's own results.

    Best,
    Pärtel
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,908
    Hey guys, I will be out of town until 30th of August. Sorry about the inconvenience, please leave your questions here and I will attend to them as soon as I get back.
     
    Deckard_89 likes this.
  9. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    76
    Hey,

    thanks Partel, I was ignoring there was an Arm Ik, I tried it and it's working really well for my game !

    Good holidays to you :)
    Jonathan
     
  10. rmon222

    rmon222

    Joined:
    Oct 24, 2018
    Posts:
    17
    Thanks for the response. It worked.
     
  11. WojciechWlodyka

    WojciechWlodyka

    Joined:
    Jun 12, 2019
    Posts:
    4
    Hello,

    Recently I wanted to create pipe of vaccum cleaner with FARBIK to make it look and feel like realistic. I have managed to make it reasonably nice but for final effect it would look better with physics, so there is my question:

    Has anyone tried combine FABRIK and physic? I have when im adding rigibody to one of pipe’s bone everything freaks out as shown on the pictures. Is where any way to add psyhics and keep it reasonably good?




    This is my pipe without rigibody running pure FABRIK.


    This is what happens if i add any rigibody and boxcolliders to the bones.

    Thanks for help in advance.