Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    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. Zrob

    Zrob

    Joined:
    Jan 13, 2017
    Posts:
    9
    Hey,

    So I got Puppet Master but I can't seem to get this to work? I have internal collisions and such on, but when I go into VR, the ragdoll does not seem to be following the character. Instead it jsut flies around or goes through the ground.

    EDIT: I figured out why the ragdoll was flying around. However now it just lies on the ground rather than actually follow the VRIK rig
     
    Last edited: Apr 29, 2018
  2. Mikekan13

    Mikekan13

    Joined:
    May 30, 2015
    Posts:
    40
    :D it could be a lot of things as I've found out. Start by making sure the puppetmaster and all its colliders are on a different layer than the armature of the model armature and the VRIK component. Make sure those layers don't collide. I started by turning off the behavior script so it would be less likely to unpin and then working it till I could turn it back on. Also, make sure you don't have limit angles on.
     
  3. Zrob

    Zrob

    Joined:
    Jan 13, 2017
    Posts:
    9
    I got it working, thank you. It was a layers issue.

    Do you know how to lock the legs in VRIK so they simple don't move? I just want the character to "float" without "walking"
     
  4. trappist-1

    trappist-1

    Joined:
    Mar 26, 2017
    Posts:
    287
    Turn off locomotion weight??
     
  5. Zrob

    Zrob

    Joined:
    Jan 13, 2017
    Posts:
    9
    That doesn't work. The character spawns with their legs floating around and it just wildly follows them.
     
  6. Mikekan13

    Mikekan13

    Joined:
    May 30, 2015
    Posts:
    40
    Make a target that follows the head but underneath it then target the legs to it and also turn off locomotion weight.
     
  7. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    196
    I just spent the better part of today trying to figure out why I was having an issue with PuppetMaster. When the character would move, the character appears to stutter/jitter back and forth. While I read up on all the various ways to solve this kind of issue, nothing worked. However, I finally found the problem, and it's perplexing.

    It seems I was seeing the jittery motion with Puppetmaster due to having "V Sync Count" set to "Every V Blank" in the Quality settings. But I don't understand why having VSync enabled would affect PuppetMaster performance.

    As an experiment, I upped the "Fixed Timestep" in the "Time" settings from 0.02 (50hz) to 0.0166666 (60hz), and sure enough it *nearly* gets rid of the stuttering. So this would indicate that there's a conflict between the physics/Lateupdate processing and the fixed framerate of 60hz when VSync is enabled. I don't see why this should be though, because if that's always the case, then you could pretty much never use VSync in any game. Also upping the "Fixed Timestep" beyond 60hz just makes the jitter return, which also makes no sense.

    What am I missing? I really don't like the idea of releasing a game with no VSync support.
     
  8. trappist-1

    trappist-1

    Joined:
    Mar 26, 2017
    Posts:
    287
    Not sure about your issue exactly but I have seen character jitters before and toggling the "animate physics" option in the animator made it stable again. Maybe you already tried it, but just thought I'd mention it.
     
  9. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    196
    Heh, If only I'd know of that sooner. That did fix the issue. Thanks so much! I wish the documentation had a FAQ of common issues and solutions, because trying to comb through 66 pages of a forum is a nightmare.
     
    trappist-1 likes this.
  10. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hey,
    Thanks, it's a bug indeed, but please use this code instead:
    Code (CSharp):
    1. float sizeF = (headTarget.position.y - ik.references.root.position.y) / (ik.references.head.position.y - ik.references.root.position.y);
    Hey,

    If you have locomotion.weight at 1, procedular locomotion will move the root of the character along with taking the footsteps. If it's at 0, nothing will move the root so the character will always just lean towards the HMD. So if you need to make the character float, play a floating animation, set locomotion weight to 0 and make a script that makes the root of the character follow the HMD horizontally using SmoothDamp or something like that.

    Hey,
    FIK customer base has grown quite big now so I am finally working on adding a proper QA/issue tracker :)
    I know I should have done that years ago...

    Cheers,
    Pärtel
     
    Zrob and ceebeee like this.
  11. fritolay1

    fritolay1

    Joined:
    Apr 30, 2018
    Posts:
    2
    I have 3D environment, with 2D characters using images. Rigidbody freeze position Z, freeze rotation X and Y. Will this production allow me to animate with these settings?
     
  12. Zrob

    Zrob

    Joined:
    Jan 13, 2017
    Posts:
    9
    Thank you Partel, I got it to work.

    I have another question. I have a rig ready, and it seems to be working perfectly, except for one thing. For whatever reasons, the knees are bending sideways rather than forward, and I have no clue why. The rig itself seems to be fine in other mediums.
     
    _dandroid likes this.
  13. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    21
    @Partel-Lang , I am working on a vr app with VRIK. We have 2 different rigs, one for the male and one for the female, and although the VRIK seems to work nicely on one rig, it does not work the same way on the rig2 . Rig 2 has the same bone structure but different bone placement.
    Is there any standard bone placement/structure that you have to follow to get the the rigs right? in my case what is specifically happening is that the should bone is getting moved down too much as soon as I press the play button.
    Help please!!
     
  14. Mikekan13

    Mikekan13

    Joined:
    May 30, 2015
    Posts:
    40
    Is there anything already made similar to a character controller for VRIK so you can play animations for the legs like if you are falling or running?
     
  15. _dandroid

    _dandroid

    Joined:
    Feb 1, 2016
    Posts:
    8
    I'm having the exact same problem. Any ideas?
     
  16. Mikekan13

    Mikekan13

    Joined:
    May 30, 2015
    Posts:
    40
    Trying changing the rig to have bends in the knees where they are supposed to be. If the rig is super straight in those I think it has trouble knowing how it is supposed to bend.
     
  17. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hey,
    Just replied to your question in PuppetMaster thread.

    Please see this tutorial. In short, if you have the FBBIK gameobject selected in Editor mode you'll see little blue arrows on the knees and elbows. They show the direction in which those limbs will be bent. You can tweak that by just rotating the knee and elbow bones a bit.

    Hey,
    If you go to the line in IKSolverVRArm.cs that says
    Code (CSharp):
    1. private const float pitchOffsetAngle = -30f;
    (should be line 143) and change it to
    Code (CSharp):
    1. public float pitchOffsetAngle = -30f;
    , then you'll be able to adjust that shoulder pitch for each character.
     
  18. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    21
    thanks man, that seems to be working . @Partel-Lang extra points to you for a prompt reply.
     
  19. _dandroid

    _dandroid

    Joined:
    Feb 1, 2016
    Posts:
    8
    I've changed the knees a few different ways now to no avail. Everything looks correct, with the arrows at the knees pointing forward, no warnings or errors.

    I actually watched this tutorial before I imported the asset, thanks for making it! The arrows are pointing correctly, I gave the knees an extra little rotation just to test and still have the same result. I'm at a loss as to what Crabby McNoodlelegs problem is.
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hey,
    Does it still look the same when you play another animation?
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hi all,

    I will be off-grid until the 14th due to military exercises. Please leave your questions here, I'll answer them as soon as I get back. Thank you for your patience!

    Cheers,
    Pärtel
     
  22. roomera

    roomera

    Joined:
    Sep 27, 2016
    Posts:
    13
    Hi Partel -

    Is there a way to have per-bone offsets for rigs that have spines or other parts that aren't vertically aligned? The Fabrik spine solver seems to have issues with spines that are curved (i.e. causes it to jut out in an odd way).

    Thanks!
     
    Last edited: May 3, 2018
  23. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    15
    Ugh...military exercises are the worst! You think they'll make you do jumping jacks? :p
    Just kidding! (Obviously..lol) Partel, you're a friggin' badass.
    So I have a rig that's kinda like a centaur, where the top half is a humanoid and the bottom is quadruped I'm trying yo make it so the top half uses VRiK and the bottom grounder (or maybe CCD if that ends up making more sense later). Any ideas on how I might make this work a little better? The way I have it right now it's really close to working, but it's like I just can't quite get it to work correctly. It's like the VRiK wants to lift the leg parts off the ground. (Which I suppose makes sense being that the root (pelvis) of the centaur character's lower half (grounder) is attached as a child of the hips of the upper body.
     
    Last edited: May 3, 2018
  24. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    15
    Woops! Nvm I guess. Actually just figured it out. :D
     
  25. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    73
    I can't sync VRIK avatars over network.
    Device transforms are synchronized, but avatars stand still. I tried to add Network Animator component to the mesh object, but it didn't help.
    Do you have any tips?
     
  26. cspid

    cspid

    Joined:
    Apr 25, 2014
    Posts:
    13
    Hello, I would like to ask about the best way to freeze the last bone in a CCD IK chain in world space. I have a chain that is an arm, and I want to place the hand against a wall and keep it in place, even as the body continues to move.
    Any help is appreciated, thank you.
     
  27. eobet

    eobet

    Joined:
    May 2, 2014
    Posts:
    154
    1. Is it possible to limit an effector’s influence to only two axises? The top level inspector only gave an overall slider from what I could see, but it would be nice to be able to expand a x, y and z checkbox area as well...
    2. The shoulder rotator script adds to the realism... except for the arm you don't have an effector on. This remains stationary like the head of a hen, instead of following the twisting of the chest. It can be seen in your demo scene as well, though it's mitigated by that particular pose.
    3. Puppetmaster has a nice, "visualize target pose", but even though I removed the upper chest bone to conform with your demo rigs, my shoulder bones draws to the wrong end of the chest bone. In Unity's Avatar configurator, everything looks fine and the gameobject hierarchy is fine. Is there a setting in your scripts I need to change?
    4. I really don't like that Puppermaster destroys the prefab link to the imported object. I bet that's been in place for a long time, and I guess not enough people complain about it for you to change it, but I'm going to add my voice to that group (especially with nested prefabs coming now).
     
    Last edited: May 10, 2018
  28. MariusRu

    MariusRu

    Joined:
    Oct 15, 2015
    Posts:
    19
    Hello,

    I have problems with knees bending in the wrong direction, too. However, I use VRIK, so I think the solution in your FBBIK tutorial does not apply, or does it somehow?
    Specifically, while some characters (all from Autodesk Character Generator) like the one on top bend their knees nicely, the middle one bends them in the wrong direction. Making them point forward using a BendGoal does make the knees bend in the right direction, but the legs are now grossly contorted.
    What can I do to get all characters to bend their legs as in the above Image?

    Best,
    Marius
     

    Attached Files:

  29. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    15
    I am currently syncing a VRiK rig over the network so at least you know it's possible. Are you syncing each controller with the targets instantiated as children of the controllers being tracked? If you're using photon do you have all your proper Photon Views in order?
     
  30. SpawnOfLinkTIS

    SpawnOfLinkTIS

    Joined:
    Jul 3, 2013
    Posts:
    2
    Hey Partel,

    I've been working on an adventure game, and have been using Morph3D characters and Opsive's 3rd person controller system. Currently focused on the interaction system built into Final IK.

    There is an issue where the bones in a Hand Poser won't match up with an InteractionObject + Interaction Target hierarchy. This happens because both Morph3D and Opsive's TPC will add child objects to the attachment points on the hands.

    One solution would be to re-do every button every time a designer adds a new weapon, object or holdable to the hand.. but that would be really annoying. So, I updated your Hand Poser script to address the problem.
    See below and let me know what you think, I'm just getting started with it but unless those other assets do something funky with the attachment points, it should be fine.

    Workflow:
    Build an interaction object just like the demo video
    Go into the 'button' and remove attachment point / Items game objects from the hierarchy (we want the button version -target- to be just a clean skeleton of the hand)
    Go to the character's hand and take note of the Hand Poser's 'Ignore Children Pose Tag'
    Find the Morph3D attachment point, or Items in the hierarchy and change the Tag to whatever was set
    You'll need to do this for both hands if used.

    Now, no matter what objects get added to the attachment point, they will be ignored.

    Add this code to Hand Poser:

    Code (CSharp):
    1. public class HandPoser : Poser {
    2.  
    3. public string ignoreChildrenPoseTag = "IgnorePosedTransform";
    4.         /*
    5.             Recursively check my parents (up to the HandPoser object) to see if
    6.             I am the child of an object with the ignore tag
    7.         */
    8.         private bool SearchParentForTag(Transform t)
    9.         {
    10.             if(this.gameObject == t.gameObject)
    11.             {
    12.                 return false;
    13.             }else
    14.             {
    15.                 if(t.gameObject.tag == ignoreChildrenPoseTag)
    16.                 {
    17.                     return true;
    18.                 }else
    19.                 {
    20.                     return SearchParentForTag(t.parent);
    21.                 }
    22.             }
    23.         }
    24.         private Transform[] clearChildrenWithTag(Transform[] theChildrenTransforms)
    25.         {
    26.             //clear out any transform, or child of transform with Tag ignoreChildrenPoseTag
    27.             List<Transform> childrenSearch = new List<Transform>(theChildrenTransforms);
    28.             for(int i = childrenSearch.Count -1; i>=0 ; i--)
    29.             {
    30.                 /*
    31.                     every transform goes through the recursive function to determine if any parent
    32.                     has the ignore tag up to the root game object that contains the HandPoser component
    33.                 */
    34.                 if (SearchParentForTag(childrenSearch[i]))
    35.                 {
    36.                     childrenSearch.RemoveAt(i);
    37.                 }
    38.             }
    39.             return childrenSearch.ToArray() ;
    40.         }
    Then in 'InitiatePoser' add:
    Code (CSharp):
    1. children = clearChildrenWithTag(children);
    after
    Code (CSharp):
    1. children = (Transform[])GetComponentsInChildren<Transform>();
    I know its a pretty small thing, but feel free to add it to the build, or if you think it will break something else in your scripts let me know.

    Thanks!
     
  31. Spanky11

    Spanky11

    Joined:
    Mar 9, 2015
    Posts:
    274
    Just purchased this on sale, and I have watched some videos, but am hoping someone can give me advice about getting started. For my VR game, I'd like to create NPC characters that do some basic things like:

    1. Walk (or run) along a path of way points (either configured, or random)
    2. Walk towards the camera and then when arrive swing a sword at the camera
    3. When hit by an object with sufficient force, fall down, then get back up.
    4. When picked up by the player, have the limbs react appropriately. When thrown, flail around through the air, and then get back up.

    To see character bodies react in a realistic manner is pretty cool in VR, and I'd like to add this kind of thing to my game.

    I think FinalIK gives me at least some of what I need, but perhaps I need to pair it with another asset? What I'd love is to just buy an asset that has some NPC scripts already prebuilt that do common NPC activities. I'd really prefer not to spend a great deal of time writing potentially complicated scripts. Is there an easy path to help me accomplish this? I see there is a "PuppetMaster" asset, but I haven't checked into it. Will this be helpful to me?

    I'm pretty experienced with Unity and scripting, but this is a new area for me, and I don't really know what I need to do to get even a basic example (like a character that randomly walks around, and can be pushed over and recover) working.

    If someone could point me in the right direction, I'd really appreciate it. If I can find some sample scripts that do some of what I'm looking for, then I can learn how the code works, and enhance them for my specific needs. Thanks!
     
  32. valentin_bourdon

    valentin_bourdon

    Joined:
    Sep 17, 2015
    Posts:
    6
    Hey Partel,

    I wish I could translate and rotate the hand in a very natural and realistic way. For development, I use a 3D mouse to move the target of my hand. However, when I move my target and the rotation weight = 1, the rotation of the handle is not appropriate and does not correct itself (img 1). So I tried by putting the rotation weight = 0 and the rotation of the handle remains natural and realistic compared to the forearm (img 2). But then I would like to rotate the handle but it is not possible ...
    Do you have a solution to correct this problem? The goal is to make a translation and a rotation separately.

    Capture1.PNG
    Capture2.PNG
     
  33. Zrob

    Zrob

    Joined:
    Jan 13, 2017
    Posts:
    9
    So I have most everything working now. However, using VRIK, I can't get the hands to rotate properly with my hands. They kind of just stay the same and follow my hands but the palms wont flip up or down, etc, like my VR hands. Any ways to fix this?
     
  34. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    364
    Partel-Lang
    Hello. FinalIK is great. It have large amount of complex technologies, I am admire such a great work
    However, I am surprised that FBBIK and VRIK components have such a huge flaws.

    Here is what I mean:
    FBBIK issue (1).png FBBIK issue (2).png FBBIK issue (3).png

    Character which located behind does not have any FinalIK component. I rotated bones manually just to show how real people is capable to rotate hands. As you can see, hands have very high angle, however pose looks natural, real people also capable to do that. This is what I want to achieve from FinalIK. Each bone should be twisted a bit, even a shoulder, as result, the pose will looks natural and nice.

    Now let's look at the character on the front - this character have FBBIK component and I am tried to place Left and Right Hand targets to the same position in order to achieve the same pos. As you can see, result is completely unacceptable. Only 1-2 bones twisted, while others - not, as result, shoulders is extremely twisted and visually broken.

    Am I didn't understood something, or it is issue "by design"?

    If so, why this issue not fixed? This is super common task. Sure, most people want to use FinalIK mostly due FBBIK or VRIK in order to animate bipedal humanoids.
    In my opinion it can be easily fixed by using special setup of "rotation limits" components.
    All humanoids have the same structure and most people can rotate its arms only within specified angles. So why such limits is not built in FBBIK and VRIK components?

    I am tried to add my own "rotation limit" components, but it does not works with FBBIK. Manual confirming this:
    http://www.root-motion.com/finalikdox/html/page14.html

    "- Can I use Rotation Limits with Full Body Biped IK?
    Rotation Limits can be used with the CCD, FABRIK and Aim IK components, FBBIK has it's own dedicated constraints that keep the limbs bending in the right direction and the spine from collapsing into itself."

    Okay, but as we can see, dedicated constraints of FBBIK does not works as needed.

    And this is not the only problem. FBBIK provides incorrect result even in simpler situations. For example:
    FBBIK issue.png
    Seems like such problem can be solved using simple "rotation limit" setup, but it does not works. And again, why such rotation is not locked by default? No people on the Earth is able to rotate its arm in such direction.

    Seems like people above me in this thread encountered the same problem.
    Can you do something with this issue please? Because it is really a shame, FinalIK have so many implemented technologies and potential, and such a small but crucial flaw which makes FInalIK unusable.
     
    Etrain and Romenics like this.
  35. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    364
    Well, I found a partial solution. If someone else need this, it is shown in the scene VRIK (Twist Relaxers)
    TwistRelaxer component is capable to stabilize twist like on first 3 screenshots.

    However I still don't know what to do with the problem on the 4-th screenshot. Sometimes arms located inside the body of character. Of course I can use "bend goal" and place it somewhere on the side, but in that case, IK result will be incorrect in many others situations.
    I am still don't understand why limits is not built-in FBBIK.
     
    ceebeee likes this.
  36. HiLiX

    HiLiX

    Joined:
    Sep 10, 2015
    Posts:
    11
    Hey,
    I've got problem with VRIK and switching to running/walk animation (I'm setting locomotion weight to 0, reset solver etc).
    In our game we are using also "free movement" - so when it's activated - player can walk through scene. The problem is that often I have situation when torso and legs are not in line... Lean to sides or (which is more often) to back.
    leaning.png
    leaning2.png
     
    Last edited: May 11, 2018
  37. Justcloud

    Justcloud

    Joined:
    Oct 8, 2012
    Posts:
    2
    Hi Partel-Lang
    I'm using VRIK with my VR character,
    My character elbows keep crossing the body and neck when i try to raise hand to another side of shoulder
    How to fix that?
     
  38. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    61
    Hey Partel-Lang is there a way to know when feets are grounded to link audio?
     
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hi all, I'm back (and still alive), thank you for your patience!

    Hey,
    May I ask what are you using FABRIK spine solver for exactly? Might be better to use a TrigonometricIK for the spine, FABRIK tends to be twitchy if the character is animated due to the nature of the algorithm.

    Hey,
    Maybe the device transforms are synced, but the IK targets are not assigned to the remote character instance?
    Run the build and the editor so that you can see the remote instance in the Editor and check if it has the IK targets assigned or any errors/warnings from VRIK in the Console.

    Hey,
    CCD can not solve the rotation of the last bone, it only makes sure the position will reach the target. That is just the nature of the algorithm. Can't you use LimbIK for that arm?
    You could get a call from CCDIK after it is done solving using the ik.solver.OnPostUpdate delegate and then fix the rotation of the last bone in world space.

    Hey,
    1. No, but you could write something like:
    Code (CSharp):
    1. ik.solver.leftHandEffector.position = new Vector3(leftHandTarget.position.x, ik.solver.leftHandEffector.bone.position.y, leftHandTarget.position.z);
    to maintain the animation Y of the left hand.

    2. Try weighing in the "Maintain Relative Pos" slider in the FBBIK arm settings.

    3. Visualize Target Pose just draws lines from each Transform to all of it's children.

    4. You can set PuppetMaster up without it destroying the original prefab. Make a duplicate of your original prefab (that has no ragdoll components), make a ragdoll out of the duplicate, remove all other components from it, add PuppetMaster to it, and before you click on "Set Up PuppetMaster", assign the original as PuppetMaster's "Animated Target". If you are setting up your puppets via code, you can use
    Code (CSharp):
    1. public static PuppetMaster SetUp(Transform target, Transform ragdoll, int characterControllerLayer, int ragdollLayer) {
    where "target" parameter is the original prefab you don't want to destroy and "ragdoll" is the ragdoll instance of it.

    Hey,
    That is the most often reported issue with VRIK so I have redesigned the way limbs are bent in VRIK for the next version. The FBBIK tutorial currently applies only if you don't have animation playing on the character.
    Please try importing this patch.

    Hey,
    Thanks for sharing your code! Btw there's also GenericPoser that you can use if the hierarchies are not identical. Right-click on GenericPoser's header and select "Auto-Mapping" to set up the mapping based on gameobject names.

    Hey,
    1 and 2: That is not what Final IK does at all. FIK does inverse kinematics, that works on the bone level, moving your characters to specific locations and performing animations is the job of a character controller.
    3 and 4: Could be done with PuppetMaster, not Final IK. PuppetMaster does all the character physics stuff, Final IK does kinematics.

    Let me know if you'd need a refund for Final IK as you apparently got it for all the wrong reasons.

    Hey,
    You could keep rotation weight at 0, then rotate the hand bone to match the target in LateUpdate and set "Maintain Hand Rot" to 1 in FBBIK's arm settings.

    Hey,
    Sure you have "Rotation Weight" set to 1 in VRIK's arm settings?

    Because Rotation Limits are not a good fix for the arms of an animated character. You could have them properly limited, but combinations of rotations within those limits (shoulder rotation + upper arm rotation + forearm rotation) might still result in incorrect poses. With FBBIK I usually keep the "Rotation Weight" at 0, which allows the solver to use the animated bend direction, then rotate the hand bone to match the target in LateUpdate and set "Maintain Hand Rot" to 1 in the arm settings.

    Hey,
    That kind of leaning happens when the root of the character is left behind too far of the IK targets horizontally. Select the root of the character and move it closer to where the HMD and hand targets are to see how it will fix the issue. Since you are using all kinds of custom made movement, I'm not sure what causes the root to be offset from the tracking space.

    Hey,
    Adjust "Swivel Offset" or use the "Bend Goals" in VRIK's arm settings.

    Hey,

    Just go to you locomotion animation clips and add events to where the feet touch the ground. Then you can use said events to call footstep animations.
    If it's VRIK's procedural locomotion you are working with, you can use the "On Left Footstep" and "On Right Footstep" events on the bottom of the locomotion settings.

    Best,
    Pärtel
     
    Artaani likes this.
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hi all, I'm back (and still alive), thank you for your patience!

    Hey,
    May I ask what are you using FABRIK spine solver for exactly? Might be better to use a TrigonometricIK for the spine, FABRIK tends to be twitchy if the character is animated due to the nature of the algorithm.

    Hey,
    Maybe the device transforms are synced, but the IK targets are not assigned to the remote character instance?
    Run the build and the editor so that you can see the remote instance in the Editor and check if it has the IK targets assigned or any errors/warnings from VRIK in the Console.

    Hey,
    CCD can not solve the rotation of the last bone, it only makes sure the position will reach the target. That is just the nature of the algorithm. Can't you use LimbIK for that arm?
    You could get a call from CCDIK after it is done solving using the ik.solver.OnPostUpdate delegate and then fix the rotation of the last bone in world space.

    Hey,
    1. No, but you could write something like:
    Code (CSharp):
    1. ik.solver.leftHandEffector.position = new Vector3(leftHandTarget.position.x, ik.solver.leftHandEffector.bone.position.y, leftHandTarget.position.z);
    to maintain the animation Y of the left hand.

    2. Try weighing in the "Maintain Relative Pos" slider in the FBBIK arm settings.

    3. Visualize Target Pose just draws lines from each Transform to all of it's children.

    4. You can set PuppetMaster up without it destroying the original prefab. Make a duplicate of your original prefab (that has no ragdoll components), make a ragdoll out of the duplicate, remove all other components from it, add PuppetMaster to it, and before you click on "Set Up PuppetMaster", assign the original as PuppetMaster's "Animated Target". If you are setting up your puppets via code, you can use
    Code (CSharp):
    1. public static PuppetMaster SetUp(Transform target, Transform ragdoll, int characterControllerLayer, int ragdollLayer) {
    where "target" parameter is the original prefab you don't want to destroy and "ragdoll" is the ragdoll instance of it.

    Hey,
    That is the most often reported issue with VRIK so I have redesigned the way limbs are bent in VRIK for the next version. The FBBIK tutorial currently applies only if you don't have animation playing on the character.
    Please try importing this patch.

    Hey,
    Thanks for sharing your code! Btw there's also GenericPoser that you can use if the hierarchies are not identical. Right-click on GenericPoser's header and select "Auto-Mapping" to set up the mapping based on gameobject names.

    Hey,
    1 and 2: That is not what Final IK does at all. FIK does inverse kinematics, that works on the bone level, moving your characters to specific locations and performing animations is the job of a character controller.
    3 and 4: Could be done with PuppetMaster, not Final IK. PuppetMaster does all the character physics stuff, Final IK does kinematics.

    Let me know if you'd need a refund for Final IK as you apparently got it for all the wrong reasons.

    Hey,
    You could keep rotation weight at 0, then rotate the hand bone to match the target in LateUpdate and set "Maintain Hand Rot" to 1 in FBBIK's arm settings.

    Hey,
    Sure you have "Rotation Weight" set to 1 in VRIK's arm settings?

    Because Rotation Limits are not a good fix for the arms of an animated character. You could have them properly limited, but combinations of rotations within those limits (shoulder rotation + upper arm rotation + forearm rotation) might still result in incorrect poses. With FBBIK I usually keep the "Rotation Weight" at 0, which allows the solver to use the animated bend direction, then rotate the hand bone to match the target in LateUpdate and set "Maintain Hand Rot" to 1 in the arm settings.

    Hey,
    That kind of leaning happens when the root of the character is left behind too far of the IK targets horizontally. Select the root of the character and move it closer to where the HMD and hand targets are to see how it will fix the issue. Since you are using all kinds of custom made movement, I'm not sure what causes the root to be offset from the tracking space.

    Hey,
    Adjust "Swivel Offset" or use the "Bend Goals" in VRIK's arm settings.

    Hey,

    Just go to you locomotion animation clips and add events to where the feet touch the ground. Then you can use said events to call footstep animations.
    If it's VRIK's procedural locomotion you are working with, you can use the "On Left Footstep" and "On Right Footstep" events on the bottom of the locomotion settings.

    Best,
    Pärtel
     
    Artaani likes this.
  41. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    61
    this actually what i used to do, but I have lots of blending and layers in the animator, that we send too many events on the locomotion for footstep

    that's also why i'm looking to have a cleaner way of doing that!
     
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    OK, you could try adding a new gameobject to the bottom of the heel, parenting it to the foot and making a script that reads
    Code (CSharp):
    1. float heelHeight = heel.position.y - root.position.y;
    in LateUpdate and makes a sound each time it descends below a threshold.
    Or perhaps add a collider to the foot and use OnCollisionEnter.
     
  43. MariusRu

    MariusRu

    Joined:
    Oct 15, 2015
    Posts:
    19
    Hello Pärtel,

    I imported the VRIK_LegBendToTargetWeight.unitypackage to fix the bent legs and knees, but now the hips of all my characters are leaning. Additionally, the hips get super bizarre when I turn around. I could not solve this by moving or rotating the Body IK transform. What can I do? May I be missing something else here?

    Best,
    Marius
     

    Attached Files:

  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hmm, maybe that patch wasn't compatible with your version of VRIK or whatever other patches you might had there. I'll PM you...
     
  45. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    61
    perfect, I'll try and tell you :)
     
  46. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    13
    This may have already been answered but 66 pages is a lot to go through.

    Would it be possible to use FinalIK (probably VRIK) to handle just rotating the torso, outside a Mecanim setup? You may be familiar with Rec Room, they have a really nice system where the body rotates to make sense with the head and arms rather than just being rooted to the head. Just wondering if I gave VRIK controller and HMD positions to work off could it do a decent job of just calculating say, a capsule for a torso?
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hey,
    Using a full body IK solver just for the torso would be such a waste of performance. You could try physics, link the torso rigidbody to the kinematic head rigidbody, might give you a nice effect if you set the joint up right.
     
  48. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    13
    Indeed, however I'm very tight for time which is why I'm not too bothered about some performance hits to get something that works well quickly. Ignoring the fact that it's a terrible idea, would it work in theory?
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,716
    Hey,
    Yeah, you'd still need a full body skeleton though, but that can be set up with just empty transforms arranged in a biped hierarchy.
     
  50. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    166
    Hi @Partel-Lang this seems like a really awesome asset.

    I'm curious before before I buy. I'm making a VR game and wanted to know if I could just use Final IK to have the lower body use normal walk/run animations while the upper body use hands and head for VR.

    Basically I don't want the head to drag the legs and feet around.. but I still want the player to bend down. However when they move I want the walking animation to kick in and take over (minus hands and head).

    Is that possible with Final IK?