Загрузка видео...
Не удалось загрузить видео
Video explanation of how decomposed IK looks:
62,890 просмотров • 2 месяцев назад •via X (Twitter)
Комментарии: 39

Try it yourself:

This is pretty cool, but I'm having trouble understanding what the "decomposition" actually is? Intuitively, to me it looks like you solve the chain with target along the line between base and rest pose and then rotate whole thing towards the actual point?

Yes, that's it. Create a virtual goal along the chain vector at the correct distance and solve that first. Then rotate the whole chain, from the base, at the actual goal location.

Oh awesome, thank you for sharing this! I'm doing something similar for my biped IK - I align the whole chain in rest pose with the targets and then solve from there. The idea is that the bones have to do much less actual travel that way.

Yup. It's a simple trick that makes a massive difference.

Would love an expert opinion on this

this is the kind of stuff game devs need to be seeing, especially vr devs

Very cool! Perhaps you should give a gradient-descent style solver a look. It’s very easy to impose more constraints (eg joint limits, forbidden zones, etc) while retaining similar styles of movement.

Yup, that's the "Jacobian" class of solvers I mentioned. Very useful for constructing arbitrary constraint types.

We should at least give it a cool name like the Ritchie Solve...

That sounds more sophisticated than it is😅

compared to the clout einstein got for rephrasing someone elses work, you deserve it :)

I have done this a couple of times when naive Fabrik tend to mess up the general structure. Quite natural in nature like u mentioned

Im curious what the performance of this is like for iterative solvers like FABRIK. Do you see any noticable increase in # of iterations to approach the target? Especially if you introduce constraints that force the joint to bend only at its extremities

You usually need fewer iterations because it's easier to solve just for distance than distance+position.

Very cool! I think that's worth mentioning ontop of the visual improvements too

The way it acts is like how I learned to do IK by taking 2D solvers into 3D by aligning things onto a plane then doing what you need to get 2 the target. Never tried with fabric, playing with it you lose curving mobility in the process for things like tentacles.

my favorite method for simple chains is this doesn't require iterative solvers.

Congrats, you found rotational constraints.. 😁👌

This is much simpler than rotation limits.

So... this sounds like the chain effectively just lives on a plane, and you target that plane to the goal? This has been a common way of doing IK for decades though. Whats different?

Nothing about this requires the chain to be planar. As I stated, you decompose the solve into distance only and direction. Use IK for distance, and an aim for direction. That's all.

is it true that there are still edge cases where this fails? I imagine if the target distance is longer than the maximum length of the chain, then the pose will completely straighten out and become lost?

You still have to manage singularities. That doesn't change.

Thats looks fantastic, are you planning on posting the code at all? Could be really useful for robotics and games to reduce IK flipping

If you inspect the javascript on this page you can see the code. But there's not much to it. The IK solve stays exactly the same, it's just a different way of driving it.

Awesome thanks

@Frooxius wah, found something that might be handy (not sure if your already doing this in your fabrik implementation)

I'm barely starting with rigging is this like priority thing to learn .d

Most riggers are putting together existing solvers. This is more for animation programmers or anyone building their own solver.

oh got it im approaching more of a generalist perspective and seems like not my cup of tea lol still i love to see how the things work thanks

is this cheaper computationally than naively solving the entire chain? if so that's kind of genius

It is usually cheaper because you don't have to use stiffness to achieve a smooth chain which requires additional iterations.

Hey @Frooxius the irony that you are building an old system right now 😅

got a ques. What is a good way to handle spine posing with ik? For my past employer proj I did a bezier spline for positioning plus Rotation min frame to handle the twisting across the chain. Always felt like there is a better way. trying to tackle spines with xpbd next.

A good spline IK is a tricky thing. The issues usually arise from how to handle twist. My recommendation is to decompose the twist axes and derive a clean Euler angle from the controls. Then interpolate it along the spline. Euler angles are important here to avoid flipping from quaternion ambiguity at 180 degrees.

How do you solve the angles to achieve the desired/target distance in that first "phase"?

Using any IK solver. This technique works with any solver.

Nice trick! Sometimes it feels better than FABRIK, but sometimes it feels more unnatural (the whole chain moving even for small differences in the end effector)... I wonder if you can combine the two methods for a more robust and natural result...
