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

    fup

    Joined:
    Jan 18, 2016
    Posts:
    76
    I second that! :)
     
  2. tauceti38

    tauceti38

    Joined:
    Sep 20, 2013
    Posts:
    15
    Hi Partel,

    Thanks for releasing the VRIK update. I'm struggling to create an UMA avatar that's seated in a chair. Do you have any suggestions or examples of how to do this? I need the legs to be fixed in a specific position, but the upper body to be animated based on the HMD position and two controller positions (the HTC Vive). I've been able to make some progress with the upper body, but the legs refuse to align correctly. I've positioned them using the leg targets, and the right leg works but the left is bent weird, like the left knee wants to be wear the right knee is. I've tried addressing this with bend targets, but this has not helped. Locomotion weight is set to 0, and the spine is fixed at the base of the chair.

    The legs also rotate when the HMD is turned. I assume this is related to the character orientation being linked to the HMD orientation (as mentioned in a post above). Is it possible to turn this off for the legs? I'd still like the spine to be rotated with the HMD, but the legs need to stay locked in place.

    I've adding VRIK at runtime using the following code: Avatar is a standard UMA avatar, created at runtime.
    Code (csharp):
    1. ik = avatar.AddComponent<VRIK>();
    2. VRIK.References references = new VRIK.References();
    3. VRIK.References.AutoDetectReferences(avatar.transform, out references);
    4. ik.references = references;
    5. ik.solver.locomotion.weight = 0f;
    6.  
    7. ik.solver.spine.headTarget = HeadEffector;
    8. ik.solver.spine.positionWeight = 1.0f;
    9. ik.solver.spine.rotationWeight = 1.0f;
    10.  
    11. ik.solver.spine.pelvisTarget = BodyEffector;
    12. ik.solver.spine.pelvisPositionWeight = 1.0f;
    13.  
    14. ik.solver.leftArm.target = LeftHandEffector;
    15. ik.solver.leftArm.positionWeight = 1.0f;
    16. ik.solver.leftArm.rotationWeight = 1.0f;
    17.  
    18. ik.solver.rightArm.target = RightHandEffector;
    19. ik.solver.rightArm.positionWeight = 1.0f;
    20. ik.solver.rightArm.rotationWeight = 1.0f;
    21.  
    22. ik.solver.leftLeg.target = LeftFootEffector;
    23. ik.solver.leftLeg.positionWeight = 1.0f;
    24. ik.solver.leftLeg.rotationWeight = 1.0f;
    25.  
    26. ik.solver.rightLeg.target = RightFootEffector;
    27. ik.solver.rightLeg.positionWeight = 1.0f;
    28. ik.solver.rightLeg.rotationWeight = 1.0f;
    29.  
    Here are two photos. The one on the left has the feet anchored in the desired position. The one of the right has the foot moved over, to illustrate how the knee is bending.

    Legs.png

    Thanks! Any advice would be appreciated.
     
    ROBYER1 likes this.
  3. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    @Partel-Lang I was able to solve all the problems with camera, head and hands now using your example scene as a start. But I have one problem left. Currently the body movement looks like it is dragged by head. Which is true of course. What happens - if I move backward, or sidesteps at fast walk speed the body bends quite a lot, I can see my chest and legs as someone is dragging it.
    Is it possible to stop the body from bending. And increase feet distance / time between steps (as someone running)
    Could you give an example how to do that? I tried all the body settings but wasn't able to achieve any good result.
     
  4. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Hi again, still same issue. Grounder still reacts to triggers.
     
    Last edited: Dec 21, 2016
  5. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    305
    Hello Pärtel

    Im working on a VR project and I was able to set up a full body following the headset and wands, there is no problem with that, however I need to create different hand poses and transitions between them, for example palm, fist, pointing, thumbs up. The poses will be triggered by the press of a button, and come back to default on its release.

    What would be the best way to achieve this using Final IK.

    Thank you.
     
  6. Subzeroblack68

    Subzeroblack68

    Joined:
    Apr 3, 2014
    Posts:
    19
    After watching the video "Basics of Setting Up AimIK". I wanted to test some stuff out but might as well ask some questions in the meantime....

    1) If I want the Player to go into ragdoll, but want it to have the same controls as the Third Person Shooter demo scene... I assume I should follow the instructions for the Ragdoll Utility Scene and have "Apply IK on Ragdoll" checked off?

    2)If I have a TPS character and want to hide behind a barrier similar to Army of Two or Gears of War Id most likely have to follow the Interaction Trigger Scene Demo (bench). But if I want to shot over the barrier or around the wall how would I go about that?... I can only assume it would have to do with the Aim IK, or The Bench not "controlling the upper body?

    3) I was thinking it would nice to get the UFPS Asset, but curious before hand I wanted to know if you or anyone you know has integrated your Final IK with UFPS and how it has worked if so
     
  7. malrion

    malrion

    Joined:
    Dec 23, 2016
    Posts:
    10
    Hi Partel,

    First I wanted to thank you for creating such an awesome plugin. I was wondering if you could help me figure out why the VRIK solver makes Morph3d models look weird? As far as I know, I've done everything correctly, but if you look at this image, the model's right shoulder is sloped downwards at a weird angle. The only way I can fix this is by setting Shoulder Rotation Weight to 0. Either way (with shoulder rotation set to 1, or 0) when I make a full circle rotation along my shoulder, the right arm looks like it's being bent in the wrong way completely.

    Thanks in advance.

    upload_2016-12-22_17-46-16.png
     
    ROBYER1 likes this.
  8. malrion

    malrion

    Joined:
    Dec 23, 2016
    Posts:
    10
    Actually, it was the humanoid idle animator controller messing things up, removing that fixed it.
     
    hopeful likes this.
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi,
    I finally received and set up my Vive, so here's a Steam VR demo for VRIK. It has the camera set up at the eyes. I'll make a Steam VR tutorial ASAP.

    Hey,
    So the problem probably is that during solving process whatever bone the gun is parented to moves, so when it gets parented to the hand, it's not where it was before IK targets were set. Does it work if you set solver iteration count to 0? In that case hand effectors won't pull the body.

    Hey,
    Try setting solver iteration count to 0, in that case the hands won't pull the body, it will behave like BipedIK and be much faster. Also you could try setting ik.solver.FABRIKPass to false.

    About VRIK, set "Max Root Angle" to its max value, then you can have full control over the rotation of the root in your scripts.

    Hey,
    You should assing "Bend Goals" for the legs and set "Bend Goal Weight" to 1, that would fix the knees for you.

    Hey,
    Go to the locomotion settings, increase "Velocity Factor", "Max Velocity", "Step Threshold" and/or "Root Speed".
    If that is not enough, there is the "Offset" vector, that is basically the offset of the feet relative to the head. You could make a 2-liner that adjusts that offset based on the velocity of the HMD, like ik.solver.locomotion.offset = headVelocity * something;

    Hey,
    The Grounder reacts to triggerrs? That patch was about the InteractionSystem reacting to triggers.
    If you did mean the Grounder, try disabling "Queries Hit Triggers" in the Physics Settings of your project.

    Hey,
    The best way to achieve that is not with FIK, but with traditional animation. If you don't have hand animations, you could set up Animators on the hands and use Unity's Animation Window to animate them.

    In FIK there is the HandPoser tool, but you'd still have to animate the target pose.

    Hey,

    1. Yes, the Ragdoll Utility is for that, but if you just want to go to ragdoll from an IK'd pose, you don't need all the complexiti of the Ragdoll Utility. Just make sure you go to ragdoll after IK has solved (use LateUpdate to disable the Animator, make Rigidbodies non-kinematic and add your script to a later value than AimIK in the Script Execution Order).

    2. Doing that with the Interaction System sounds extremely complex.. It would be much more efficient to do that stuff with traditional animation and AimIK on top of that. Just need a hide behind a barrier animation clip.

    3. There's not much to do with IK in first person shooters. I've heard of people using FIK and UFPS together for whatever purpose though.

    Cheers,
    Pärtel
     
    montyfi likes this.
  10. LacunaCorp

    LacunaCorp

    Joined:
    Feb 15, 2015
    Posts:
    147
    Thanks Pärtel, that makes sense,

    I tried capping the solver iterations at 0 but I still have the same issue. The gun is parented to the UMA's right thigh, and all IK components are on the root (apart from the interaction objects and targets, of course). Is there a way to update the solver during the interaction so it can track the movement of the interaction target?
     
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey, I think I found a solution for you.
    Don't parent it to the thigh, parent it to the root of the character and use a script like this instead, add it to the object:

    Code (CSharp):
    1. public Transform target;
    2.  
    3.     private Vector3 localPosition;
    4.     private Quaternion localRotation = Quaternion.identity;
    5.     private Transform defaultParent;
    6.  
    7.     void Start() {
    8.         defaultParent = transform.parent;
    9.         localPosition = target.InverseTransformPoint (transform.position);
    10.         localRotation = Quaternion.Inverse (target.rotation) * transform.rotation;
    11.     }
    12.  
    13.     void LateUpdate() {
    14.         if (transform.parent != defaultParent)
    15.             return;
    16.  
    17.         transform.position = target.TransformPoint (localPosition);
    18.         transform.rotation = target.rotation * localRotation;
    19.     }
     
  12. fup

    fup

    Joined:
    Jan 18, 2016
    Posts:
    76
    That's awesome Partel. Many thanks!
     
  13. LacunaCorp

    LacunaCorp

    Joined:
    Feb 15, 2015
    Posts:
    147
    Hi Pärtel,

    Sorry for the belated response, I've been tied up the past couple of days. This was going to be my next move but I was hoping there was an offset/tracking update I could have used to keep my hierarchy more organised, this works just fine though. I actually ended up finding a significant physics problem while testing this which I only noticed because of the new setup, which I've only just fixed (really awkward issue). Anyhow something similar gives me intended result after I was finally able to wrap everything up.

    Thanks again,
    -Josh
     
    Partel-Lang likes this.
  14. pdq72

    pdq72

    Joined:
    Sep 29, 2013
    Posts:
    43
    Hi Partel,

    I am using Puppet Master and I just updated Unity from 5.4.1 to 5.5.0p3.

    You probably know this already, I had to add "using UnityEngine.Profiling" to PuppetMaster.cs to fix the following compiling error: "The name 'Profiler' does not exist in the current context". Just FYI for anyone else who gets that error.
     
  15. Supagoat

    Supagoat

    Joined:
    Jul 25, 2012
    Posts:
    13
    I have a problem that is related to my 3d modelling program (MOI3D) but is expressing itself with Final-IK and I'm hoping there's just a simple import setting in Unity that will fix this. As you can see from the screenshot below, when I set up a CCDIK and chain these 3 models together, the bone chain that Final-IK makes is offset from the models. If I do the same steps with Unity cubes, the chain works as expected so I know I'm building it right.

    I exported from MOI3D as FBX, and there really aren't any options on export that look like they'd be able to affect this. Easy fix or do I need to use a different modelling program?

     
  16. Supagoat

    Supagoat

    Joined:
    Jul 25, 2012
    Posts:
    13
    Well I tried importing to Blender and re-setting the origin to the geometry and that seems to have fixed it when imported into Unity. A pain, but I guess it works.
     
    Partel-Lang likes this.
  17. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    Hi, I seem to be struggling to get Grounder FBBIK to work with player-controlled characters that have the Nav Mesh Agent component active on them, so they cannot walk up steps. Would these objects still need to be defined as walkable in a baked Nav Mesh even though the character is being directly controlled by the player?
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Thanks, I am aware of the issue, I will release 0.6 soon enough so that will fix it ;)

    Hey,

    The NavMeshAgent should not be a problem for Grounder at all. How exactly is it not working? Did you check the layer mask in the solver?

    Cheers,
    Pärtel
     
  19. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    @Partel-Lang I tried in another scene with NavMeshAgent active and there was no problem, so the issue must only be in that particular scene. It really is only if the NavMeshAgent is active though - disable it and it works normally. Strange. I'll have to look around and see what I can do there, I might have to make an additional little slope collider if the character still can't climb the step.
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Are you sure the steps have colliders and those colliders are on a layer that is included in the Grounder's layer mask?
     
  21. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    Yes it is in the default layer.
    Anyway, this is now fixed, it was related to another script I had running on my character. Sorry about that, and thanks for trying to help.
     
    Partel-Lang likes this.
  22. frankalonso

    frankalonso

    Joined:
    Aug 3, 2015
    Posts:
    13
    I was looking into using CCD IK, and I was curious if it was possible to get the angles calculated by the CCD IK without applying it.

    Also, would it be possible to get those as angles (a number corresponding to the point within the rotation limit hinge - between the set min and max for that component) rather than the new proposed rotations?

    For example, if I had a 3 degree of freedom arm, instead of having CCD IK automatically adjust the arm, could I access the calculated angle values necessary to reach the target such as:
    Bone 1: 45 degrees
    Bone 2: -25 degrees
    Bone 3: 60 degrees
     
  23. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    I'm using VRIK and I'm facing an annoying issue that I cannot manage to fix. I'm using VRIK to animate networked player characters. This looks and works fine most of the time. However it becomes an issue if players are walking in real life while walking in-game. That makes them bent and lean and that looks just bad.

    Code (csharp):
    1.  
    2. if (isMoving) {
    3.    if (!anim.enabled) {
    4.      vrik.solver.locomotion.weight = 0;
    5.  
    6.      anim.enabled = true;
    7.    }
    8.  
    9.    vrik.solver.Reset ();
    10. } else {
    11.    anim.enabled = false;
    12.  
    13.    if (vrik.solver.locomotion.weight <= 0) {
    14.      vrik.solver.Reset ();
    15.  
    16.      vrik.solver.locomotion.weight = 1;
    17.    }
    18. }
    19.  
    As you can see in the code I'm playing an animation when they are moving and I also turn off the locomotion feature and I reset the IK solver. The same happens vice versa when they stop to move. Works fine unless they start to move in real life as well. That unfortunately happens very often and messes up the IK and causes leaning and bending issues.

    I guess this is caused by the fact that the locomotion feature is disabled and the head is changing position due to the movement in real life. That makes the IK to bent into that direction.

    What I need is that it calculates the IK for the hands but does not move the head (except for up and down).

    How can I achieve this?
     
    Last edited: Jan 6, 2017
  24. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    Hey Partel,
    Quick question - I have a FABRIK-ROOT chain with a chain for a character's spine and a child chain for each of his arms. It works well for getting his hands to the position of the IK targets, but I can't figure out the correct way to orient the hands to the targets. I'm trying to get it so the hands grip an object like a door handle, where the door handle is animated independently of the character.

    (My understanding is I can't use the Final IK interaction system unless I use FBBIK, and I can't use that because I need custom joint limits.)

    So far I tried just setting the orientation of the hands in LateUpdate to match the orientation of the handle, and I tried making the hands the IK targets (and parenting them to the door handle rather than the arms), seems like both of those approaches are incorrect. I'm happy to write code to get this working but I was hoping to get a tip about what the correct approach would be?
     
  25. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    I have the exact same problem with UMA Characters, except that I get this with the left shoulder!
    Did you find a solution? Do you use Unity 5.5? I'm sure it worked before, I wonder if it stop working when I upgraded.
    Partel, any help will be appreciated.
     
    Last edited: Jan 8, 2017
  26. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Its not that easy, as CCD has to sequentially rotate the bones to reach the final solution.
    But you could use a virtual chain, that is not visible to the eye, solve it and read the angles from there and then apply them where you need.
    You can get the angle around an axis by using Mathf.Atan2. There's an example in that link.

    Hey,
    I guess you could adjust the position of the root of the character while he is walking so that it is horizontally fixed to the position of the HMD, so that when the player moves, the root will move along, avoiding all the bending and leaning.

    Setting the rotation of the hands in LateUpdate is not working because FIK components are updating after your own scripts. Add your script to a higher value than FIK components in the Script Execution Order or use the ik.solver.OnPostUpdate delegate.

    Hi!
    Apparently Malrion found this solution:

    "Actually, it was the humanoid idle animator controller messing things up, removing that fixed it."

    Cheers,
    Pärtel
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi again,

    Here's the long overdue tutorial for setting up VRIK for Steam VR :)
     
  28. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    I already tried other animator but I always get the same result. Removing the animator doesn't make sense for me as it's a requirement for VRIK or I missed something.
    Anyway I found the problem, it's not related to the animator. This bug happen when the character is rotated when we add the VRIK component. This explain why Malrion get the problem on right shoulder and me on left, because I'm rotated -90 and he is rotated 90 (180 break both arms) :)
    To reproduce, simply open the vrik scene and rotate 90 degree left or right the character, and try to add the vrik component.

    Edit : After some testing the problem seem more complicated, It's not related to the starting rotation but to the current rotation of the character (adding two mirrors help me to find the problem while in game). So if the character look at 0 degree (related to the world rotation), no problem, but If I look at -90, 90 or 180, the arms get broken. So my thought is Malrion must have his mirror on the right and me on the left :)
     
    Last edited: Jan 9, 2017
  29. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hi, Pärtel, we have noticed that our IK behaves really strange one or two frames after spawn (its a mulitplayer game) We have debugged our networked variables that updates the IK and they are correct, we believe its a problem with internal state in Final IK, you interpolate the IK with the old position from before new spawn which is far, far away from new spawn. Can we somehow reset the internal state?
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey, I'll look into it.. Could you make me a screenshot of the "broken" arm please if possible?

    Hey,
    It's probably just that syncing IK targets is not in sync with moving the root of the character when the spawn/respawn happens. So the IK targets get set to the new position by and RPC or stream or whatever, but the root is still in the old position or vice versa. Network instantiation and RPCs don't necessarily reach everywhere at the same time and frame.

    That's why it is best to sync IK targets not in world space, but relative to the root of the character.
    So use root.InverseTransformPoint() when you send and root.TransformPoint() when you receive and keep the IK targets parented to the root of the character so they move whenever the root moves.

    Best,
    Pärtel
     
  31. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I have checked the root and the 3 tracked points (head and hands) both with debug log to console and with adding debug cubes to the points. The debug point sare presented correct without jumps, but the IK still jumps, thanks.

    But good points will see if I can rewrite our code. I see that you have written a VRIK turorial, nice will check it out.
    Have you started to look at grounding support etc?

    edit: We have pretty nice IK now with the old IK, but would really like the procedural locomotion when moving by room scale.

     
    Last edited: Jan 11, 2017
  32. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    No problem, here is an exemple for a 90° rotation (I used the exemple scene provided to avoid any conflict)


    It's really easy to reproduce:
    • Open the "VRIK (beta)" scene
    • Choose one character and remove his current VRIK component
    • Activate the animator component
    • Rotate character to 90°
    • Play
    • Add VRIK
    I found that disabling the animator component before playing in the editor and adding VRIK later seem to work.
    However, if the animator component has been started at least once, VRIK will not work correctly after being added.
    It's a problem for me as UMA generate the character and animator component at runtime. I tried to disable it just after it get added by UMA but unfortunatly it seem too late, even at the same fixed update.
     
    Last edited: Jan 11, 2017
  33. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,487
    Hi Pärtel,
    I would like to ask if Final IK can be used to make a human body do a backflip or somersault? Has this ever been tried or discussed? I want to add that sort of thing to my fps type game just for a fun thing, I suppose I could code body, feet and arm effectors to rotate 360 degrees on z axis or similar, would you approach this the same way? Any advice on how you would approach this would be much appreciated, or if final ik is not well suited to this that is ok too :)
     
  34. Bodkin

    Bodkin

    Joined:
    Jul 12, 2012
    Posts:
    11
    I see that you have a Hit Reaction script. Can that be used to create a push back effect. For instance, if you run into the IK character, he will get pushed away and try to walk back to his standing location? Something like:
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Thanks a lot for the repro steps, they were most useful!
    I have fixed the issue, please import this patch.

    Hey,
    Grounding is still best done with using 2 LimbIK components on top of VRIK and using GrounderIK with them.
    I'll work on an easier solution for future updates.

    Hi!
    You could just rotate the root of the character to backflip and then use FBBIK's effector position offsets (ik.solver.leftHandEffector.positionOffset += characterRoot.rotation * something) to modify the pose while doing that.

    Hey,
    All that in AC is done with just animation and when it comes to complex hit reactions like stepping back and stuff, it is still easier to do all that with animation than IK.

    Best,
    Pärtel
     
  36. manuel_rochon

    manuel_rochon

    Joined:
    Nov 9, 2015
    Posts:
    23
    Both work, thanks a lot Partel!
     
  37. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    Thanks Partel
    Thanks Partel, It's working now!
    However I now have some exceptions showing in the console from time to time:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. RootMotion.FinalIK.IKSolverVR+Footstep.Update (InterpolationMode interpolation, UnityEngine.Events.UnityEvent onStep) (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Solvers/IKSolverVRFootstep.cs:60)
    3. RootMotion.FinalIK.IKSolverVR+Locomotion.Solve (RootMotion.FinalIK.VirtualBone rootBone, RootMotion.FinalIK.Spine spine, RootMotion.FinalIK.Leg leftLeg, RootMotion.FinalIK.Leg rightLeg, RootMotion.FinalIK.Arm leftArm, RootMotion.FinalIK.Arm rightArm, UnityEngine.Vector3& leftFootPosition, UnityEngine.Vector3& rightFootPosition, UnityEngine.Quaternion& leftFootRotation, UnityEngine.Quaternion& rightFootRotation, System.Single& leftFootOffset, System.Single& rightFootOffset, System.Single& leftHeelOffset, System.Single& rightHeelOffset) (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Solvers/IKSolverVRLocomotion.cs:303)
    4. RootMotion.FinalIK.IKSolverVR.Solve () (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Solvers/IKSolverVR.cs:360)
    5. RootMotion.FinalIK.IKSolverVR.OnUpdate () (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Solvers/IKSolverVR.cs:277)
    6. RootMotion.FinalIK.IKSolver.Update () (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Solvers/IKSolver.cs:61)
    7. RootMotion.FinalIK.IK.UpdateSolver () (at Assets/_Packages/Characters/RootMotion/FinalIK/IK Components/IK.cs:27)
    8. RootMotion.SolverManager.LateUpdate () (at Assets/_Packages/Characters/RootMotion/Shared Scripts/SolverManager.cs:113)
    It seem that disabling the animator and re-enabling it again in the editor stop error from showing.
     
  38. Godmodemode

    Godmodemode

    Joined:
    Dec 6, 2016
    Posts:
    1
    Do you have youtube video about the new update features?
    Update (Beta 0.5):
    - Joint breaking, blowing up puppets piece by piece.
    - Demo about grabbing other puppets.
     
  39. pdq72

    pdq72

    Joined:
    Sep 29, 2013
    Posts:
    43
    I am using VRIK, and I still cannot for the life of me figure out how to use locomotion. How do you get the character moving. I'm using rift. I'm using the VRIK demo scene. This is what I have in the scene hierarchy:

    Pilot
    TrackingSpace Pilot
    -CenterEyeAnchor
    --VRCamera
    ---Head Target

    Whenever I try applying motion to the Pilot, the head gets left behind as it is parented to the TrackingSpace Pilot. I have tried parenting the TrackingSpace Pilot to the Pilot but that does not work.

    Any Ideas? I apologize in advance, just cannot seem to find a working solution from the forums.

    Thanks.
     
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    If you add
    Code (CSharp):
    1.  = new UnityEvent();
    to the end of lines 109 and 115 in IKSolverVRLocomotion.cs, will it fix it?

    Hey,

    Here's a video of blowing up puppets and here's one for grabbing other puppets.

    Hey,
    If you wish to move the character by any means other than the built in locomotion, set locomotion weight to 0,
    then you can parent both Pilot and TrackingSpace to a root gameobject and use that to move everything.

    Best,
    Pärtel
     
  41. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    Added the lines and it's working beautifully now :)
    Thanks for the fix!
     
  42. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
  43. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi,
    No, snakes are probably the only creatures Grounder can't solve. It has has no consideration for those middle bones.
    But it should be relatively easy to solve that with a script that starts from the head, makes a raycast down from the end of each bone and just rotates that bone so it points towards that hit point.
    Code (CSharp):
    1. bones[i].rotation = Quaternion.FromToRotation(bones[i + 1].position - bones[i].position, hit.point - bones[i].position) * bones[i].rotation;
    I've used that for crocodile tails, so I guess it should work nicely for snakes too.
    You might want to consider using SphereCast for smoother results, but 24 spherecasts might be too much for the CPU.

    Cheers,
    Pärtel
     
    Nadan likes this.
  44. manuel_rochon

    manuel_rochon

    Joined:
    Nov 9, 2015
    Posts:
    23
    Thanks Partel, that worked!
    Now, is there a way to have the VRIK hands pull on the rest of the body?

    Thanks!

    Manuel
     
  45. manuel_rochon

    manuel_rochon

    Joined:
    Nov 9, 2015
    Posts:
    23
    also, is there any way to gradually enable and disable the effect of pull. Changing the iteration count at runtime creates a jump in the solving. Ideally there would be a slider to control its effect.
    thanks!
     
  46. manuel_rochon

    manuel_rochon

    Joined:
    Nov 9, 2015
    Posts:
    23
    I don't understand the role of the arms pull sliders, they seem to do nothing.
     
  47. fek

    fek

    Joined:
    Sep 14, 2015
    Posts:
    13
    Hey there, Pärtel!

    Thank you so much for your work on Final IK. It really is astounding - easily the best plugin purchase I've made.

    I'm sure you get this a lot, but I couldn't find a FAQ or anything, so I'll ask it again: is there any chance that Final IK might be multithread compatible at some point?

    I know Unity API calls can only be made from the main thread, and since FIK uses a lot of Unity API calls / Unity classes, it's not possible to just throw FIK on its own thread in its current state. But would it eventually be possible for FIK to perform all the calculations on a mirrored copy of a skeleton (essentially using cloned classes: FIKTransform, FIKGameObject, etc.), then push/pull changes back and forth between the real skeleton / mirrored skeleton from the main thread, as needed?

    Thank you very much, again - your work is incredible!
     
  48. SirVoxelot

    SirVoxelot

    Joined:
    Feb 15, 2016
    Posts:
    4
    I noticed with exported maya FBX files, unity imports them with discarded joint orients and the bones are re-baked. how does final ik know what rotation plane to use for it's ik? or are mesh skeletons required to have extra bones to keep ik joints clean?
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    No, VRIK can't do that, you'll have to use the old FullBodyBipedIK and the FBBIKHeadEffector solution.

    That Pull parameter determines how much the limb is able to pull the root node and other limbs. If you set Pull to 1 for the left arm and 0 for all other limbs, you'll be able to drag that character by it's left arm to infinity without losing contact.
    But setting it to 0 will not keep the shoulder in place. You could try using the Reach slider instead.

    Hi and thanks! :)

    I've thought about multithreading some of the calculations done in the solvers, but the thing is, IK algorithms by nature are linear and sequential. Each calculation depends on the results of the previous one, so there's no way to multithread those. As of having the entire solver run on another thread, it's the same problem, animation is also a linear process. IK needs to be done with before the main thread is finished with the frame and I don't think that can be guaranteed when it runs on another thread.

    Hey,
    FIK components require a hierarchical bone structure, that is all. All skeletons can be solved, even if each bone has it's own random orientation, so don't worry about it. :)

    Best,
    Pärtel
     
  50. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    No idea if you still have that problem, but today I figured out that this has to do with the animation compression. When using FBBIK try to avoid keyframe reduction, the "optimal" setting should work without any animation stuttering.

    @Partel-Lang Maybe you could mention that somewhere in your faq, it's some of those bugs which costs hours of searching.