Relationships between bones and different vextex groups

Greetings, :smiley:

being a newbie in Blender rigging system, I am facing a particular problem:

what I want to do is, as a training, to animate a “minigun turret”, which I divided in 3 vertex groups in one mesh: “inf_body” (the whole mesh), “main_body” (cannon + loader) and “cannon” (cannon alone) -> every group has no link with the others though (no common vertex);
I assigned 1 bone to each of these groups, from a same armature.

This way, after the usual assignements / modifier sequence, I have each of my 3 groups moving with the hierarchy I desire. Except that when I move the bone of “main_body”, it indeed moves the loader and the cannon, but the cannon moves on a different axis and separates from the loader as the bone rotates. :frowning:

So my question is simple: how can I force the cannon to move on the same axis as the loader, since when I move the “inf_body” bone, there is no such problem?

Many thanks in advance. Tell me if you need pictures. :slight_smile:

I made some tests: when I delete the “cannon” bone or put right in the same place as the extremity of its parent bone, the rotation is good. But the problem then is that I cant select this third bone anymore, as it’s melted with its parent. And moving it, even a little bit, brings the problem back.

You may wonder why I dont simply separate the parts in meshes instead of vertex groups: I want to export this object into UDK, and I’ve heard that I need to have only one mesh for that.

Any help is welcome.

Actually, posting up the file would be best. Some of your descriptions don’t make sense to me, for example:

to animate a “minigun turret”, which I divided in 3 vertex groups in one mesh: “inf_body” (the whole mesh), “main_body” (cannon + loader) and “cannon” (cannon alone) -> every group has no link with the others though (no common vertex)

‘main_body’ vertex group (vg) is the cannon & loader, ‘cannon’ vg is cannon only. Then you say each group has no common vertices. How is that, if the vertices of the cannon are in both the main_body vg & in the cannon vg as well? Aren’t the cannon vertices in both groups?

Then would need to know what the bone hierarchy is & what the turret looks like, before I could understand what you are doing.

Sine you are exporting and need it to be one solid mesh, as you have stated you can’t separate out the mesh into different mesh objects. So you have to do the separation via vertex groups, as you are doing, but you can’t have the cannon vertices be in both the cannon vg and the main_body vg as you have stated you have done…

So posting the file so someone can look at it might be the best way to get help.


minigun.blend (657 KB)

Thanks for your attention. Here is the file.

What I meant by “no common vertex” is that each “object” forming a group (cannon, body, etc…) doesnt use a vertex from another in its structure, but groups do share some vertices.

My goal is to make the first bone “inferior_body” make rotate the whole on the Z axis; the second bone “main_body” to move the loader, its “arm” and the cannon on the Y axis; and the third bone “cannon” to make the cannon rotate on itself, on the X axis.

I’ll be waiting for your reply. :smiley:

PS: I read your last part about the fact that I cant have the same vertices in both groups, but then, how can I make some parts move by moving a “parent part” (like for instance, the loader moves with the base, as it does here by the way)?

Weight painting is quite strange too: the “inf_body” bone keeps moving everything although I paint the whole mesh to “weight 0”.

I’ve been experimentating the whole day, I’m starting to get tired of this and really need help. :spin:

Easiest way out of this:

  • separate the three meshes into three objects (Ctrl-A a couple of times until everything is deselected, then hover your mouse pointer over each mesh in turn, Ctrl-L to select, Ctrl-P to separate),
  • go into Pose Mode,
  • parent each object to its bone (Ctrl-P > Bone).

No weight painting, no confusion.

That my favorite way of doing this sort of thing too, but he can’t do that, read the 2nd post:

So you have to separate out the mesh by using vertex groups in the object data properties panel. In edit mode, select all the verts in the main_body vg and then select the inf_body vg and hit the remove button (all done in the vertex group panel). This will remove the loader & cannon vertices from the inf_body vg. Now do the same for the main_body vg, select all the cannon vg verts and remove them from the main_body vg. Now only the base of the mesh will be controlled by the inf_body bone, only the loader part of the mesh will be controlled by the main_body bone, and only the cannon will be controlled by the cannon bone.

It will work because of the parent-child relationship of the bones. The main_body bone is a child of the inf_body bone, so as the inf_body bone is moved, all the verts in it’s vg will move, because main_body bone is a child of the inf_body bone, that bone & it’s vg will move as well. Same thing for the cannon bone & it’s vg.

Try it out…



minigun.blend (587 KB)

Damn, it was so simple, and yet I spent so many hours and headaches on that… :eek: I guess that’s how one learns.

Thank you. A lot. It’s all clean now, I can move to the next step. :smiley: