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

Finally, the final Inverse Kinematics solution for Unity has arrived! :smile:

Asset Store link

There are currently 28 (and counting) demo videos and tutorials about Final IK on the YouTube

Please visit the Asset Store page for more information.

If you have any questions at all, you can:

Thank you for reading and looking forward to working together,
Pärtel Lang

7 Likes

…and here are the first two tutorials to get you started:

1 Like

Bought it, looked at the provided examples and I’m very pleased with my purchase. Time to fidle with it and see how it can affect the overhaul look and feel of our game.

Thank you for the purchase, Cygnusprojects, can’t wait to see what you’ll make with it!:slight_smile:
If you have any questions, let me know

Cheers,
Pärtel

Damn hell, this is exactly what I was looking for!

Is it possible to to this with your plugin?:

It is a connection rod with a piston, both part of a combustion engine.
Please note that the piston is moving only along one axis.

(Would this also be possible with Unitys Physics Components?
It´s done in 3dsmax with a SplineIK-Solver.)

You’re a genius! I will be purchasing this in the near future, this is a must have!

pretty cool plugin !

take it in my package !!

The money to get this delight of movey stuff is apparently assured although could be anytime in the next month, but it is as inevitable as horde of adoring girls you will have swarming around you for such a mighty thing (100% going to happen)

Oh boy. Every once in awhile someone releases a must-have plugin into store. This is one of them.

Just the thing i need for my rift project. Bought it and love it, goodbye keyframe animations :slight_smile:
Gongratz on the release.

Purchased!

Price is perfect; value your time Partel, that’s how it’s done! :smile:

Cheers mate

You should not use IK nor physics for this particular case. While it is no problem for Trigonometric, Limb, CCD or FABRIK solvers to solve the position of the piston, this particular problem presents us with 2 singularity points: one when the rod is completely stretched out and the other exactly 180 degrees from that. At those points there is mathematically no way to tell which way to rotate, so you will have a continuity problem where you can’t control the spinning direction of the wheel. The same problem exists in mechanics, imagine, if the rod was fully stretched out or completely collapsed and you would suddenly apply huge pressure on the piston in the direction of the rod, you would simply blow up the engine. :slight_smile: You can try using physics, but I bet it will be just jittery and unstable.

If you can instead control the rig by spinning the wheel instead of moving the piston, the problem can be solved with simple trigonometry. Try this code:

using UnityEngine;
using System.Collections;

public class Piston : MonoBehaviour {

	public Transform root, bone1, bone2, bone3;

	void Update () {
		Vector3 B = Vector3.Project(bone2.position - bone1.position, root.up);

		float b = B.magnitude;
		if (Vector3.Dot(B, root.up) < 0f) b = -b;

		float c = Vector3.Distance(bone2.position, bone3.position);

		float a = Mathf.Acos(b/c) * Mathf.Rad2Deg;

		Quaternion rotation = Quaternion.AngleAxis(-a, root.right);

		bone2.transform.rotation = Quaternion.LookRotation(rotation * -root.up, bone2.transform.up);
		bone3.transform.rotation = Quaternion.LookRotation(root.forward, root.up);
	}
}

bone 1 should be the wheel, bone2 the middle joint, bone3 the last joint connected to the piston. Root is the parent of bone1, bone2 is the child of bone1 and bone3 is the child of bone2. All bones should be facing in the same direction (local forward axis towards the next bone).

rotate bone1 around to see how it works…

If you have more questions about this, just PM me, let’s keep this thread about Final IK :slight_smile:

Cheers,
Pärtel

3 Likes

Ahh yes like Steve said, i was extremely surprised at the price, very generous, a few things popping now asset wise that seem very sensible decisions and this is one

Hi again and thank You all! :smile:

I got a new tutorial video for you, check it out:

Cheers,
Pärtel

Wow. I currently have no practical use for this, but I am going to get it anyway just to make big procedural multi-leg robots. I’ll figure out what to do with them later. :wink:

Very nice work!

Congrats for the early beta release!
Yet another tech that will change Unity’s landscape!

Pärtel, I am answering to your reply on my little connection rod and piston setup.
You are completely right in every point and I forgot to say that it´s indeed the wheel that I am turning and the piston movement is the result
of the chain. So, your plugin would also be able to do this, right?

And thanks very much for your script. It´s tiny, it´s working, it´s magic to me as a beginner (never knew about Quaternion.LookRotation…)

You could get the piston rig running with Final IK so that you control it from the piston (because thats what IK does, it solves for the position), but that would present you with all the problems that I described earlier. But anyway, I’m glad I could help :slight_smile:

To the rest of you, thank You again, and check out the new tutorial. This one is about UMA integration and adding FBBIK in runtime:
https://www.youtube.com/watch?v=3droBqtPZkw

Cheers,
Pärtel

1 Like

Cheers Partel :slight_smile: That’s got a few bits of juicy code in there too :slight_smile:

One problem with attaching the FBBIK component at runtime when the UMA is generated, is that the Animator is very slow to start up. If your script builds an UMA and attaches FBBIK - you get 999+ warnings that the Animator isn’t initialised - and therefore FBBIK doesn’t grab all the references. Unfortunately, there seems to be no method of telling if the Animator is initialised or not (you can tell if it’s null or not - but that doesn’t help us here).
This is one thing that I’d really like to find a solution for, as even a blunt yield wait isn’t always perfect. It’s not a fault with FBBIK, but with the Animator. I’ve not found a way to fix this yet.

Google is full to overflowing with this error - lots of people having it in all sorts of situations.

I am very interested in this, but the performance worries me slightly. With 100 characters, you end up running at ~50 fps? The problem with this, for me - is that I will have a lot of characters on screen but I am scared that the IK system will eat all my available CPU, giving me no CPU left over for the actual game logic.

Would it be possible to see a video or screenshot of how the Unity Profiler when running 100 characters?

Hmm… I’m adding FBBIK in code with AddComponent - but I’m getting endless errors:

The warning “FBIK Chain contains no nodes”, followed by endless
IndexOutOfRangeException in RootMotion.FinalIK.IKSolverFullBodyBiped.GetEffector on line 170

In the video you show how to add the FBBIK component by code - but it neatly skirts the the problem, by having to drop the umaCharacter onto the component in the Inspector. Trying to add FBBIK component post avatar generation is proving much harder :slight_smile:

I should add that when adding FBBIK component by code - FBBIK automatically gets it’s references list just fine :slight_smile: