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. pizzaboy13

    pizzaboy13

    Joined:
    Mar 6, 2019
    Posts:
    5
    How do I interact with the an interaction object with the same hand, same position and facing the same direction but in a different way (i.e. different curves and interaction target position)?

    Maybe replace the interaction component of the object and the interaction target at runtime?
     
    Last edited: Jan 18, 2020
  2. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    40
    Hello, I am afraid I need advice number two :)

    I have a skeleton model with FBBIK component. But it somehow drastically bends it's knees so model floats in the air (screenshot).
    FBBIK has default settings (no affectors). I only rotated knees backward and forward to get blue points instead of yellow cubes. But this behavior occurs even without this step.

    All bones seems to be mapped right inside FBBIK, however there are two Patella bones parented to Thigh bones, same as Calf bones. But they are not used in Avatar mapping and FBBIK, so they should be irrelevant I guess. I tried to disable them too.

    It's this model from asset store, but that's probably irrelevant too :)
    https://assetstore.unity.com/packages/3d/characters/humanoids/skeleton-warrior-119849#reviews
     

    Attached Files:

  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    I'll take a look if you could send me that character fbx with the animation clip and Baker as unitypackage. Or just the character fbx.

    Hey,
    Did you mean you needed to go directly from interaction A to B with the same hand?
    That is best done keeping the hand paused at the middle of interaction A, when it is locked to the object, then use Animation window to create and animation for the A object to move it to B or use scripted tweening (probably easier).

    Hey,
    Creepy dude... Based on that information difficult to guess. Maybe you have GrounderFBBIK active on that skeleton and it raycasts against the colliders on the bones or character capsule? If that's not it, would you mind sending me that fbx?

    Cheers,
    Pärtel
     
  4. giantdoor

    giantdoor

    Joined:
    Sep 11, 2018
    Posts:
    38
    Cool, Thanks!
    One last question, is there any way to have CCDIK or FABRIK follow the rotation of the target, same whay as it happens for biped arms?

    Also, for some reason I really can't understand how the limits are visualized (both 3d and hinges), as the transform doesn't seem to follow them in a consistent way :S

    And, most of all, i can't seem to be able to avoid flipping
     
    Last edited: Jan 22, 2020
  5. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    40
    Solved. Stupid mistake on my side.
    I use GrounderIK for every characters, except DAZ humans who use grounderFBBIK. But this skeleton fbx has inverted knees, so GrounderIK bends bones in wrong direction. To fix that I've decided to make an exception and use grounderFBBIK + FullBodyBipedIK, where I fixed knee bones.
    But when character is instantiated during game, my script finds FullBodyBipedIK component and think it's DAZ character, calling this line:
    ik.solver.SetLimbOrientations(BipedLimbOrientations.UMA);

    Now it's ok. Thanks for your reply. I realized it when preparing fbx for you :)
     
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,453
    How to pose an full body IK when the editor is not in play mode?
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    Neither CCDIK or FABRIK can solve for target rotation, just not supported by the algorithms. Solvers that can, are too slow for game development so I haven't bothered adding them in. If this is a robotic arm, you should check out the Featherstone algorithm they added to Unity 2020.1a if you can use that.
    I have also made an alternative solution to solve robotic arms with PhysX, please check out this package.

    The flipping happens because there may be radically different solutions to slightly different target positions if you always start from the same pose. Disabling "Fix Transforms" may help with that as the solver will start from the last solved position unless there is animation playing on the rig.

    Hey,
    You'll have to add the EditorIK component, that will run the IK component you assign to it in editor mode.

    Cheers,
    Pärtel
     
    laurentlavigne likes this.
  8. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    240
    I have a reload animation for a pistol working using FIK's interaction system, where the left hand takes the magazine out of the gun and follows the animation, it works great. The only problem is though, the character's arm passes through his body as he grabs the magazine. I've tried using a Reach weight curve for the parts where the arm passes through but it seems to move the whole of the upper body. How can I prevent this please? I just need to move his left shoulder forward a little bit.
     
  9. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    45
    Hey @Partel-Lang
    I have a doubt; we have a quadruped with the grounder and everything fine.
    Now im trying to make a "Spine System", i want to achieve just like the examples on Spine Animator (The asset in the store)
    FinalIK have this functionality? I think can be achiueved with FinalIK, have you some example?

    Thanks!
     
  10. kkarthikm35

    kkarthikm35

    Joined:
    Jun 29, 2018
    Posts:
    2
    Hi,

    I am wondering if FinalIK allows you to set a position constraint for one of the bones before calculating the IK. For example, in a 6DOF robot arm, can you set the hand to always have a specific pose (position, orientation) and calculate a solution that satisfies that pose constraint? Thanks!
     
  11. jaytwist28

    jaytwist28

    Joined:
    Jul 18, 2017
    Posts:
    49
    Can this asset be used for parkour type movements? Like wall running or even climbing elements?
     
  12. spelafort

    spelafort

    Joined:
    May 8, 2017
    Posts:
    26
    hi partel, I'm having a difficult time preventing the model clipping into itself (both final IK and puppetmaster involved). The two obvious things to do are to change the 'normal mode' of collision/recover of the puppet to active or kinematic, and to make sure self collisions are set 'on' in puppetmaster. However, setting the mode active seems to cause very weird errors (people's arms becoming like twitchy jelly etc.) and kinematic doesn't seem to solve the problem (or to do anything, really).

    I'm wondering if you have any tips for enforcing model self collision?
     
  13. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    30
    I believe so, specially the collision or if the character falls, the ragdoll is pretty good, and it already has it's own getting up animation. Super easy to setup.

    Also, you can setup where to grab/hand position easily.

    I honestly thought that 90 bucks for this asset was a lot before I bought it, but it's actually cheap! This asset is great =)
     
    Partel-Lang likes this.
  14. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    240
    I thought I'd solved this by using the effector offset to bring the gun forward - but the left hand instead goes to the position where the gun would normally be in the animation - it doesn't follow the interaction object that is being moved by the offset.
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    Could try adding a Position Offset X/Y/Z curve to the InteractionObject to move the hand around the body. XYZ are in the rotation space of the character root transform.

    Hey,
    I made a little example for you about how something like this could be done with FABRIK. Spine Animator probably offers way more options and stuff, this is just a 10 minute hack.

    Hey,
    There's no solver included in FIK that can solve for both target position and rotation of a 6DOF robot arm. FABRIK and CCD algorithms included can only solve for the target position.

    You should look into the Featherstone algorithm recently added to Unity 2020.1a15 if you can update to that of course.

    Hey,
    There is no tool included that does parkour and climbing out of the box, that has to be custom scripted. FIK has a full body solver that takes care of moving the hands and feet to where you need to place them, but calculating where you need to place them is up to you.

    Hey,
    When you enable Internal Collisions in PuppetMaster and see it twitching as a result, that is because the collision depenetration forces fight with the pinning forces that try to get the hand inside the collider. If it's a VRIK + PuppetMaster setup, you might try reducing pin weights for the body parts that the hand usually collides with, probably pelvis, spine or chest, to allow them to be pushed by the hands. You can do that if you expand the "Muscles" array on the bottom of PuppetMaster and reduce "Pin Weight" under "Props" of a muscle you wish to loosen.

    Cheers,
    Pärtel
     
    kkarthikm35 and Deckard_89 like this.
  16. Safemilk

    Safemilk

    Joined:
    Dec 14, 2013
    Posts:
    18
    Hey just a heads up! Seeing these errors on a lot of classes in Final IK after upgrading the project to 2019.3.0f6! Seems like they changed some stuff in the Animator class! upload_2020-1-29_8-57-5.png
     
  17. Safemilk

    Safemilk

    Joined:
    Dec 14, 2013
    Posts:
    18
    Found out what it is!

    upload_2020-1-29_9-2-29.png
     
  18. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    100
    Hi guys, We are looking to hire a Unity developer with FinalIK and PuppetMaster experience and Pärtel recommended that I'll post it in this thread.
    The ideal candidate will have a ton of experience with FBBIK, VRIK (Quest,Rift,Vive) and PuppetMaster as well as Unity RigidBodies, Soft Bodies and other physics related tasks.
    This is a paid job that can be done remotely (the team is based in LA). Please don't respond in this forum (we don't want to clutter it up) . Just email me directly at eyalfx@gmail.com .
    Thank you.
     
    Partel-Lang likes this.
  19. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    53
    VRIK controlled character with offset

    Love Final IK and particular VRIK. My custom character is working great with VRIK, however, I can't figure out how I can move the character out of its default zero position/rotation.

    I would like the viewer NOT to embody the character as an avatar, but look at it as in a mirror.

    A simple parent GameObject for teh character with an offset and 180 degree y rotation does not work.

    Thanks.
     
  20. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    30
    Maybe you could setup the VRIK normally, then setup a camera in front of the character, set the Target Eye camera to Both, and the camera attached to the character's head, you disable it. That could work
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    You must be running FIK v 1.8. Please update to 1.9 or just delete the scripts that produce the errors (they are the AnimationJob versions of AimIK and LimbIK, that are pretty useless because the normal AimIK, LimbIK solvers have better performance).

    Hey,
    Please check out this package, has a VRIK character in a mirror.

    Cheers,
    Pärtel
     
  22. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    89
    Hey @Partel-Lang, I recently moved to a new char and I can't figure out why Final IK is acting weirdly with it.
    Animations is working fine and all, but when I use bipedIK shoulder rotation is completely wrong.
    Here is the issue:



    Strangely if I use VRIK it work perfectly fine:


    I would like to use BipedIK for performance reason (no need to solve the full body) and to be able to use look IK, but I can't figure out how I could configure it correctly. I tried every options allowed on the component without success. VRIK got an option to set bone orientation but this doesn't exist on BipedIK.
    BipedIK worked great on previous characters so it's maybe a rig issue, however I'm not sure what BipedIK is expecting for bone rotation. Some of my previous characters got different bone orientation and was still working fine.
    Any help will be much appreciated!

    Edit: The only difference I found on the new rig is arm bones rotation are all oriented the same, while on previous characters shoulder, upper arm and forearm use same orientation except hands being rotated 90° along X axis.
     
    Last edited: Feb 3, 2020
  23. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    53
    Thanks so much, great.

     
  24. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    53
    Save a character pose (VRIK)
    I'm having fun pupeteering characters in VR with VRIK.

    Here is my question, I would like to be able to save or freeze a character's pose.
    Not sure what the best approach is. Would I need to look through all the joints at a particular moment and store their transforms? Do I need to worry about rotations of the joints (I'm hopeless with eulers and quatrtonians,...)?
    Thx, Volker
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    The problem is that BipedIK samples the pose at Start to find out which way to bend the limbs. That character must have it's arms completely extended or slightly inverted so it can't get it right. Please rotate the elbows in Editor so the arms would be bent in their natural bending direction just a little bit.

    Hey,
    If you just disabled VRIK and Animator and set puppetMaster.mappingWeight to 0, that would freeze it I guess.

    Cheers,
    Pärtel
     
  26. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    546
    Hi

    Is there a way to make the arm IK determine the position of a whole biped? I'm trying to make a biped hang from his arms so I set the ik target of the hands to the point where he would hang and if he moves I move the pelvis IK target to a point close to the middle between both arms ( but a bit lower ofc). This works ok but it doesn't look completely natural, if the pelvis target is too low the arms look like they are floating insteaf of grabbing firmly.
     
    Last edited: Feb 11, 2020
  27. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    700
    I am finding often the legs will spin when teleporting my VRIK body around a scene, it's intermittent when it will/won't spin though.
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    What you could do is run this little bit of code after BipedIK solves:

    Code (CSharp):
    1. public Transform pelvis, handTarget, hand;
    2.  
    3. void LateUpdate() {
    4. pelvis.position += handTarget.position - hand.position;
    5. }
    And add that script to a higher value than BipedIK has in the Script Execution Order.

    Hey,
    Please try enabling Fix Transforms if you have that disabled.

    Best,
    Pärtel
     
  29. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    700
    Fix transforms was already ticked, it is likely a circular dependancy issue where the Armature or parent of it is parented to a 'VR Rig parent' and set to follow the VR Head/Hands which are on a different child of the VR Rig Parent.

    I am trying to fix this by having the Armature rotate to match the head facing direction always but this is probably overkill!

    Amending Spine 'max root angle' from the default 20~ to 170 seemed to help but I get the occasional crazy spins on teleport still.

    I would like to share my setup in a small repro project to see if I'm doing anything wrong if that's possible, I understand if your time is limited though of course!
     
  30. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    933
    Hi Partel,

    Could I ask a question for PuppetMaster here? I am really considering to buy but am weary of the price tag and what it can do, I want to have the physics on each NPC/player where they fall over on touch or knock, in my scene there could be e.g. 400 of these, sometimes colliding etc (it's a kind of dance floor scenario) , will puppetmaster have a good performance for that?
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    Yes, please send me a repro if you can, probably the quickest solution.

    Hey,
    400 active puppets is waaay too much. Generally the "rule of thumb" is 1 PM pm costs about 2x normal ragdoll in terms of performance and I doubt you would be able to run even 100 normal ragdolls at the same time. It is possible with PuppetMaster to disable the puppets that are not close to any other puppets, but I still doubt it.

    Cheers,
    Pärtel
     
  32. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    30
    Hi Partel,

    I have read here a while ago that there is no way to stop the arms clipping through the body while using VRIK, however, is there any changes now?

    Many thanks,
    Gabriel.
     
  33. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    933
    Hi Pärtel,
    Many thanks for your info, I can imagine it could impact performance, if I have 100 ragdolls but those are only turned on if close (or touching)... that may work, e.g. via some distance calculation per puppet, do I understand correct that is built into the puppetmaster scripts? Is it possible to explain that a bit more before I buy, e.g. via a screenshot perhaps of the option. I would like to understand how that might work.
     
  34. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    374
    Hello Why Grounder is also coliding with trigger and step foot on it? Could you fix that? It woudl be great to have an option that force to ignore triggers, cause I need in my project option Queries hit trigger to ON, so I have to turn off it manually in grounder
     
    Last edited: Feb 19, 2020
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,001
    Hey,
    Don't have anything new to share about this at the moment, sorry. Please try to move the elbows away from the body with Bend Goals or Swivel Offset in VRIK arm settings.

    Hey,

    Basically all you have to to is call puppetMaster.mode = PuppetMaster.Mode.Active to activate and PuppetMaster.Mode.Disabled to disable. You could add trigger colliders to the puppets and use those to activate if another puppet comes close.

    Anyway, I have no problem refunding your purchase if you can't get sufficient performance out of it. Just please do the performance test before putting too much work into other stuff.

    Hey,
    Please grab this hotfix.

    Cheers,
    Pärtel
     
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    374
    Thanks I have a problem with ground as you coud see here sometimes on my colider foot is in ok position smetimes no
    upload_2020-2-21_17-28-35.png
    When character walks on it there is a strange distance beetween foot and colider that dissapear after few frames I dont understand why, I dont have any offset as you see on earlier screen, I turn on here all colliders debug mode so you could see that there is nothing to standing on.

    upload_2020-2-21_17-32-5.png
     

    Attached Files:

  37. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    228
    Hey guys i am getting a bunch of errors when trying to use Final IK with unity 2019.3.0 is there an update on the way? :)
     
  38. vorokoi

    vorokoi

    Joined:
    Oct 18, 2019
    Posts:
    11
    No issues here.

    It might be useful if you provided some information on the errors so the potential cause could be narrowed down..
     
  39. torano

    torano

    Joined:
    Apr 7, 2017
    Posts:
    42
    Hi Partel.

    Is it possible to reproduce a spedific pose of a character using FinalIK? What I want is Not let FinalIK make a pose, but let FianlIK reproduce an already created pose.

    For example, I have a model and the initial pose is as below.
    initialPose.png
    And I dynamically setup FBBIK on play, creating ik targets using Animator.GetBoneTransform().
    After setup, the character is like this.
    AfterSetupFBBIK.png

    The pose is slightly different form the original one. But I want to reproduce it with FBBIK.

    Another example is making a pose using VRIK with VR HMD, and instantiate the character and reproduce the pose using FBBIK.

    The reason why I want to FinalIK to reproduce a pose is that I want to move a character like a puppet. Instantiate a puppet with a specific pose first, then move limbs using IK.

    Can FinalIK do that?

    Thanks.
     
    Last edited: Feb 24, 2020 at 6:29 AM
  40. ColtonK_VitruviusVR

    ColtonK_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    155
    Hey @Partel-Lang
    I am attempting to add GrounderIK and LimbIK x2 to my VRIK & PuppetMaster setup. I have looked over your sample of VRIK and GrounderIK but when I add PM to the mix it gets messed up. Here are some images, the first is without GroundIK and the second is with everything. I have a feeling it has something to do with the update order of all components but I'm not sure how to fix it.
    Thanks,
    Colton
     

    Attached Files:

unityunity