How Maya calculates IK spline solvers offset attribute?

How Maya calculates IK spline solvers offset attribute?

cyberirakliD562D
Participant Participant
1,490 Views
4 Replies
Message 1 of 5

How Maya calculates IK spline solvers offset attribute?

cyberirakliD562D
Participant
Participant

I'm trying to understand how Ik spline Handle calculates it's offset attribute. My goal is get static joint chain while deforming spline curve and avoid "sliding" effect. This effect:

1.gif

 

I have some results but it's not 100% what I'm trying to achieve. If yo look closely you can see the joint chain moves. It has bouncing effect and if you move further the CV it moves. Here is the result:

 

2.gif

 

The math I'm using is : 

 

 

 

ikSpline.offset = (currentLength/initialLengt-1) * 
(1/currentLength/initialLengt )

 

 

 

 

And here is my node editor screenshot: 

 

3.jpeg

 

 

So, my question is how IK spline Handle calculates offset? How to make joint chain static only in translateX axis(curve direction) , when curve is deforming. 

This effect can be done by deforming opposite side of curve.

1,491 Views
4 Replies
Replies (4)
Message 2 of 5

Kahylan
Advisor
Advisor

Hi!

 

The offset attribute is the wrong way to approach your problem. Because the definition of the Offset attribute is that it determines the distance between the start of the curve and the first joint in the chain.

 

If I understand you correctly. You just want your entire chain to move. What you need for that is a Master Control.

 

To achieve a Master Control Setup you first need to have controls/deformers that are able to deform your entire curve. What you seem to have now, is a cluster that just deformst the first CV of your curve, but none of the other CV's of that curve have any deformation at all.

 

Normally in a Situation like this I would not use clusters but Joints instead. Have one joint where the Curve starts and one where the Curve Ends and then use skinning to have those two "Control Joints" deform the Curve. Then you can parent the Control Joints to individual Controls and those Controls to A Master Control which moves the Curve Statically. I attatched a Video of th Workflow I normally use.

 

I hope this helps!

Message 3 of 5

cyberirakliD562D
Participant
Participant
Hi,
thanks for reply and the video. I know perfectly how to create control curves for my rig. I'm not using clusters. If you look closely you'll see that actually I'm moving joints. What I need is that when curve deforms joint chain should stay 100% static in translateX axis(curve direction). Please look to my second gif. There is desired behavior but it moves little bit in X axis . I need to get rid of that movement.
Message 4 of 5

Kahylan
Advisor
Advisor

Oh sorry, I misunderstood you.

I don't really know how to achieve that, since I've never had to create a Setup like this. I'm not really sure what this setup is meant for tbh.

 

The "bounce" in your video looks like it is about the distance between cv[0] and cv[1] (the cv automatically created in 3rd degree curves), have you tried the same setup using a linear curve?

I'm just guessing here, but maybe the calculation that relaxes 3rd degree curves causes you problems when you separate cv[0] and cv[1].

 

You probably could also use a separate IK setup with 2 joints and an SC solver above the controljoints to get the functionality that you want. But that would also require introducing additional controls.

Message 5 of 5

cyberirakliD562D
Participant
Participant

Thanks but no, this does not solves my problem. Will keep trying with Motion Path nodes. The MP uses Uvalue to distribute transform on curve.  

0 Likes