Inverse Kinematics

Everything about the development of Urho3D.

Re: Inverse Kinematics

PostPosted by cadaver » 10 Jun 2016, 14:06

Looks like excellent work.
User avatar
cadaver
Urho3D author
Urho3D author
 
Posts: 1802
Joined: 16 Jan 2014, 14:52
Location: Finland

Re: Inverse Kinematics

PostPosted by namic » 10 Jun 2016, 21:12

So excited to use this! :D

Is it possible to write a grounder with those effectors? e.g: https://www.youtube.com/watch?v=9MiZiaJorws

Also, how are rotation limits setup?
User avatar
namic
Some active
Some active
 
Posts: 64
Joined: 31 May 2015, 23:12

Re: Inverse Kinematics

PostPosted by TheComet » 10 Jun 2016, 22:26

Thanks guys!

namic wrote:Is it possible to write a grounder with those effectors? e.g: https://www.youtube.com/watch?v=9MiZiaJorws

Also, how are rotation limits setup?


Yes, grounders are the very reason why I started working on this in the first place. My dog model has 3 bones in each leg, so it was no longer a trivial trigonometric problem.

I'm thinking there are two possibilities to implement feet lifting off.
1) Be able to specify a weight from [0..1] on each effector to control how much influence the solved chain will have. This will allow you to specify 0 when the foot should lift off and 1 when the foot touches (and you'll also be able to blend between, which I think is an important feature).
2) It might be easier to just position the IK targets at the same position as the feet when they need to lift off of the ground. That way you won't need a weight parameter any more and the slight performance impact can be avoided.

Rotation limits are currently on the to-do list, along with pole targets. I will most likely try re-use the bullet constraint component for this purpose.
I'm a non-binary non-cis sexually fluid cephalopod identifying genderqueer mocha frappé latte
User avatar
TheComet
Active user
Active user
 
Posts: 122
Joined: 29 Jan 2014, 14:07
Location: Germany

Re: Inverse Kinematics

PostPosted by namic » 13 Jun 2016, 15:00

I'm dying to see the integration of this with ragdolls and animation! :D :D :D :D :D
User avatar
namic
Some active
Some active
 
Posts: 64
Joined: 31 May 2015, 23:12

Re: Inverse Kinematics

PostPosted by Lumak » 15 Jun 2016, 19:08

I like what you're doing with this. Keep it up!
Lumak
Have many posts
Have many posts
 
Posts: 425
Joined: 08 Jun 2015, 15:38

Re: Inverse Kinematics

PostPosted by TheComet » 23 Jun 2016, 00:41

The solver now supports arbitrary trees, so if you should feel so inclined, you can solve for something like this (although I wouldn't know why you'd want to):

Image

The point is the solver can handle anything you can throw at it.

Here is an in-editor screen shot of a two-effector one-subbase configuration:

Image

There is currently an issue with applying the solved angles back to the scene nodes correctly. I am working on fixing this.

Image
I'm a non-binary non-cis sexually fluid cephalopod identifying genderqueer mocha frappé latte
User avatar
TheComet
Active user
Active user
 
Posts: 122
Joined: 29 Jan 2014, 14:07
Location: Germany

Re: Inverse Kinematics

PostPosted by Modanung » 23 Jun 2016, 09:40

TheComet wrote:The solver now supports arbitrary trees, so if you should feel so inclined, you can solve for something like this (although I wouldn't know why you'd want to)

For On A Rainy Day-likes. :)
for (Person* p : people)
ΞΞΞΞp->StopUsingWindows("https://www.linuxmint.com");
User avatar
Modanung
Active user
Active user
 
Posts: 171
Joined: 22 Jan 2015, 14:53
Location: The Netherlands

Re: Inverse Kinematics

PostPosted by sabotage3d » 23 Jun 2016, 15:47

That is really cool feature for procedural creatures like in spore.
User avatar
sabotage3d
Have many posts
Have many posts
 
Posts: 515
Joined: 25 Oct 2014, 13:26

Re: Inverse Kinematics

PostPosted by George » 23 Nov 2016, 18:23

Hi,
This is the example to update the angle for forward kinematic. You would similarly applied it for every kinematic link on a chain.

Vector3 shoulderJoint = node_lArm->GetWorldPosition();
Vector3 elbow = node_elbow->GetWorldPosition();
Vector3 v1 = elbow - shoulderJoint;
Vector3 v2 = target - shoulderJoint;
v1.Normalize();
v2.Normalize();
Quaternion q;
q.FromRotationTo(v1, v2);

Quaternion q1 = node_lArm->GetWorldRotation();
Quaternion q2 = Quaternion( node_lArm->GetParent()->GetWorldRotation().Inverse());

node_lArm->SetRotation(q2*q*q1);



-------
You could also reset the rotation before those calculation to avoid drifting of the twist angles on the links using node_lArm->SetRotation(Quaternion());
User avatar
George
Some active
Some active
 
Posts: 54
Joined: 02 Aug 2015, 05:49

Re: Inverse Kinematics

PostPosted by Eugene » 27 Nov 2016, 18:45

That looks great! Any updates?
User avatar
Eugene
Some active
Some active
 
Posts: 62
Joined: 06 Jun 2016, 06:30
Location: Russia

PreviousNext

Return to Developer Talk

Who is online

Users browsing this forum: No registered users and 0 guests

cron