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. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hey, just replied to your PM.

    Can you PM me some screenshots of this behaviour and what the InteractionObject looks like in the Inspector?

    Cheers,
    Pärtel
     
  2. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi!

    Just animate the right hand target. Attach an Animator component to the target hand (the gameobject that has the InteractionTarget component),open the Animation Window, create a new animation clip and start animating the hand target from sitting pose to holding the glass pose. Then you can use Mecanim to play that animation.

    Pärtel
     
  3. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hey Partel, thanks for the help! (both here and via PM).

    Here are the screenshots. For context, imagine that the white object is a hammer, that is to be held by it's handle (white cylinder). First, before the interaction:



    On the right you have the interaction settings. They work perfectly if I use this setup on the crash-test dummy on your demos.

    Then after the interaction:


    The "hammer" is upsidedown and a bit misplaced given the effector's position (could be caused by the rotation).

    How can I fix this?
     
  4. HiThatGirl

    HiThatGirl

    Joined:
    Nov 12, 2014
    Posts:
    19
    Hand2.gif

    Code (CSharp):
    1.  
    2. void OnGUI() {
    3.         if(GUILayout.Button("Sit")){
    4.             int index = interSystem.GetClosestTriggerIndex();
    5.             if (index != -1) {
    6.                 if(interSystem.TriggerEffectorsReady(index)){
    7.                     interSystem.TriggerInteraction(index,false);
    8.                 }
    9.             }
    10.         }
    11.         //if (GUILayout.Button("hand")) {
    12.         //    interSystem.StopInteraction(FullBodyBipedEffector.RightHand);
    13.         //}
    14.         if (GUILayout.Button("hand")) {
    15.             interSystem.StartInteraction(FullBodyBipedEffector.RightHand,hand,true);
    16.         }
    17.     }
    I want to make hand position from sit down hand position to target hand position,but it from origin hand position to target hand position, then to target hand position, how to solve?
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi! I noticed you are using both multipliers and curves for "RotationWeight" and "PoserWeight".
    At 0.5 time, when the object is picked up, is the tool correctly positioned relative to the hand? Does it just suddenly jump to this wrong rotation?

    If you could send me some kind of a package so I could take a closer look, it would probably be the quickest solution.

    Is it not possible to just animate the sitting down hand target between those positions as I said before?

    Best Regards,
    Pärtel
     
    lazygunn likes this.
  6. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hi Partel. Thanks for all the help so far! You are being just great to bear with all this questioning!

    Regarding the package, well, this is a test scene, so I have all sorts of weird things going on on the scripts. But I can try to focus this on the interaction system and send it over if you think its best.

    In any case, I've set the interaction to pause at 0.5, here is what happens:



    It seems that the hand is twisted way before grabbing the hammer, so the error is on my setting of the interaction object?
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hey, no problem, it's my job :)

    Do you have an InteractionTarget parented to that tool? If not, then the system is just rotating the hand bone to match the InteractionObject's rotation, which is probably wrong. You might want to duplicate that character, pose it's hand to the tool, reparent the duplicate hand to the InteractionObject and attach the InteractionTarget component to it. Set it's effector type to LeftHand and the InteractionSystem will automatically use it as the left hand's interaction target.

    Cheers,
    Pärtel
     
  8. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hey Partel,

    I have the hand posed on the tool's handle, with an interaction target set. The hand joints are parented to a pivot object, that in turn is parented to a "main" container (PickUpTarget), that has the interaction Object component.

    Below I have a image with the hierarchy:

     
  9. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Hi,

    just tested Unity 5.2 with Final IK and is showing two erros that want to report:

    Assets/RootMotion/Shared Demo Assets/Scripts/Character Controllers/CharacterBase.cs(42,46): error CS0619: `UnityEngine.PhysicMaterial.dynamicFriction2' is obsolete: `Anisotropic friction is no longer supported since Unity 5.0.'

    and

    Assets/RootMotion/Shared Demo Assets/Scripts/Character Controllers/CharacterBase.cs(44,46): error CS0619: `UnityEngine.PhysicMaterial.staticFriction2' is obsolete: `Anisotropic friction is no longer supported since Unity 5.0.'

    Thanks
     
  10. NikProductions

    NikProductions

    Joined:
    Oct 29, 2014
    Posts:
    95
    Hello, I am sadly experiencing problems with Final IK 1.0 and I'm not sure why.

    I'm using Unity 5.2.0f2! 59aa11e99709476e7fe7d177a466c33c.png
     
  11. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    So does the new 5.2 affect the ability to record animations?
     
  12. HiThatGirl

    HiThatGirl

    Joined:
    Nov 12, 2014
    Posts:
    19
    Sorry,I still do not understand。
    Can you give me an Example ?
    Thank you..
     
  13. HiThatGirl

    HiThatGirl

    Joined:
    Nov 12, 2014
    Posts:
    19
    20150909160115.jpg

    For example, sit down to let him continue picking
     
  14. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    I noticed you have Swing Weight set to 0.5 on the InteractionTarget. That would swing it around the pivot not only around the swing axis. Set Swing Weight to 0 and see how it is then.

    Hi!
    Just comment out the lines producing that error. FinalIK 1.0 is not fully compatible with 5.2 that was just released. Besides that small error, RagdollUtility also does not work because of a Mecanim bug (many of new Mecanim bugs in 5.2, I have already made 3 bug reports, they are also stalling the release of PuppetMaster). Anyway, I have already submitted Final IK 1.1 to the Asset Store, it works with both 5.1 and 5.2 and pending approval.

    Hi! No, not to my knowledge.

    That answer you quoted was for another user (RFLG). Anyway, It is not possible at this time to smoothly start another interaction while already in the middle of an interaction, but the hand target can be animated instead. I'll make you some kind of an example, hold on...
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hey,
    Please import this package.
    Play the scene, click on the "Sit Down" GUI button, then press "H" to move the hand to the cylinder and "D" to move it back.
    I made a little script - TargetInterpolator.cs. It is attached to the sitting down right hand target. It just interpolates it between it's default pose and the hand target that is parented to the cylinder. That way you can move the cylinder and the hand will move along. An alternative would be simply to animate the sitting down hand target using the Animation Window. Depends on what you need to do.

    Cheers,
    Pärtel
     
  16. NikProductions

    NikProductions

    Joined:
    Oct 29, 2014
    Posts:
    95
    How long will it take for the pending request to be accepted? I'm not in a big hurry, but I really want to bring my characters to life :p.
     
  17. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Around 5 days, give or take. Note that you can still use 1.0 with Unity 5.2, just comment out 2 lines of code in CharacterBase.cs and avoid RagdollUtility for a while. :)
     
  18. NikProductions

    NikProductions

    Joined:
    Oct 29, 2014
    Posts:
    95
  19. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hi Partel,

    Swing Weight=0 has the same result, the hand still gets twisted :(
     
  20. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm really loving the possibilities this plugin offers and am close to making a purchase. I am currently learning how to use Opsive's Third Person Controller seen here, and am hoping that Final IK will work well with it. The author of Opsive says that it should be a simple matter of removing his IK component and replacing with Final IK, but I was hoping that someone here might have already tried it and can report on whether it was successful and any challenges issues that were encountered. So, has anyone here got the two working together?

    EDIT: I'm mainly interested in the Grounder component integration at this time.
     
    Last edited: Sep 9, 2015
  21. duckface

    duckface

    Joined:
    Sep 9, 2015
    Posts:
    2
    Hey!

    I really want to buy this asset but the lack of tutorials are kinda scaring me. Most of the videos are 3Ds or proof of concepts, not many tutorials on 2D.

    What I'm really interested in is a 2D grounder tutorial with LimbIK (with a stickman, or any other simple character).

    If you had time to do one I would be really happy and insta buy the asset! :)
     
  22. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Thanks Partel for clarifying about Unity 5.2 issues.

    About the next part of the new video in the Interaction Series, I'm interested in know if you have some ETA in mind to release it.

    I'm now planning to make a new Interaction: Pushing a cube. So the character should pose with the two hands in front of the cube and as I interact with the cube should drag the cube as he moves. I think this is another kind of interaction not covered. Could you share some master tricks so I could plan it in the right way?

    Thanks!
     
  23. HiThatGirl

    HiThatGirl

    Joined:
    Nov 12, 2014
    Posts:
    19
    Thank you for your example, I am really very grateful, buy this plug-in is my honour !
     
    Partel-Lang likes this.
  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    That is one persistent problem :). Can you send me a package? I'm running out of ideas based on the information I have.

    Hi!

    I have not tried Opsive's controller myself, but I can't think of a reason why the Grounder would not work with it.

    Hi, I made myself a stick figure to run some 2D grounding tests..
    Currently the Grounder only works with 3D colliders. I wrote it down to make it work with 2D colliders for the next release (1.2), but it will take some time. It is best to use not LimbIK, but TrigonometricIK, which is basically the same, but simpler. It allows you to define the bend plane axis for the legs.
    The setup basically looks like this:

    1. Create an empty child game object to the root of your character, name it "Grounder", add the GrounderIK component.
    2. Create 2 more child game objects to the grounder, add TrigonometricIK components to them. Assign leg bones to Bone1, 2 and 3. Set "Bend Normal" to positive or negative Z axis, depends on which way the character is facing.
    3. Assign the IK components to Grounder "Legs", assign the pelvis bone as the "Pelvis" and the character's root Transform as the "Character Root".
    4. Set Grounder solver Layers to the layers you want to walk on.

    Btw, there are 13 video tutorials in this playlist. I will be making more as I go, but of course there is an infinity of tutorials that could be made about Final IK..

    Hi!
    I was planning to make the next one tomorrow. Thing is, where I usually work, I can't record audio, other people around me. :)
    About pushing, if you need to get started, just can create an InteractionObject in front of the character. Add both hand targets to it as InteractionTargets. Pose them so that the character appears pushing when the interaction is paused at mid-time. Parent the InteractionObject to the root of the character, so when you start the interaction, it will go to pushing pose and pause. If you resume the interaction, it will reset back to normal.
    That would work if all your walls are flat and at a nominal distance from the character when pushing.
    For a more robust solution, you could also raycast from the chest of the character towards the hand targets to find the exact position of the wall at that direction and dynamically lerp the hand target towards that point.
    Did you get the idea more or less?
     
  25. duckface

    duckface

    Joined:
    Sep 9, 2015
    Posts:
    2
    Hey!

    I agree on the tutorials, you can go forever, still it would be nice to see something about 2D. :)

    Could you give me an approx. ETA for 1.2? Should I be waiting for that or this TrigonometricIK method will work just as fine until 1.2 released?
     
  26. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    The TrigonometricIK method will work but only when walking on 3D colliders. I don't have an ETA on 1.2, just waiting for 1.1 to be accepted to the Store.
     
  27. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    229
    Not sure what this means, but I asked before if you could essentially use this tool in order to create baked animations which could be used later. I'm happy with the other functionality, but would love that. It looks like they exposed some new stuff in the 5.2 update so I was wondering if that might allow for baking.
     
  28. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Thanks Partel, for sharing about next video ETA.
    Regarding steps to make "push" interaction I see what to propose. I'll try it by myself and see if I can make it on my own with this instructions

    Thanks!
     
  29. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hi Partel!

    Yeah, I'm on the end of my wits with this! However, I've made a small breakthrough, that in turn produced a workaround for this rotation issue of mine:

    -I remembered one of your Interaction System videos, where you pause the interaction, go to the interaction target and do some adjustments/finetuning. I did the same, but instead I rotated the IT until the character's hand was in the desired position, then copied the coordinate/rotation values from play mode and made them permanent.

    This actually "fixed" the issue! Now all the interactions are working perfectly, I just replicated the procedure and it was done.

    However I realise that although this is a quick fix, it might bring trouble on more elaborate interactions/operations, so I'm set out to understand the causes! So far I'm betting on bone rotations, due to:

    -Before doing my "repositioning", I removed all the ITs from their parents, set position+rotation to 0, reparented and placed it on mark (without rotating). This immediately improved the end-result, but there was still a lot of twisting going on in the wrists. After some fixing, this is how the IT for the "tool" object looks like now:





    This positioning provides the perfect "grabbing" result. The pick-up rotation issue also got solved.

    -So, to me it looks like I did some serious offsetting to the hand-bone rotations, thus compensating something. The only thing that could cause this are weird bone rotations, that translate into something way more serious when used by the interaction system.

    What do you think Partel? Also, I only tested this "procedure" on basic interactions (pause and pick-up), it seems to be working well, however I am unaware of deeper implications (or complications). Could this offsetting of mine complicate other IK processes? I'm thinking about the Aim IK for instance (it's the next one I'm implementing :) )

    Thanks for all the help!
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi,
    Is the hand target the exact duplicate of the same character's hand bone?
    Other than that I really can't tell unless you can package that scene for inspection.

    Pärtel
     
  31. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Yes it is, I've followed your tutorials on how to do that properly. I'm guessing that it might be some freak rotation issue on the bones that makes the Interaction System go haywire.

    However, I'm doing some code housekeeping this week and I'll send you a scene on a package ;)
     
    Partel-Lang likes this.
  32. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi all,

    Version 1.1 is now ready for download.
    Please upgrade, especially when using Unity 5.2.

    As always, delete the old version entirely (while in an empty scene) before reimporting and backup your project.
    See the release notes in the Store for a list of changes, fixes and improvements.

    Best Regards,
    Pärtel
     
  33. CampioneDev

    CampioneDev

    Joined:
    Feb 9, 2015
    Posts:
    4
    Hi Partel,
    Just a quick question: do you think this asset called ragNimator (currently on sale) could easily work with FinalIK or it could be hard/hacky to adapt them to each other? I'm interested in that sort of functionality so, generally speaking, do you plan to add some ragdoll-specific functionality in the (not so far) future? I've already watched this video of yours on YouTube so I'm aware there is a lot that can be done with FinalIK and ragdolls without any other 3rd party asset.
    Thanks a lot... BTW FinalIK is awesome ;)
    Paolo
     
  34. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Unable to make a build with the latest FinalIK update due to incorrect Editor folder locations.

    Here are some examples of the exceptions:
    Temporary workaround: move the RootMotion directory out of the Plugins directory and back to the root Assets directory.
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi and thanks!
    Sorry I have not tried using Final IK together with that plugin, no idea.

    Hi!

    I'm guessing you didn't delete the old version of Final IK before you updated?
    Because Final IK 1.1 doesn't have an "Assets/Plugins/RootMotion/FinalIK/Editor/" folder.
    All editor scripts in 1.1 are under Assets/Plugins/Editor/RootMotion.

    Please delete and reimport.

    Best Regards,
    Pärtel
     
  36. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    I did delete the old version, but apparently, the version the Unity Asset downloaded for me wasn't 1.1, even though it was showing it had an Update; it was still some version from 1.0.
     
  37. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Hi,

    As an early adopter of Final Ik, I bought this product for a project being on a planet. A sphere. Given the variable orientation of the axis of gravity (Y), Final IK do not work as expected. (I can send you a test project to confirm). I would like to obtain a refund of this tool not functional for the intended use.

    Thanks
     
  38. SVTiare-Tom

    SVTiare-Tom

    Joined:
    Sep 27, 2013
    Posts:
    9
    Hi Partel,

    Just wanted to pop in and ask how to change the Recoil for FBBIK so it becomes additive.
    Currently every time Recoil.Fire() is called, it resets itself to its original position then applies the recoil. This makes machine-gun fire look jerky.

    How does Final IK not work??
    I assume you got it for the Grounder (foot placement). If you did, make sure you check out his wall-run demo (Grounder working on a vertical wall)!!
     
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi! I do not understand, what exactly doesn't work as expected? Yes, please send me a test project and I have no problem refunding the purchase if we can't get it to work. If it's the Grounder, you must check "Rotate Solver" for it to work around a sphere. It is just an optimization, it is much cheaper to do calculations with Vector3.up instead of arbitrary vectors so it is disabled by default. Here's a video of FBBIK and Grounder working around a big rock.

    Hi!
    Good point, I have edited the script to support additive machine gun fire. Please import this package.
    There are 3 new things. When you expand one of the elements in the "Offsets", you'll find"Additivity" and "Max Additive Offset". The former defines how much of the current recoil will be added to the next one, the latter defines max additive recoil magnitude. Then there is "Blend Time", it can be used to smooth out the next kick a bit.

    Cheers,
    Pärtel
     
    SVTiare-Tom and John-G like this.
  40. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    http://forum.unity3d.com/threads/planetary-terrain.214961/page-13#post-2301203
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
  42. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Regularly (when I'm interested in a tool), I ask the same question: 'Does it works around a sphere?' and regularly the answer is 'Yes' or 'Probably'. It is time to pose the problem:
    On the next picture, observe the Unity gravity standard Yaxis (in green). Top left, the character is placed north pole: no trouble . In the others three cases, it is placed in the equivalent of England (same place, differents orientations). Note the various YAxis guidelines.

    That means ALL tools, scripts etc. that take their 'reference' (even ONE time) on this axis not WORK properly. You sould 'tweak'/modify EVERY thing...
    A lot of works. Just ask Patico about it (http://forum.unity3d.com/threads/re...kit-1-10-walk-on-planets-run-on-walls.246841/) .

    Red = Global X, Green = Global Y, Blue = Global Z
    Yellow = Local X, White = Local Y, Black = Local Z

     
    Last edited: Sep 18, 2015
  43. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    eMail send with the test project link. Thanks.
     
  44. OrdinaryDev83

    OrdinaryDev83

    Joined:
    May 8, 2014
    Posts:
    23
    Hello, i'm writing code in javascript using your amazing package, but, i don't know how to "import" final ik API :
    Maybe like this?
    Code (JavaScript):
    1. #pragma strict
    2.  
    3. import RootMotion.FinalIK;
    4.  
    5. var lookAtIk : LookAtIK;
    6.  
    7. function Update () {
    8.  
    9. }
    10.  
    But it warn
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Will this work with Unity 5.0.1? I've just purchased this and am giving it a try. It complained about the VR demo so I just deleted it and everything seemed to be OK. However, when I run the Grounder demo, the character just falls through the terrain into oblivion. Any advice?

    EDIT: Nevermind. I see that the Characters node is on UI layer for some reason. So, I changed it to Player and it's working now.
     
    Last edited: Sep 19, 2015
  46. SVTiare-Tom

    SVTiare-Tom

    Joined:
    Sep 27, 2013
    Posts:
    9
    Holy moly,

    Thanks for package!
    10/10 Customer service right here :D
     
    Partel-Lang likes this.
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi! Make sure to download the latest Final IK (v 1.1) from the Store, the code you pasted works fine with it. The previous versions required moving some scripts in order to be used with javascript.

    Yes, if you import Final IK to an existing game project, some demo scenes might not work just because your layer and physics settings that are probably different. The demos are best reviewed when imported to a new empty project. When importing Final IK to a full game project, I suggest you leave out the entire "_DEMOS" folder just for the sake of not flooding your project with unused assets.

    Cheers,
    Pärtel
     
  48. NikProductions

    NikProductions

    Joined:
    Oct 29, 2014
    Posts:
    95
  49. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Hi, newbe question.

    I have a figure hanging from their wrists... I've been using FBBIK because it's all automatic, but now I realize this is wrong... the "pelvis" needs to be the shoulders(?) or the spine where they attach.... Should I start messing with the references in FBBIK or should I start over with one of the other IK..., maybe FABRIKroot?

    Are there tutorials for setting FABRIK and FABRIKroot? I'm looking at your website and youtube, I think I am just missing some basics...
     
    Last edited: Sep 21, 2015
  50. carlosrovira

    carlosrovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Hi Partel,

    could you confirm if PlayMaker actions are up to date. I'm trying to use it, but I think something goes wrong, but don't know if it's me or the package maybe out of date

    Thanks