1
$\begingroup$

So I'm trying to make a rig for a minigun's ammunitions destined to be export to game engines.

I want to make a rig with both ends of the ammos parented to the gun and have a few bones hooked to a curve in beetween to animate physics. After a fiew researches, I found the IK spine constraint to be similar to my needs, but it doesn't support the tilt information from the curve.

There's a workaround found on deviantArt I tried to recreate (Here's the post), basically it says to use a plane mesh with as much subdivisions as there are bones in the IK spine, add a curve modifier on it so the mesh deforms accordingly, and add each vertices of the plane to a separate vertex group so our bones can use a locked track constraint and follow the rotation of the vertices.

In theory it works, but in practice it does something weird, the rotation of the plane do have some effect on the rig but it seems the rotation of the mesh don't have an absolute influence on the rig where it should, and the location of the vertices influence the rig rotation even tho it shouldn't??

enter image description here

The rotation works as intended

enter image description here

The location works too but have some effect on the rotation where it shouldn't (notice how the plane isn't tilted)

enter image description here

And with a combination of the two, the rotation has little to no effect, even tho the plane is extremely tilted

to summarize how it all works:

  1. Curve points hooked to control bones
  2. Drivers to control curve points tilt from control bones x axis
  3. Curve Modifier on a guide mesh to get tilt info from the curve at any given point
  4. Vertex group for each vertice in the guide mesh
  5. each DEF bone has an IK spine constraint to stuck to the curve and a locked track constraint targeting corresponding vertex group

Am I doing something wrong? Is there another way to do this?

I beg for blender masters wiseness as I spent days on this problem :,)

Here is the issue in an isolated file:

$\endgroup$

1 Answer 1

2
$\begingroup$

Oh my goodness, that was me, a long long time ago. And I wrote it for a version that's pretty old-- before 2.8.

Before I get deep into this, let me first say that you don't need (or probably, even want) a spline IK constraint on every bone in the chain. You only need it on the last bone in the chain.

I'm not sure if I gave bad advice, or if it worked back then, but the problem here is that in the case of IK, any constraints we have are evaluated prior to the IK, regardless of constraint order-- IK is its own system, separate from other constraints.

So in order to do this, we need another layer of bones. First, we'll follow the spline; then, a second layer of bones, parented to their counterparts in the spline IK, will locked track the vertex groups. Let's look on an armature with only 2 deforming bones instead of 70 :)

enter image description here

Here, Spline1 and Spline2 are involved in a spline IK; Child1 is parented to Spline1 and Child2 is parented to Spline2. The locked track constraints are on the Child bones. The spline bones are non-deforming; other than the final bone in the Spline chain, which has a spline IK constraint, the spline bones are unconstrained.

$\endgroup$
1
  • 1
    $\begingroup$ First of all, thanks a lot ! It finally worked ! And second, i'm flabbergasted by the coincidence, you were literaly the only person i found who adressed this ! xD $\endgroup$ Jun 19, 2023 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .