Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

    dhaupert

    Joined:
    Jan 7, 2016
    Posts:
    13
    Was trying out the RagdollUtilityDemo scene. Works fine with one notable exception- pressing the R key results in two ragdolls that fall to the floor! Is there a fix for this? Want to use in my game but can't have two players suddenly appear ;)
     
  2. gayani

    gayani

    Joined:
    Apr 8, 2015
    Posts:
    4
    Apologies. Here it is again. Any work around this? Thanks

    grounder-error.jpg
     
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,

    Not really, I mean the rope would not be able to collide with anything, it would not have gravity, it is a tool about kinematics.

    You might want to check out this instead, not sure if it will ever be released though.

    Hey, I cant see it in my version of the demo. Can you send me that scene or something so I could take a look?

    Hey,
    Could it be that the foot crosses the surface also in the animation clip?
    Can you send me that godzilla fbx and the animation that is playing when this happens?
    That would be the quickest solution, otherwise it's just guesswork.

    Best,
    Pärtel
     
  4. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi all!

    I've been improving the Head Effector a bit. I added clamp weights for the body and head so it would not just snap to the other side if you rotated the target 180 degrees. There is also an option to set chest direction vector now.
    Import this package to try it out.

    BUT, I have also started working on a brand new component, VRIK, that is an IK solver dedicated 100% to VR.
    More precisely creating 3rd person proxy characters controlled by a headset and 2 hand controllers.
    It doesn't use FBBIK at all so it will also be 2-3 times faster and have some nice special features like using the toes and shoulders in the solving process and stuff like that. I hope to add it to Final-IK not long after GDC. :)

    Cheers,
    Pärtel
     
  5. gayani

    gayani

    Joined:
    Apr 8, 2015
    Posts:
    4
    Unfortunately, I can't do that because it's not an animation. Rather a real time rendering based on position and orientation. Let me try to convert one such instance in to an animation and send it to you. In the mean time, any suggestions?

    Thanks
     
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, maybe play that on a flat surface at (0, 0, 0) and see if the foot goes into the ground like that. Then I'll know if its the Grounder or something before the Grounder.
     
  7. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Hi Partel!

    I have bought FinalIK in adition to PuppetMaster.
    I have a problem. The legs of my AI agent model blends till hips with the irregular mesh terrain when it pass thought. The navmesh is stablished behind that mesh, a plane Unity terrain.
    I have probed with/without FinalIK no luck. With LimbIK and FBBIK and GrounderIK the same situation.
    What I need to adjust?

    Regards
     
  8. McMayhem

    McMayhem

    Joined:
    Aug 24, 2011
    Posts:
    443
    Hello @Partel Lang! I'm a long-time user of your excellent and efficient IK solution, and I just had a few questions since I've just started extending it to fit some unique needs I have.

    A few pages back, you talked to @hippocoder about being able to use the GrounderIK with just two LimbIK's instead of the full FBBIK setup. I have that working perfectly and have the AimIK working as well. My only issues now are creating a recoil and hit reaction handler to work with this setup as well.

    I'm pretty sure it's going to require LimbIKs for the arms, but I'm having trouble deciphering the Recoil.cs and HitReaction.cs files from your demo. Those both use EffectorOffsets which I believe are only available from an FBBIK solver. Is there some simple thing I'm missing here, or am I going to have to create generic equivalents of EffectorOffset for the LimbIK?

    I'm moving to this unique solution because my game just cant handle more than 7 FBBIK guys running around in the scene. Setting iterations to 0 worked great, until they try to start aiming (since that requires the body chain). I came across your solution for hippocoder and tried it for myself and it keeps my milliseconds right where I need them.

    I'm not against creating my own solution for LimbIK OffsetModifiers, but I just wanted to make sure I'm not skipping an easy step that you've already handled in the documentation somewhere.

    Hope at least some of that makes sense!

    BTW: The asset is absolutely gorgeous, thank you so much for taking the time to make it and for providing such rich, intuitive documentation. I wish other asset store users were as thorough as you.
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, sorry I didnt quite understand, is your character passing through the terrain or something? You need to keep the root of the character at terrain level.

    Hey, and thanks!

    Recoil and HitReaction are offset modifiers that work only with FBBIK. That is because they just need the full body calculations. If everything works with 0 iterations until they start aiming, can't you use an AimIK component on top of that for aiming?

    Cheers,
    Pärtel
     
  10. McMayhem

    McMayhem

    Joined:
    Aug 24, 2011
    Posts:
    443
    Sorry, I didn't do a very good job of explaining that. At first, that was the case. At least I thought it was, the truth of the matter was that they were aiming to the left because the AimIK iterations were too low. Setting the FBBIK iterations to 0 doesn't mess with the aiming or the grounder, those things are fine. However, it does make the Recoil and HitReactions not work properly. When iterations were at 0 my characters would only move their limbs when recoiling or reacting to hits. I assumed this was because setting iterations to 0 stops body solving, which would be required to apply offsets to the spine.

    I should note that this is a semi-isometric perspective, so the camera is further away from the action than in an FPS or simple over-the-shoulder shooter. I imagine there is some kind of way I can fake it. My current fallback is to just use animations, but I cant help but lust after those beautiful implementations you included in the demos. Procedural is much better than baked/preset in my opinion.

    I've been able to create sort of an upper-body IK and lower-body IK using a few tricks, so I'm not out of ideas just yet. I just need to create an IK Effector class that will work with simple LimbIK components.

    Hopefully, I'm just missing something, or doing something incorrectly. If that's the case, please point me in the right direction.
     
  11. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Thanks for quick reply. No, the irregular terrain mesh has a collider (It is the terrain mesh of your Grounder scene example added to the floor plane of my scene previously navmesh baked). So legs blend following irregularities of mesh.
    How to make to GrounderIK correct animations in the way of making the toes to put over terrain mesh following animations simulating walking over the mesh?

    If I make mesh static and rebake navmesh, the situation is better, but when terrain is high sloped, the legs blend in an irreal way, like a rubber toy.

    My agent is a puppet master.
    Hope it is clear now.

    Thanks
     
    Last edited: Mar 4, 2016
  12. dhaupert

    dhaupert

    Joined:
    Jan 7, 2016
    Posts:
    13
    I have a character mounted to a bike via effectors holding hands, feet and hips to the bike. When crashing I want to disconnect so I can enable ragdoll and send it launching. I am wondering if there is a way to set the following in code:

    The FBBIK Weight (the global one in the script params (below Root Node, and above Iterations). I would like to be able to set the weights of all effectors to 0 at the same time.

    Can I set an effector to null or disable it? If so, how?

    Lastly, would disabling the FBBIK script accomplish the same thing? If so, can I set .enabled = false or does it still need the Disable() function (that was deprecated)?
     
  13. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi, I've got an animated robot droid and when he walks up steps I'd like to add IK to keep his feet on the steps, can you point me in the right direction please, tutorial or video link please, thanks.

    Screen Shot 2016-03-06 at 12.54.03.jpg

    Do I use Grounder? How do I setup the IK on the legs? Do I use Limb IK?

    OK Think I've nearly got it ..

    Screen Shot 2016-03-06 at 13.37.43.jpg
    Screen Shot 2016-03-06 at 12.54.03.jpg

    But I need the droids body to tilt to match the stairs as his leg is not log enough to reach the step, as in the picture.
     

    Attached Files:

    Last edited: Mar 6, 2016
  14. dhaupert

    dhaupert

    Joined:
    Jan 7, 2016
    Posts:
    13
    I am using RagdollUtility to toggle between FBBIK and Ragdoll and find that after my character is back to his vehicle (a bike) his hips are still mangled to match the same rotation that they were when he settled to the terrain. So to start, he's mounted on a bike. When a collision happens he is unparented from the bike, and ragdoll turned on. He launches and falls spectacularly and after a few seconds I re-parent him to the bike and call the disableRagdoll function. This puts him back on the bike but his hips are always twisted to match that of his fallen prior self! Here's a picture attached.

    Screen Shot 2016-03-06 at 10.13.53 AM.png
    I tried resetting the pelvis as the ragdollutilitydemo script does but that doesn't seem to have any effect. Any ideas why this is happening and what I can do?
     
  15. dhaupert

    dhaupert

    Joined:
    Jan 7, 2016
    Posts:
    13
    Another question- how do you set the Maintain Head Rot in the Body Effector. I tried:

    fbbIKScript.solver.bodyEffector.maintainHeadRotationWeight = headTilt;

    but it doesn't exist- can't find it in any of the C# code other than in grounder and that's not a script I'm using. TIA
     
  16. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    I am working on a companion/pet AI system and I'm using Final IK with your awesome Interaction System using an Interaction Trigger. It's working brilliantly!

    Depending on the interactive behavior occurring between the Player and Pet, I need to be able to change the position and rotation of the Interaction Targets on the Pet. For example, if the player pets the pet on the head vs. petting his belly. Right now I have 2 Interaction Targets (Right Hand and Left Hand). Whichever target is closest to the character, that's the target that is used for the interaction when I fire the trigger. Is there some way I can get a reference to the Interaction Target Transform that is being used through the Interaction System so I can set it's position and rotation. I'm using code straight from your demo scene. I have the Interaction System and of course the closestTriggerIndex but I can't figure out a way to change the position and rotation of the Interaction Target that is going to be used. Looking through the InteractionSystem class, I can't find a method or anything that would provide a reference to the Interaction Trigger Transform. In all of the videos, you just manually set the position and rotation of the Interaction Target and then rely upon a pivot transform if the character is in some other rotation to the target. But I don't think that will work in my case.
    Code (CSharp):
    1. // If not paused, find the closest InteractionTrigger that the character is in contact with
    2.         int closestTriggerIndex = interactionSystem.GetClosestTriggerIndex();
    3.  
    4.         // ...if none found, do nothing
    5.         if (closestTriggerIndex == -1) return;
    6.  
    7.         // ...if the effectors associated with the trigger are in interaction, do nothing
    8.         if (!interactionSystem.TriggerEffectorsReady(closestTriggerIndex)) return;
    9.  
    10.         interactionSystem.TriggerInteraction(closestTriggerIndex, false);
    Thanks for any help. :)
    Allan
     
  17. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,
    There's not much I can help you with there, the solver just needs to iterate a couple of times to get this thing working.

    Oh, did you mean you have animations that simulate stepping up/down slopes? That is a bit of a problem, because Grounder assumes 0 to be the ground level in the animation clip, but if your animation is stepping up and feet are higher than the ground, the Grounder would just offset it and the foot would end up raised higher than you expected. If this is the case, I'd suggest you skip the up/down walking animations and try to modify the animation with FBBIK effector offsets instead based on whether the character is going up or down. It is basically what the "Spine" part of GrounderFBBIK is doing.

    Hey, you need to blend out solver weight and with FBBIK that would be:

    Code (CSharp):
    1. ik.solver.IKPositionWeight
    Hi!
    Have you seen the "Bot" or "Mech" examples in the "Grounder" demo scene? Thats basically solving the same problem. I see you are probably already using GrounderIK. The "Root Rotation" part of GrounderIK is what controls the rotation of the character's root, aligning it to the terrain.

    I'll answer the other questions in a moment, hold on...
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,
    Maybe it is the root of the character that is rotated? Store the local position/rotation of the root (it is probably parented to the bike right) and when you reset, set localPosition/Rotation to the stored value.

    It's
    Code (CSharp):
    1. ik.solver.headMapping.maintainRotationWeight
    FBBIK internally consists of chains (limbs starting from the root node and ending with hands/feet), effectors (manipulating with the chains) and mappings that take care of mapping the bones of the character on the solved chain.

    Hey,

    Indeed, it is ridiculously difficult to retrieve that information from the InteractionSystem, I never thought about it.
    But please import this patch, you will be able to use
    Code (CSharp):
    1. interactionSystem.TriggerInteraction(closestTriggerIndex, false, out interactionTarget);
    or
    Code (CSharp):
    1. interactionSystem.TriggerInteraction(closestTriggerIndex, false, out interactionObject);
    Thanks for helping me improve this! :)

    Cheers,
    Pärtel
     
  19. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    @Partel Lang Hi, I've got it working but is now doing something strange, for 2 frames the Ik effectors move, as in THIS

    Any idea why this would happen?

    Thanks.
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Is the Animator set to AnimatePhysics?
     
  21. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    It's a very old model, the animations are legacy.

    I've set the rotation weight to 0 on all the limb IK's and now THIS

    Better as the legs don't retract up anymore but jump down?
     
  22. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Animation also has an "Animate Physics" toggle, is it on?
    Can you send me that bot and the animation you are using so I could take a closer look?
     
  23. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Sent you an email.

    Thanks.
     
  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Which address? haven't received one yet. Use support@root-motion.com
     
  25. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
  26. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    Thanks a ton for the patch however InteractionTarget is always coming back null even though I know it works because it is firing correctly.
    I'm using:
    Code (CSharp):
    1. InteractionTarget closestIntTarget;
    2.         if (interactionSystem.TriggerInteraction(closestTriggerIndex, false, out closestIntTarget))
    3.         {
    4.             Debug.Log(closestTriggerIndex + " " + closestIntTarget);
    5.             closestIntTarget.transform.localPosition = InteractionTargetPos1.Value;
    6.             closestIntTarget.transform.localRotation = Quaternion.Euler(InteractionTargetRot1.Value);
    7.         }
    In InteractionSystem.cs, It appears that you are looking for the InteractionTarget as a component on t. And it looks like t is the InteractionObject. But I have my character hierarchy setup similar to your Interaction Trigger demos where the InteractionTargets are separate gameobjects and the InteractionObjects are separate gameobjects all childed to a main parent hierarchy. Thus InteractionTarget will always be null since it is not a component on the InteractionObject gameobject

    So I thought I would be clever and change line 365 in InteractionSystem.cs from this:
    Code (CSharp):
    1. interactionTarget = t.GetComponent<InteractionTarget>();
    to this:
    Code (CSharp):
    1. interactionTarget = t.transform.parent.GetComponentInChildren<InteractionTarget>();
    That returns an Interaction Target but only the first in the hierarchy not the target associated with the index (closest target) :)

    Getting the correct InteractionObject based upon the index appears to work fine.

    It would also be cool to be able to know which InteractionTrigger is the closest prior to calling the interactionSystem.TriggerInteraction. That way you could adjust the position and rotation of the InteractionTrigger Transform before you actually fire the Interaction instead of firing it and then receiving back the InteractionTrigger.

    Allan
     
    Last edited: Mar 7, 2016
  27. dhaupert

    dhaupert

    Joined:
    Jan 7, 2016
    Posts:
    13
    Hi,

    Not sure what happened- my post didn't make it into the thread, so I'll try again! I have my character mounted to a bicycle (effectors for feet on pedals, hands on handlebars, and pelvis on seat). Now the player can grab pick ups in the game and when they do, I set the weight of the right hand to zero so his hand comes off to hold the pick up until he uses it. When he does, I trigger a throwing animation. The animation has a mask to disable the torso twisting and only allows for the arm to move. Looks fine on it's own but when coupled with FBBIK, the entire torso (And even the head) twists awkwardly to allow the arm to come back. How can I disable this twisting with FBBIK while keeping all of the other effectors working and glued to the bike?
     
  28. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    81
    Hello Pärtel, I have InteractionSystem and LookAtIK attached to a character.
    The problem, LookAt works fine just until the InteractionSystem does its work. InteractionSystem destroys the LookAt solves. Means, character looks at an item, but when he reaches for a target, lets say with one or two hands, he looks in a different direction, especialy when the character bends down. It would be enough if the head would stay in LookAt target direction. Is it possible to solve LookAt AFTER InteractionSystem?

    Also, can I let a called funktion run AFTER FinalIK has solved everthing?

    Thanks in advance
    Bernhard
     
  29. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, sorry for the massive delay, I've been traveling to GDC and setting up some stuff here...

    I didn't quite understand, are the InteractionTargets not parented to the InteractionObjects? Because they are in the "Interaction Trigger" demo scene. If they were not, InteractionSystem would not find them and not even use them. In the Interaction Trigger demo this code seems to work fine retrieving the targets. We are talking about InteractionTargets not InteractionTriggers here right?

    Anyway, about getting the closest trigger(s) prior to calling TriggerInteraction,
    please import this package and you will be able to use those methods:
    Code (CSharp):
    1. public InteractionObject GetClosestInteractionObjectInRange()
    Code (CSharp):
    1. public InteractionTarget GetClosestInteractionTargetInRange()
    Code (CSharp):
    1. public InteractionObject[] GetClosestInteractionObjectsInRange()
    Code (CSharp):
    1. public InteractionTarget[] GetClosestInteractionTargetsInRange()
    Hi!
    I think it's because when you lerp the weight, the effector target position crosses the body at some point on it's way from effector.position to the animated bone position. You can try lerping arm mapping instead of effector weight and see if it's any better.:

    Code (CSharp):
    1. ik.solver.leftArmMapping.weight = something;
    If not, perhaps you can make a video and send it to me at support@root-motion.com.

    Hi!
    If you need more specific behaviour from the LookAt, you might want to not use the LookAt solver in the InteractionSystem, but leave the slot empty and update a LookAtIK/AimIK component manually after FBBIK:

    Code (CSharp):
    1. public FullBodyBipedIK fbbik;
    2.         public LookAtIK lookAt;
    3.  
    4.         void Start() {
    5.             lookAt.enabled = false;
    6.             fbbik.solver.OnPostUpdate += AfterFBBIK;
    7.         }
    8.  
    9.         void AfterFBBIK() {
    10.             lookAt.solver.Update();
    11.         }
    12.  
    13.         void OnDestroy() {
    14.             if (fbbik != null) fbbik.solver.OnPostUpdate -= AfterFBBIK;
    15.         }
    16.  
    Like that you'll have full control over the component and where the character will be looking at.

    Cheers,
    Pärtel
     
  30. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Thanks Partel, sorry for the delay. I changed real work ;-)
    No, I don't use animations to simulate slope.
    It is only that legs blends with terrain heigh and irregularities. If I add GrounderIK, it has no effect. Maybe adjusting muscular legs settings in PuppetMaster?.
    Regards
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi could you make a video or something please of how it looks like and send it to support@root-motion.com. Or package the relevant part of the project, that would be even better, I can't understand what's going on without more info.

    Maybe the layers of Grounder are not set up right, they might be colliding with the ragdoll's colliders.
    Maybe the joint limits prohibit the puppet to bend it's knees right. Uncheck "Angular Limits" in PuppetMaster to check that out.

    Cheers,
    Pärtel
     
  32. _ascilograf

    _ascilograf

    Joined:
    May 18, 2014
    Posts:
    2
    Hello, Partel, I love Your plugins, but can You make some small tutorials? For example: about Hit reaction component, with little explanation of variables and how to fill them better.
     
  33. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!
    Did you try the tooltips? They explain what the variables do.

    Pärtel
     
  34. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hi Partel, its probably something i should do myself but maybe others might find it useful, could you provide a leapmotion package compatible with the latest leapmotion Orion update?
     
  35. Rayearth

    Rayearth

    Joined:
    Mar 25, 2014
    Posts:
    2
    Greetings, Partel. Thank you for your work.

    I'm in need of some advice. I have a set up similar to the "Interaction Walls" demo, except instead of the hand automatically reaching out to touch the wall when close enough, my FBBIK character also requires the user to click (and hold) the location that the hand will touch. Dragging the mouse also slides the hand along the wall unless its too far from the character.

    This works pretty well, and the only thing that can make it better is if the wrist (and ankle) can be prevented from rotating too much when touching further parts of the wall. The joint rotation at those points looks slightly unnatural. According to the FAQs Rotation Limits do not work with FBBIK, so any ideas on what I can do?
     
  36. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    Hey Partel, had a question.
    Is there a way to make the grounder script update the foot positions while doing an attack animation? I have my player step forward without 'moving' the character, when I do this the character's foot clips into the terrain. How would i go about fixing this issue?
     
  37. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Hi,

    I've been playing around with this as it seems pretty much perfect for my project. I need something like the MechSpider CCD but with foot placement. I'm wondering if it would be possible to give a little guide on how to get this behaviour? I had a look around but could only find tutorials for bipeds.

    Thanks :D
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, I had a LeapMotion demo package, doesn't it work with Orion anymore?

    Hey,
    Actually I'm not sure if it would help in this case, but you can apply the limits on the wrist bone after FBBIK is complete. Add the Rotation Limit component, disable it in Start, and call rotationLimit.Apply(); after FBBIK has solved for that frame. You can do that by adding your script to a bigger value in the Script Execution Order and using LateUpdate.

    Hi!

    Grounder just offsets the feet so that their height from ground will be the same as their height from the XZ plane in the animation clip. Are you sure the foot doesn't go below 0 in the animation clip without the Grounder?
    Your player should be able to walk away from it's root, it's just the height of the feet in the animation clip that matters.

    Hi!

    Actually when doing spiders I'd go with the animation + GrounderIK approach, not the fully procedural mech spider one. It just takes a lot of coding to get the procedural animation look the way you had imagined it.
    There is an example for you in the Grounder demo scene, the "Bot" character. It is basically a normal spider walk animation and GrounderIK applied on top of it to take care of vertical foot placement correction.

    Cheers,
    Pärtel
     
    Rayearth likes this.
  39. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    The old leap motion package doesn't work with Orion which is why I asked, it seems they completely replaced the old sdk when Orion came around which is really entirely based around VR except if it's a sunny day (I'm kind of pre-empting a whine at valve to send me a vive kit here because the new Orion sdk is fantastic for hand tracking (leap motion is not useless anymore) so long as the sun sets or you live in the Arctic circle)

    Either way i'd really love to echo the hand/wrist/forearm pose throughout the avatar pose especially as I want to echo that pose through the pose of the craft 'arms' to give a bizarre and comic comical visual for the player so yes, personally motivated but the leap motion sdk between v2 and Orion is quite a good thing
     
  40. Rayearth

    Rayearth

    Joined:
    Mar 25, 2014
    Posts:
    2
    Yes, that did indeed help a lot. It even works for really awkward surfaces like corners and rounded surfaces on the wall! Thank you again.
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,
    Please use this link to download the package updated to Orion.
    It will be added to FinalIK/_Integrations in the future...

    Cheers,
    Pärtel
     
  42. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    @Partel Lang Hi, I'm trying to use Limb.IK to throw a grenade from the view of FP, my problem is the arm has a Bip01 L ForeTwist bone that is screwing up the movement when I use Limb.IK

    Screen Shot 2016-03-28 at 10.38.17.png

    Is there another way to bypass this bone?

    I use the ..

    Bip01 L UpperArm
    Bip01 L Forearm
    Bip01 L Hand

    In the Limb.IK chain.

    Thanks.
     
  43. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,
    It's a problem with Max Biped twist bones, the forearm twist bones are weirdly not parented to the forearm and the hands are not parented to them.
    You should be able to solve this issue if you store the position/rotation of the twist bone relative to the forearm in LateUpdate before LimbIK solves, and move the twist bone back to the same relative pos/rot after LimbIK has solved.
    Something like this:
    Code (CSharp):
    1. public LimbIK limbIK;
    2.     public Transform twistBone;
    3.  
    4.     private Vector3 relativePosition;
    5.     private Quaternion relativeRotation;
    6.  
    7.     void Start() {
    8.         // Take over the LimbIK's solver
    9.         limbIK.enabled = false;
    10.     }
    11.  
    12.     void LateUpdate() {
    13.         // Remember the position/rotation of the twist bone relative to the forwearm
    14.         relativePosition = limbIK.solver.bone2.transform.InverseTransformPoint(twistBone.position);
    15.         relativeRotation = Quaternion.Inverse(limbIK.solver.bone2.transform.rotation) * twistBone.rotation;
    16.  
    17.         // Solve IK
    18.         limbIK.solver.Update();
    19.  
    20.         // Transform the twist bone back to how it was relative to the forearm before solving IK (as if it was parented to the forearm)
    21.         twistBone.position = limbIK.solver.bone2.transform.transformPoint(relativePosition);
    22.         twistBone.rotation = limbIK.solver.bone2.transform.rotation * relativeRotation;
    23.     }
     
    Griffo likes this.
  44. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    @Partel Lang line 21 is missing a capital T for transformPoint otherwise worked perfect .. Thank you.
     
  45. Narendraom

    Narendraom

    Joined:
    Jul 8, 2015
    Posts:
    35
    Hi Partel,

    I want to create a app in which user have a T-Pose model and let them to create a pose as they wish. just by drag or some button. They can manipulate hand, wrist, leg, knee or head. I have added FBBIK on model and give target to every part and dragging that target, everything working but one thing body parts overlapping each other and realistic pose could not be created. Can you suggest me how can this be possible and if i am doing wrong please tell me how can i achieve this.
    I want to create poses like this.
     
    Last edited: Mar 31, 2016
  46. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Last edited: Mar 29, 2016
  47. AlbertSwart

    AlbertSwart

    Joined:
    Oct 17, 2015
    Posts:
    15
    Hi Partel,

    When I set up AimIK on a character and hit play on a scene then there is a noticeable 0.5 second or so lag before the character 'snaps' to the configured target. I notice the same thing on the AimIK demo scene 'Aim Weapon'.

    I am assuming its because the solver takes a bit of time to initialize and only updates the animation after a few updates have taken place already?

    Are there any workarounds for this when you have a scene that starts off with an aim pose to a specific target?

    Thanks,
    Albert
     
  48. Partel-Lang

    Partel-Lang

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

    There's no easy solution for this I'm afraid.
    You might want to try multiple iterations of solving. So FBBIK normally can't use rotation limits. But you could set up rotation limits anyway, solve FBBIK once, apply the rotation limits and solve FBBIK again on top of that (or LimbIK, which is faster). So basically you would iterate towards a result where both IK targets are met and rotation limits satisfied. It would get quite heavy performance-wise though, which is why such a solution is not implemented in Final-IK. But if you only have one or two characters to solve on decent hardware, it should be OK.

    You can take control of IK and RotationLimit components by disabling them in Start and calling ik.solver.Update() and rotationLimit.Apply() whenever you need.

    Hi!
    It seems to be a problem with the Animator. Rotating any bones controlled by the animator seem to make no difference for that short amount of time. AimIK initiates instantaneously in Start and updates in LateUpdate of the first frame. You can try it with a simple script like that:

    Code (CSharp):
    1. public Transform bone;
    2.  
    3.     void Awake() {
    4.         bone.rotation = Quaternion.LookRotation(Vector3.right);
    5.     }
    6.  
    7.     void Start() {
    8.         bone.rotation = Quaternion.LookRotation(Vector3.right);
    9.     }
    10.  
    11.     void LateUpdate() {
    12.         bone.rotation = Quaternion.LookRotation(Vector3.right);
    13.     }
    If you assign the root of the character as the "bone", you'll see the change applied to it's rotation instantly. If you assign any of the character's bones, you'll see the short delay before it becomes visible, no matter how early you run it, even in Awake.
    It will become instant though if you disable the Animator so it must be the Animator overwriting the pose.

    Cheers,
    Pärtel
     
  49. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Hey Partel, FinalIK is awesome - I've been making use of the grounder and interaction IK systems for a while in a project and they've worked great for human characters. I was wondering about how easy it would be to set up for more complex/less conventional joint chains though.

    I've got this robotic arm in the game (part of a futuristic medical facility), and I'd like to drive itusing IK:
    Robot Arm.PNG
    I've got it set up with the LimbIK script at the moment, and this works well for the top two joints, as long as I keep the target along the same plane as the arm. As you can see from the image though, those two joints should only be able to rotate along the X axis, and there's a joint at the very bottom that can tilt the arm along the Z axis. Is there a simple way to get the IK system to use these joints correctly?

    EDIT: After playing around with it more, I've switched to CCDIK, using rotation limits on each of the joints and this works much better, but there's still one strange thing (which may just be a limitation of the IK solver, I'm not sure).

    When the target is moved parallel with the track the arm is on, the arm gets tilted (at the base) towards the target, but as the rotation takes place at the bottom of the chain, this leaves the end of it pointing away from the target. If the base tilted away from the target, the end would be able to get much closer.

    I realise this is probably something of an edge case, but is there anything I can do?

    Thanks!
     
    Last edited: Apr 5, 2016
  50. AlbertSwart

    AlbertSwart

    Joined:
    Oct 17, 2015
    Posts:
    15
    Hi Partel,

    Thanks for the info. I also use Chronos and it too has confirmed issues related to the animation system behaving unexpectedly.

    Would be good if we could grab the attention of the Unity Animation guys to have a look at these issues. I suppose I could log an issue but don't think it would carry as much weight as unity asset store heavy weights. ;-)