Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    429
    Something weird happening here :D If I change my terrain layer from Default to Ground layer Grounder FBBIK script doesn't work correctly. I'm pretty sure setting between default and my ground layer is exactly same on project setting/physic ... and on the layer section of Grounder FBBIK it sets to everything.

    So everything is same between Default layer and my Ground layer why it works with default layer but not with my ground layer?
     
  2. paulodgn

    paulodgn

    Joined:
    Jul 19, 2016
    Posts:
    5
    @Partel-Lang hi, can i use Final IK to build a hand Rig? trying to find a solution to use with oculus Quest hand tracking
     
  3. beatdesign

    beatdesign

    Joined:
    Apr 3, 2015
    Posts:
    101
    Hello!
    I'd like to animate the right-hand effector position and rotation during a man that is running. I know how to do this in the "standard" mode:
    • The Effector transform is not a child of the Man root transform.
    • Press play, and during the animation of the man running, press pause at time T: set the Effector pos and orientation, and save its Transform values.
    • Press Stop, and add the Effector Keyframe at time T (I'm animating the effector inside the classic Animation Window).
    The problem is that this workflow is very frustating. Maybe there is a quick way to do that?
    For example, I found this reply form you:

    I tried to use EditorIK and it works, so my new workflow is:
    • The Man animation is played from a Timeline.
    • I set the Effector position as a child of the Man root transform, otherwise it would be too difficult to recalculate by hand all the absolute Effector positions if I'll use the same running animation for another Man in another position.
    • I scrub the timeline cursor at time T, when I want to move the Effector
    • I move the effector pos and rot, and I immediatly see the changes in the editor
    • Inside the Animation Window of the Effector, at time T, I add a keyframe with the same pos and rot of the current transform of the effector inside the scene.
    Everything works fine.
    My question is: is this the right way to go, or it is still a workaround and there is a simpler way to do everything?

    Thank you!
     
  4. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    95
    Hey Guys, just started using Final IK! Excited for all the amazing applications.

    What would be a good approach to get a 6 legged giant boss to walk on the ground on various terrain during his walk animation?

    Iv'e added Grounder IK to the Character, on the same Game-object as the Animator. Should I add CCDIK, or Limb IK, or Leg IK to each leg?

    There isn't really any Youtube tutorial of Final Ik being fully applied to a non biped/quardraped, as far as grounding the legs.

    Iv'e seen the 2 videos on the mechanics spider with 6 legs and I applied CCDIK to the Limbs, but the video is very short and does not show how to ground the 6 legged spiders legs.

    The other video is of a procedural walk animation on the same robot spider. Is there any tutorial on how to achieve this?

    Would I have to manually raycast to the ground from the feet to find the "Target" of the CCDIK component at runtime? Ir is there a built in way for a CCDIK/Leg IK/Limb Ik to seek the ground?

    I'm really not sure how this all works, I was hoping to read and learn, but the documentation does not explain anything about Grounder IK unfortunately.

    Grounding, aiming, and looking works out of the box with bipeds, so Im happy with that.
     
    Last edited: Apr 18, 2020
  5. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    14
    Hi all,

    first of all, Pärtel, thanks for the awesome asset and your seemingly never-ending patience answering questions! =)

    I fear mine will also be one that was asked time and time again, but I'm not able to find an answer in this thread or the documentation. Sorry for that in advance.

    Final IK works great and did so out of the box. And as long as my character is stationary, everything is peachy. But when I move her around, the effectors don't move along. Resulting in poses, where her limbs are pointing to the starting point of the character in the scene (as one would expect, if the effectors stay in one place *gg*).

    finalIK.png

    My setup is: one game object (see above: "Player_neu") that has all the scripts attached to it as well as the animator and parents the imported character with its armature.

    A workaround is, to create empty game objects as targets for each limb and the body and parent them to the said main player object. But that seems not to be the correct way to do it. Right?

    If anyone could point me in the right direction, it would be much appreciated.

    Cheers,
    Volkerror
     
    Last edited: Apr 20, 2020
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    What do you mean exactly by "doesn't work correctly" does it just not do anything or is it jittery or what does it look like?
    Please make sure if your character has any ragdoll colliders on it, that they are not included in Grounder's layers.

    Hey,
    Please import this package. It is a finger mapping tool that can map your avatar's fingers to any set of target fingers (including Quest hands) independent of bone orientation differences.

    Hey,
    I'm currently working on Timeline integration. It is still an early WIP and therefore undocumented, but the FBBIK part of it is usable already. The tool is called FinalDirector, you can get the package from here if you wanna try it early.
    Here's a workflow video of me using it to turn a sword hit animation into a spear thrust animation.

    Hey,
    About which IK component to use, depends on the model, can you share a screenshot or something?
    The mech spider use in the video is included in the project, please check out the "Mech Spider" demo. You might be able to use the same scripts (MechSpider.cs, MechSpiderLeg.cs) for your character, but they were developed just for demonstrating the IK, not as a universal tool for rigging all kinds of creature.

    Hey,
    The IK effector positions are defaulted to where their bones are at Start. After that they will not move on their own, they simply don't know where you want them to be or what you want to use them for unless you tell them.

    So before you weigh in position/rotation weight of an effector, you will have to set target position/rotation to where you want the hand or leg to be.

    If you told me more about what exactly you needed to do with IK, I will probably be able to give you a better answer and some more specific suggestions.

    Cheers,
    Pärtel
     
    ROBYER1 and volkerror like this.
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
  8. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    14
    Thanks for the super quick answer! And I am happy to hear, that it's not my setup, that is causing problems. Just me, as always not exactly knowing what I'm doing using a new asset (I may have joined in 2018, but am using Unity just over two month and Final IK since ... this morning... so....:-D).

    My "plan" is rather simple. I want to move around the character (via NevMeshAgent) and at a given position start an animation - picking up an item at the moment. The animation should be influenced by the effectors.

    My solution is having my player parent a bunch of game objects that are targets for the effectors. When the player moves, those game objects move along with the player (that was the subject my question above). On top of that, when the animation is fired, I use OnStateMachineEnter to change the Right Hand Effector Target and set its Position Weight to 1 (and back again when exiting the state).

    It *seems* to work, but I am not sure, if this is the right way to approach things and am afraid of f-ing up everything in the long run... as the window title in my screenshot above shows ... that ... uh... happened before in another context (don't ask me about installing github packages if you are as clueless as me *lol*).

    Cheers,
    Volker
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    You might wanna try the InteractionSystem, that was designed exactly for interacting with objects in the scene and picking stuff up and so on.

    Best,
    Pärtel
     
    volkerror likes this.
  10. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    14
    Cool! I'll look into that. Thanks again!

    And if I could bother you one last time with my initial question, because I think I have to solve this problem even when I use the interaction system ...is there something fundamentally wrong with my approach? =)

    Cheers,
    Volker
     
  11. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    177
    hello

    can i change Aim IK Target in runntime? (How)

    thanks


    ***************
    solved
    AIM Controller lol
     
    Last edited: Apr 22, 2020
  12. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    Maybe a bit unusual question.
    I'm using the lookAT IK to rotate an avatar's head and chest, and this works great twith a target gameObject.
    However, instead of a independent target, I would like to work with a rotation transform. Meaning the Ik lookAt target comes from a x and y rotation value. Any hints?
    Thx,Volker
     
  13. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    If you wanna start doing something with IK, you should first set IK target position-rotation to the object you want to move the hand to, then blend in IK position-rotation weight so the hand moves smoothly to that IK target.

    If you don't set IK target position-rotation, how would IK know where you want to move the hand? So it just uses the default position. If you need IK targets to be in character space and move along with the character, assign a gameobject as IK target and parent it to the root of the character.

    InteractionSystem already manages all that so you should not have to worry about it.

    Yeah, aim controller or this:
    Code (CSharp):
    1. aimIK.solver.target.position = something;
    Hey,
    Could do this:

    Code (CSharp):
    1. ik.solver.IKPosition = ik.solver.head.transform.position + Quaternion.Euler(pitch, yaw, 0f) * character.forward * lookAtDistance;
    Cheers,
    Pärtel
     
  14. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    Thanks Pärtel.
    This makes sense, having pitch and yaw as variables. However, I have no idea where to use this code fragment. Somewhere inside the IKSolverLookAt.cs or LookAtIK.cs scripts?
     
  15. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    26
    Hi! 2 questions:

    - If I want to use Final IK for a custom 8-legged model walk entirely procedurally, what would be the recommended method?

    -And, if I wanted to use premade animations but wanted to make sure its 8 legs walked with Inverse Kinematics, what would be the recommended procedure then?

    Thanks as always!

    Edit: I went ahead and tried to basically copy the CCD MechSpider setup, but my spider is not happy lol. See: https://i.imgur.com/qBqiOkv.mp4
    Any ideas?
    The model I'm using is a Spider I made in Blender with the legs already attached. Maybe CCD isn't meant for models that have legs attached??
     
    Last edited: Apr 27, 2020
  16. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    I figured it out, just by parenting and offsetting the target gameobject, I can use pitch and yaw control.
    Another question, can I make the body/root rotate along with the lookAt IK when the traget is moving towards behind the character? My character is only a torso with a spine-neck-head bones.
    Currently if the lookAtIK.JPG lookAtIK2.JPG target is moving towards behind the charcter it flips around.
     
  17. ml785

    ml785

    Joined:
    Dec 20, 2018
    Posts:
    26
    Hi, I have another question.
    When I hit play and hit movement keys, my character acts like it's getting dragged by that target I circled in red. I don't know what that target even is! I've tried changing the 'Foot' and removing/adding bones but it is still happening... Any ideas?
     
    Last edited: Apr 28, 2020
  18. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    428
    Hello, I'm having trouble getting Grounding to work for foot placement. I tried both the Biped IK and FBBIK setup and can't get either to work. I confirmed the bone references and ground layers have been properly set as per the manual and tutorials.

    The height offset seems to work (I can lower the character until the foot touches the ground) but past that none of the foot positions or rotations are adjusted (see picture).

    We're currently on Unity 2018.4.20f1 and Final IK 1.9 and make use of several StateMachineBehaviors. IK pass is enabled on 3 of our animation layers, so I disabled it in case it could interfere but it didn't help.

    All those colliders are gizmos and triggers only.
    upload_2020-4-28_14-35-19.png
     
    Last edited: Apr 28, 2020
  19. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    This is basically VRIK without most of the body and hands
     
  20. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    I sort of figured it out. LookAtIK Controller is my friend ;-)
    Don't think this one is documented,
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    MechSpider was designed just to demo the IK solvers, not as a universal spider rig, so it is difficult to make it work with your own spider. If you could send me what you have, I'd take a look and see if I can fix it for you.

    Hey,
    Do you have ground layers included in Grounder's "Layers" LayerMask? Also please make sure the character controller capsule's layer and ragdoll collider layers, if you have them, are not included in there. Also whatever those sphere colliders are on the feet, make sure they are not included either.

    Hey, glad you found it already, was about to suggest that. Or if you only need the root rotation part of it, can pull the RootRotation() method out of it into your own script.

    Cheers,
    Pärtel
     
    ml785 likes this.
  22. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    Would you mind "Or if you only need the root rotation part of it, can pull the RootRotation() method out of it into your own script." That would be great, the controller is a bit overkill.
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Here you go :)
    Just add it to your LookAtIK gameobject.
     
  24. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    94
    Thank you very much
     
  25. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    428
    All those colliders are on the "player" layer and NOT selected in the layer mask.
     
  26. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    282
    I was wondering, is there a reason why the Body Effector in the Full Body Biped IK doesn't have a Rotation Weight parameter like the old BipedIK component does with the Pelvis Solver?

    This would be extremely useful in my usage case, is there any way to get this functionality with FBBIK?
     
  27. FabianFranzen98

    FabianFranzen98

    Joined:
    Apr 30, 2020
    Posts:
    2
    Hi Pärtel,

    I just bought the package and I have a few questions in regards to retargeting the skeleton from a Motion Caption software to unity. You see the original Mechanim is very bad at retargeting the skeleton when you stream data from the MoCap software (Motive, using OptiTrack cameras), so I got a suggestion from their support team to use this package but I can't figure out how to utilize the package.
    Trying to stream both full body with active trackers and a VR HMD (HTC Vive Pro) and everything looks fine in Motive but for some reason it doesn't work in unity. I think i've somehow not deactivated Mechanim, but i can't figure out what the problem is or how to fix it. Any thoughts?
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    Could you send me a repro or something, maybe just a unitypackage with the character and your Grounder setup so I could take a closer look? Otherwise all I can do is guess.

    Hey,
    That is not supported by the algorithm, but can be done with a bit of additional code. Please check out the "Offset Effector" demo and try rotating the "Pelvis Effector" and "Spine Effector"

    Hey,
    I'm sorry I have no idea, never tried that and don't have the hardware to test it here. What is your IK setup, using VRIK?
    Do the gameobjects you assign as IK targets move?

    Best,
    Pärtel
     
  29. FabianFranzen98

    FabianFranzen98

    Joined:
    Apr 30, 2020
    Posts:
    2
    I'm using VRIK, I'm gonna try to follow the VRIK tutorial and experiment a bit. The gameobjects don't move properly either, but that might be because I haven't set the solver up properly
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    If the gameobjects don't move properly, that is something about whatever it is that makes them move. The IK only reads the position of the targets so that is not a problem with the IK solver.
     
  31. blobface

    blobface

    Joined:
    Mar 6, 2019
    Posts:
    6
    Hi Partel, thanks for all the work. I'm having some issue with the combination of VRIK (on the player) and AimIK (on the NPCs). This is specifically related to Fix Transforms.

    In my setup, there are multiple hitboxes which are child'ed to the bones of the player which are animated and moved around by VRIK, as they are detected by the NPC, they are all added to a list which decides which is the priority target. However, due to Fix Transforms being enabled on the player, NPC's aimIK.solver.target, despite being the correct player Transform (the prioritised hitbox), it ends up aiming at the "old" position because of Fix Transforms. If I turn that off on the player, the NPC now aims at the correct position when the editor is paused, but once it resumes, the VRIK no longer works properly with the player avatar constantly floating towards the sky. Is there anyway I could keep Fix Transforms turned on, but for the AimIK of the NPC to get the transform position of the target after it's been moved around by the IK solver instead of before? Screenshot attached to hopefully help illustrate the problem I've got. Thanks in advance.
     

    Attached Files:

    Last edited: May 4, 2020
  32. F1nches

    F1nches

    Joined:
    Apr 26, 2018
    Posts:
    4
    Hi @Partel-Lang

    Rather new to Unity but not C#. Interested in buying this asset.

    Is this asset something I can use with a baked walking animation on a spider to get it to smoothly climb upside down and vertically on mesh colliders in my scene (like climbing up a pole to the ceiling)? Like... Is this something that can move the end of a leg bone in the armature to a mesh surface without respect to gravity and could therefore move a spider in any orientation of a defined mesh contact layer?

    What would be required to accomplish something like this?

    Thanks.
     
    Last edited: May 6, 2020
  33. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    67
    Is there a simple way to just use leg locomotion? I cant seem to get the legs to walk like they do in VRIK. I want it in non-VR. just the same leg locomotion, is this possible?
     
  34. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Hi @Partel-Lang! I was wondering how I would implement thumb-stick transportation with VRIK. I tried using the Oculus OVRPlayerController, but the movement of the legs feels extremely weird.
     
  35. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    It is a problem with the execution order of things. AimIK by default solves before VRIK, so at the time when AimIK reads the target positions (LateUpdate), they VRIK character is in it's default pose (set by Fix Transforms in Update).
    You could disable the VRIK component in Start() and call vrik.solver.Update() from LateUpdate(). Add the script that does it to a lower value than AimIK has in the Script Execution Order.

    Hey,
    Yes you can. In the Grounder scene there is an example of a spider-like bot. It can not climb walls, but with "Rotate Solver" enabled and "Root Rotation Weight" set to 0 in GrounderIK, it will consider character root's Y axis as up axis, so all you have to do is rotate the root's Y axis to the surface normal.

    No, can't do that, sorry. Only thing I can think of would be to set hand position/rotation weights to 0, then use a script like this to drive the head target:

    Code (CSharp):
    1. ik.solver.spine.headTarget.position = new Vector3(transform.position.x, ik.references.head.position.y, transform.position.z);
    in LateUpdate(), but I don't think that will give you very nice results.

    Hey, please check out this discussion here.

    Cheers,
    Pärtel
     
    CompuGeniusPrograms likes this.
  36. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    248
    Hey, are there any new features planned for final-IK, Is there a roadmap for it?
     
  37. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    I have no official public roadmap, but I do have new features I'm working on.. Stuff like Timeline support, tools for animating with FIK, UniversalHandPose for VR (posing hands to objects, hand casting)..
     
  38. beatdesign

    beatdesign

    Joined:
    Apr 3, 2015
    Posts:
    101
    This is GREAT.
    Keep up the good work, and thank you!
     
  39. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Thanks so much!
     
  40. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Hey @Partel-Lang, I have two questions. How would I scale the world/avatar of the player in VR to make everything the same ratio for players of all heights? Also, how would I hold a weapon or object with VRIK?
     
    Last edited: May 10, 2020
  41. chiblue3D

    chiblue3D

    Joined:
    Apr 25, 2012
    Posts:
    20
    I have a 2 handed weapon attached to my character and I am using hand poser interaction to place the second hand. Everything works wonderfully, until I use full body grounder, this then full body IK does not recaclulate the hand poser position based on how ground adjusted the body position. Is there something I can do to have the grounder reposition be effected before the hand poser interaction?
     
  42. gliealonso

    gliealonso

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

    I have been reading a few things about Photon in this forum, and I stumbled across a post you wrote about 2 years ago.

    upload_2020-5-9_23-54-19.png

    So, that was written a while ago, did anything change? Should I still try the way you suggested? I know you were using Photon 1 instead of 2, but besides that, anything important?

    What's the "ik.solver" in the code?

    And when you wrote empty gameobjects assigned as IK targets in VRIK that shouldn't parent to the root of the character, did you mean something like this? So it means I would have to set the positions and rotations of the the empty GOs as the same as the controllers and headset and then assign the empty GOs as VRIK targets?
    upload_2020-5-10_0-1-2.png

    And also that means I would have to put the character and the empty gameobjects all inside another gameobject, so then I can prefab and instantiate them, correct?


    Dude, I still can't believe I managed to release a VR game in a year ;D
    Thanks man,
    Gabriel.
     

    Attached Files:

  43. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    317
    can this asset be used on ai with multiple colliders?
     
  44. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    @Partel-Lang, is this thread deprecated?
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    The only way to have all avatars have the same height would be to raise the tracking space for shorter guys and lower it for taller ones. Basically adjust tracking space height offset so that camera matches the avatar's eyes.
    Then they would all appear equal, but the downside is that shorter guys would not reach to pick up stuff from the ground and the opposite for taller guys - they would find virtual ground closer than their actual floor.

    About picking objects up, you could just parent the object to the avatar's hand bone, play an animation of a grabbing hand pose to match the fingers to the object.

    Hey,
    No, don't think anything changed since that time, should still work like that. "ik" in the code is a reference to the VRIK component and ik.solver is the VRIK solver nested in the VRIK component.
    About the empty gameobject stuff, yes, your screenshot looks right (if this is the remote instance of the character). "headIKTarget" in that screenshot should be the headIKTargetProxy in the code.

    Hey, sorry, could you be more specific please, which colliders were you talking about?
    Final IK doesn't really care about colliders, it does IK on the bone level, just rotating some bones basically.

    Hey,
    No, I normally don't reply on weekends, sorry, got a family. Sometimes requests pile up too and takes a while to get back to everyone, what you see here is just a tip of the iceberg so to speak.

    Cheers,
    Pärtel
     
  46. gliealonso

    gliealonso

    Joined:
    Oct 21, 2018
    Posts:
    73
    Yeah, he replies constantly, don't worry =)
     
  47. RayDev100

    RayDev100

    Joined:
    Jan 25, 2020
    Posts:
    1
    Hello
    I am just getting to grips with Puppetmaster & FinalIK however Im really struggling with implementing Hit Reaction script for a combat game. The demo only uses raycast as opposed to colliders. I have tried to adapt but I just cant get it to work. The HitReaction is called on the collider that is placed on the head of the puppet, the OnCollision checks for limbs that may have collided. The part of the body that has been hit is the part I need the reaction for, in this instance the head


    void OnCollisionEnter(Collision col) // col is the fist thats colliding

    hitReaction.Hit(GetComponent<Collider>(), dir * hitForce, col.contacts[0].point);

    I know a few have asked for this before and I would love if anyone can help me. I just want colliders to activate the HitReaction script as opposed to raycasts

    Thanks
     

    Attached Files:

  48. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Hey @Partel-Lang. I set up my avatar using the VRIK Locomotion Scene you sent me to last week. The problem is, it jitters like crazy! How can I smooth the hands, so they looks natural?
     
  49. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    67
    Another question- I'd like to "mimic" another IK rig, but at a different scale. is that possible? in VRIK i mean, to have one IK rig sized properly, and another, larger stationary IK rig, like a robot or a mech, mimicking the motion.

    Similar to what i did a few years ago with my mocap suit here:
    https://www.twitch.tv/videos/273056516
     
  50. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,220
    Hey,
    If you already have a PuppetMaster rig, why do you need Final IK's HitReaction? That is just faking hits with IK. PuppetMaster should resolve the collisions automatically. Might need some tweaking in BehaviourPuppet, like reducing collision resistance.

    Hey,
    Was the demo that I sent you already jittering or did you change/add something and then it started to jitter? Asking because I can't see the jitters here. What do you have for Update Mode in Animator?

    Hey,
    Here you go:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using RootMotion.FinalIK;
    5.  
    6. public class CopyPastePose: MonoBehaviour {
    7.  
    8.     public VRIK ik;
    9.     [Tooltip("Copy Pose From")] public Animator copy;
    10.     [Tooltip("Paste Pose To")] public Animator paste;
    11.  
    12.     private HumanPose pose = new HumanPose();
    13.     private HumanPoseHandler copyHandler;
    14.     private HumanPoseHandler pasteHandler;
    15.  
    16.     private void Start()
    17.     {
    18.         // Construct handlers
    19.         copyHandler = new HumanPoseHandler(copy.avatar, copy.transform);
    20.         pasteHandler = new HumanPoseHandler(paste.avatar, paste.transform);
    21.  
    22.         // Register to get a call from VRIK after every time it updates
    23.         ik.solver.OnPostUpdate += AfterVRIKUpdate;
    24.     }
    25.  
    26.     // Called by VRIK
    27.     void AfterVRIKUpdate()
    28.     {
    29.         // Copy
    30.         copyHandler.GetHumanPose(ref pose);
    31.  
    32.         // Paste
    33.         pasteHandler.SetHumanPose(ref pose);
    34.     }
    35. }
    36.  
    Requires both to be Humanoids though.
    Cheers,
    Pärtel
     
unityunity