FINAL IK - Full Body IK, Aim, Look At, FABRIK, CCD IK... [1.0 RELEASED]

Hi,
Do you have examples of Dogs and other animal quadrupeds being animated with IK? I’d like to be able to, in Scene View, use the Move tool on them and see them move their legs to adjust. This can be done with the CCDIK mechspider, but I don’t see Quadruped examples for this.

Hey,l
PhotonTransformView only syncs the Transform that it is attached to, it doesn’t sync the entire pose of the character.
Normally you would sync VRIK like this:

Owner:
normal VRIK setup with head and hand IK targets parented to the camera and hand controllers.

Remote:
the same VRIK setup but IK targets parented to the root of the character instead. Position and rotation of those IK targets should be synced from owner to remote instances via OnPhotonSerializeView().
If using VRIK’s built-in procedural locomotion, it will follow the synced head target position the same way as it does on the owner.
If using animated locomotion sync position/rotation of the root with OnPhotonSerializeView() and sync animation too.
I would not use PhotonTransformView for the root as those network packages might arrive at different times/frequencies and you’d see head/hands jittering or out of sync with the position of the root and when you teleport, you might see the character’s root at before teleport position and head/hands reaching to the new position for a few frames. That’s why it is important to have all synchronization done with OnPhotonSerializeView().

Hey,

  1. No, it doesn’t have to be on the roll bone, but you can have multiple TwistRelaxers on that arm to even out the twist angles some more. Please import this package, I have restructured TwistRelaxer for the next version to support that.
    You can now add multiple solvers to one TwistRelaxer, add them in inverse hierarchical order - children first.

  2. Maybe this package helps? It is a script called HeadStabilizer, I made it for full body FPS to stabilize the head moving too much because of animation, but might help you with what you need to do too.

Hey,
There is HandPoser (add it to the hand bone), that can match the fingers to an identical posed hierarchy. So make a duplicate of the character, pose the duplicate’s fingers to the gun, delete the rest of the duplicate hierarchy from hand-up. Assign the posed hand as “Pose Root” in HandPoser. There is also GenericPoser if the hierarchies are not identical in child numbers (right-click on it’s header and do “Auto-Mapping” if you have Pose Root assigned.
It is not a very easy thing to work with though, I am still developing a proper solution for the hands and fingers (UniversalHandPose).

Of course you could also use animation. You can add Animators to the hand bones, use Animation Window to create pose animations for the hand hierarchies. It will run on top of your normal animation.

For a 2-handed weapon, you’d need to pose hand targets and HandPosers for both left and right hands.
Parent the posed hand hierarchies to the weapon. Parent the weapon to right hand controller, then assign the posed hands as IK targets and Pose Roots in the HandPoser/GenericPoser.

Hey,
I don’t have examples of them being animated fully by IK, sorry, but there is a GrounderQuadruped example in the “Grounder” demo, if you switch to the Wolf. That is just foot placement correction.

Cheers,
Pärtel

1 Like

Can you perhaps point me towards some documentation or code? I’m pretty new to Photon.

How do I “assign the posed hands as IK targets”?

Hi @Partel-Lang . What’s the best way to “lock” the hips under the VR cam so the hips don’t trail behind the camera. See pic or video. Thanks…
https://drive.google.com/open?id=19Qn3D8VkuEHrRUClf9UVZwaNNVuAXzam

Hey,
Made this demo package for you, it is a VRIK Photon networking demo. Import PUN and Oculus Integration first.
NetworkManager.cs just instantiates the player prefab, VRIK_Pun_Player.cs does all the syncing, read the comments and tooltips for more information. NetworkTransform is a snapshot of Transform.position, rotation, velocity and angular velocity, used for syncing IK targets. NetworkTransform data is the only thing synced over the net, it also takes care of interpolation for you.

Just assign the posed hand Transform as IK target in VRIK arm settings.

Hey,
Is that with the built-in procedural locomotion? It doesn’t handle moving from A-B very well, it was designed in the early days of VR when there was no room-scale yet. I’d switch for animated locomotion.
But you could try slightly increasing the “Max Velocity” and “Velocity Factor” in Locomotion settings.

Cheers,
Pärtel

Thanks so much! I am so happy I decided to buy this asset!

1 Like

Does FINAL IK have an animated locomotion example? Or is it up to us to add the leg animations? Thanks.

The package was meant for Photon 1 I think, but I converted it to Photon 2 pretty easily.

hi
i tried to use interaction sitting in a Bench and worked well, but i have a question. Can use an animation for upper body? I try, but how the position is predefined the upper body don’t move

thanks

5893199--628445--setarse.JPG

Hey there,

For the wrist twisting, it will never be perfect if the the character model doesn’t have a bone that rotates the lower arm.

In this asset pack, the author made sure to put a bone between the lower arms and hands and it works perfectly with twist relaxer:
[https://assetstore.unity.com/packages/3d/characters/humanoids/pbr-fighters-pack-145995

So if you’re gonna use VRIK for a game, make sure the model has that extra bone between the lower arms and hands.](https://assetstore.unity.com/packages/3d/characters/humanoids/pbr-fighters-pack-145995)

Gabriel.

1 Like

Hey,
All I have right now is this demo. Would work better with better animations.

Hey,
The upper body seems locked because the hands and shoulders are used in interaction too, so they will be pinned to the bench by the IK. You should change the InteractionTrigger under Bench/Trigger to this:
5895428--628766--BenchTrigger.JPG

…to start the interaction without any upper body effectors.

Best,
Pärtel

It seems that with this package, my character controller goes much slower. Do you have any idea why? Besides that, it works perfectly (after I switched it to PUN 2)

Don’t i put the controller target there? How do I put two targets?

Hi Pärtel,

  • Are we talking about something like this?
            TwistSolver handTwistSolver = new TwistSolver();
            handTwistSolver.transform = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftHand);
            handTwistSolver.parent = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftLowerArm);
            Transform[] handChildTransforms =
            {
                _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftThumbProximal), _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftIndexProximal),
                _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftMiddleProximal), _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftRingProximal),
                _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftLittleProximal)
            };
            handTwistSolver.children = handChildTransforms;

            TwistSolver elbowTwistSolver = new TwistSolver();
            elbowTwistSolver.transform = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftLowerArm);
            elbowTwistSolver.parent = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftUpperArm);
            Transform[] elbowChildTransforms = {_targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftHand)};
            elbowTwistSolver.children = elbowChildTransforms;

            TwistSolver shoulderTwistSolver = new TwistSolver();
            shoulderTwistSolver.transform = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftUpperArm);
            shoulderTwistSolver.parent = _targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftShoulder);
            Transform[] shoulderChildTransforms = {_targetAvatarAnimator.GetBoneTransform(HumanBodyBones.LeftLowerArm)};
            shoulderTwistSolver.children = shoulderChildTransforms;

            _leftArmTwistRelaxer = _targetAvatar.AddComponent<TwistRelaxer>();
            _leftArmTwistRelaxer.ik = _leftArmIk;

            TwistSolver[] twistSolvers = {handTwistSolver, elbowTwistSolver, shoulderTwistSolver};
            _leftArmTwistRelaxer.twistSolvers = twistSolvers;

            _rightArmTwistRelaxer = _targetAvatar.AddComponent<TwistRelaxer>();

It still solves the problem only partially but might be that the problem is just not solvable with this approach and it’s a skinning issue. But is the order correct?

  • Thanks! That solves the Problem!

since using root motion on my ai the final ik quad grounder is not working with my ai any ideas?

Hi Partel! I’m stuck trying to tune a couple features.

One is the mech spider in the CCDIK example scene. The velocity estimation does not appear to do anything. I’m using the velocity estimation in VRIK and it works pretty well, so I was hoping the spider example would have the same feature to help keep non-humanoid leg movements from dragging behind the body at high speeds. I haven’t had any success with it, other than some odd floating behavior occurring at much higher values.

My next issue is with VRIK locomotion causing head bobbing. I would like to increase the height that each foot reaches in each step for a character. I assume this is the “Step Height” setting under each leg in the VRIK component which achieves this, but it also makes my entire character bob up and down. This also disconnects the head from the HMD position (the hands remain locked to the controllers however). Is there a way to increase step height without affecting any upper body parts at all? I’ve tried using all of the positional weight settings, locking the pelvis, removing references but it still moves with each step.

Hey so maybe im misunderstanding something, but VRIK has completely stopped working for me. I have no idea whats supposed to go in the Root now, it was working fine originally but now anytime i add something to the root, it either cant be moved or it just starts walking off sideways forever. Tried reimporting, but i just cant get it to work.

Is there a way to stop my root from getting all messed up? Like it wont let the root object move, it just warps it back to starting position.

Hey, sorry for the wait!

Not sure, what kind of a character controller are you using? Maybe it is the interpolation, try to increase NetworkTransform interpolation speed.

Hey,
This is how I would do it:

  1. Have VRIK hand target parented to the hand controller.
  2. Pose and parent hand hierarchy to the weapon.
  3. If grabbing the weapon (like when Touch controller grab trigger down), use LateUpdate to tween the IK target to the position and rotation of the hand that is parented to the weapon. So the VRIK target would still be parented to the controller, but it’s position/rotation locked to the hand pose.
  4. When you let go, tween the VRIK hand target back to it’s default localPosition/localRotation so it would be free to move with the controller again.

Hey,
Yes, but you don’t need to normally set twistsolver parent and children, they will be found by TwistSolver when it initiates. You only need to assign children when the hand is not parented to the roll bone. Some rigs have this kind of hiearchy:

  • forearm
  • forearm roll bone
  • hand

Then if you added TwistRelaxer to forearm roll bone, you would have to manually assign the hand into it’s “children”.
If you had twistrelaxer on forearm, you’d have to assign both roll bone and hand as children.
But it you have this:

  • forearm
  • forearm roll bone
  • hand

Then you can leave them empty as TwistRelaxer can find them easily.

Hey,
Could you be more specific please, is it just not doing anything or is it doing something wrong? Can you make a video or something I could take a closer look at?

Hey,

About the spider, please import this update. Then, when you make it faster, also will have to reduce “Min Delay” for the feet and “Step Speed”. For example if I set Speed to 20 in MechSpiderController, then I would set Min Delay to 0.02, step speed to 10 and velocity prediction to 0.2. It will take some tweaking of those variables, MechSpider is just an example script to demonstrate the IK, wasn’t really designed for rigging up all kinds of spiders.

About VRIK, please grab this patch. You’ll get a “Max Body Y Offset” variable in VRIK locomotion settings. If you set it to 0, you’ll get 0 head bob.

Hey,
What did you mean by adding something to the root? Sure you don’t have your IK targets parented to the character hierarchy? That would cause circular dependency like the IK following the IK targets and locomotion then moving the IK targets further away again.

Cheers,
Pärtel

I mean in the References, where i put the bone hierarchy- the top one, Root, depending on whats there it wont let the master object move. Like it will actively resists any force being applied