Rigging Bug when "Set Parent with automatic Weight"

Hello, It seems that my rigging didin’t work for the modelisation of my wrestler project.

I used the tool “SetParent with automatic weight”


Too much muscles, I attached the project file. Do you have some ideas why it didn’t work? It seems that there’s a bug with legs.
I’ll begin investigate.

Thank you for you help.

Rémi

Attachments

18rig.blend (534 KB)

I tried fixing a bunch of stuff, too tired to write everything I did though. You can check the blend file.
18rig a.blend (642 KB)

hummmm … DLed your file… opened it up… and it looks fine on my computer…

close out blender… shut down your computer… do a restart… open up file again…

see if that helps…

Hello, thank you for you help, I’ll try to open it again from my computer.

I’ll let you know how it’s work

Rémi

Hello Cyaoeu,

Thanks you for your modifications, it’s awesome!!!

I’m looking at the file tonight. I’ll play with it a long time

What major change did you do? It was my first rigging, what should i avoid in the futur?

Have a good evening, Rémi
:wink:

Woops, forgot about this, I’ll make a more detailed post what I changed tomorrow.

Thank you, that will be awesome:o. I’m looking at the model tonight that’s fun…

TLDR warning! :cool:

Object/armature orientation

If you add suzanne to the scene you will notice that its orientation is different, this is because your character is facing the wrong way.
To fix this, first select your mesh and Apply Object Transforms (rotation). Then change the mirror axis from Y to X in the mirror modifier. In edit mode, rotate 90 degrees along the z axis (with merge and clipping disabled), then reenable merge and clipping and move the mesh along the x axis until it merges together.

Next the armature, in object mode set the x transform to 0, then rotate the armature 90 degrees in the z axis so it lines up with the mesh. Also, it’s probably better if the character is not below the grid, so move the armature above the grid (along the z axis). Then apply object transforms (rotation and location).

Next the mesh again, in object mode move it up to match the armature (up and forward) then apply object transforms again.

Armature bones (edit bone)

You’ll have to name the bones. The bones on the left side of the screen should have a .r suffix, because they are the bones to the right from the character’s perspective. I’ll use _r and _l because I’m used to unreal engine 4. For the legs, Bone.001 to upleg_r, Bone.002 to lowleg_r, Cpied.L to ik_foot_r (or Cpied.R if you want), Bone.004 to foot_r. Then name the other side the same way but _l. Repeat this for the arms (your bones that say .L should be .R or _r or whatever).

When you have fixed the bone names, enable X-Axis Mirror in the Options tab to the left of the screen, then select all of the bones to the right of the middle of the screen (to the right of the head/spine bones etc), press the translate key (grab command) and press enter. Then your bones will be mirrored correctly.

Then, select the bones that are either IK bones or pole targets (C1bras.R, C1pied.R, Cpied.R/ik_foot_r, ik_hand_r and the mirrored bones) one by one and ensure that Deform is disabled in the bone panel.

Armature (pose mode)

For now just select all bones and clear transforms. (alt+r, alt+g etc)

Mesh (object mode)

Delete all vertex groups by clicking the black arrow in the Vertex Groups panel (under object data, vertex triangle icon) and choosing delete all groups.
Parent the mesh to the armature with automatic weights. Your mesh will look really twisted and strange but it’s fine for now.

Armature (edit mode)

Enable X-Axis Mirror (if it wasn’t). Now move the pole targets for the knees so they are actually in front of the legs. For the legs, select the tip of the bone between the upper and lower leg and move it slightly forward so they are bent forwards.

For the elbow, move the tip up and slighty back so there’s a slight curve. For the elbow pole targets, move them behind the arm itself. Also move the knee pole targets further away from the body.

Next, select all of the bones and do Recalculate Roll (search with spacebar) and choose global Z axis. Then, for every bone, set the roll to 0 degrees.

Armature (pose mode)

To fix the twisting, go to the IK constraints and change the pole angles. For me, -90 degrees worked for the legs, 0 and -180 for the arms.

Mesh (object+edit mode)

So I forgot to fix this, but since you made your model with a weird mirror, the wrong side is mirrored. To fix this, in object mode, apply the mirror modifier.

Then change to edit mode, select the middle edge loop by shift alt selecting a bunch of times on the loop right in the middle. Do Rip and press enter. Next select the part to the left of the screen by pressing L (Select Linked) and delete the vertices.

In object mode, add the mirror modifier again and put it at the top of the stack. Finally, there seems to be some strange mirroring going on with the vertex groups, I don’t really know why, but you can fix it by selecting all vertices, then clicking Remove in the vertex groups panel for each bone ending with .R/_r. You can also select the vertices for the legs/arms and do Remove for the middle bones (Ventre, Torse, Tete).

Armature (edit mode)

So now you probably want a hand bone, extrude one from the upper arm bone along the x axis.

Mesh (object+edit mode)

Make two new vertex groups and call them hand_l and hand_r (or whatever you named the bones). Then go to edit mode, select the hand vertices and do Remove from all groups in Vertex Groups. Then Assign them to the hand_l bone.

Armature (edit mode)

Now you need to parent the bones. Actually make a new bone first and call it root by doing Snap Cursor to Center and add a bone there and naming it root. Next, select all of the pole targets and IK targets and finally the hip bone, then parent them to the root bone with ctrl+p, keep offset.

Next, the legs, parent the upper legs to the hips with the same method. Finally parent the foot bones to the lower leg bones (with connected) and the arm bones to the torso (with keep offset).

Now the rig kind of works but you can do some things to clean it up. For the leg bones, make sure they are straight in the front view. Also you can make them a bit longer (upper leg and lower leg bones).

Oh right, I remembered why the vertex mirroring was strange, your mesh had incorrect normals, so select all vertices and do Recalculate Normals, then you can do automatic weights again and get really nice weights. You can make the upper arm bones a bit longer to make them act as a pseudo clavicle bone (and get nicer deformations). You can also enable Preserve Volume in the armature modifier to make deformations look better.

Object mode

The final thing you can do is to make some nice looking widgets for the IK targets. Make a cube in the center, call it wgt-cube or something and move it to a different layer.

Armature (pose mode)

You can select the IK foot target and go to the bone settings, then Custom Shape: under display, choose wgt-cube and enable wireframe. It will be pretty huge, so you can scale the cube mesh itself down (in edit mode) to make it look smaller. Do the same thing for the other IK foot target.

For the arms you can do the same thing or make a new mesh for them, usually you make a mesh that looks like a hand. Also you’ll notice that the IK hand targets are too far away from the body, you can go into edit mode, select the hand bone, do Cursor to Selected, select the IK hand target and do Selected to Cursor and it will snap to where it should be.

Then in edit mode for the mesh, select all vertices and do Faces: Smooth in Shading/UVs to the left. For the faces with wrong materials you can select those faces and in the material select screen pick a different material and click Assign.

That is pretty much it, maybe I forgot some stuff, this turned out a little bit disjointed, but you can say if you get stuck anywhere. You should try to recreate this yourself now to learn the techniques.

And a general “avoid this in the future thing”:

Always use mirroring in the X-axis for characters, and make sure you start with the right side of the screen (so the left side of the character from your perspective is getting mirrored).

Always name your stuff: bones, materials, whatever, they should have a name that makes sense to you. If you name bones correctly you can mirror them when editing them which makes things quite a lot easier.

Always have a parent-child hierarchy that makes sense: bones that have something to do with eachother should generally be parented. The exception is IK bones/pole targets, they can be parented to a root bone, and you can use that root bone to move the whole character.

Always make sure your transforms are zeroed out: rotation, scale and location for your meshes/armatures in object mode should be 0 (well, scale should be 1.000). Apply Object Transforms to do this.

Always make sure you bind useful keys so you know where they are: keys you use a lot should be easily accessible. For example I don’t use g for grab, r for rotate and s for scale or whatever, that makes no sense to me.

Anyway that’s a few things you can try to remember (and really everyone should remember). Now I’m done. :stuck_out_tongue:

Hello:eyebrowlift:, thanks you for all those explanations, i’ll try to do the model again tomorow!!

Suzanne is a good name for the character :eyebrowlift:

Have a good evening, Rémi

Hello,

I’m continuing playing with Suzanne.

I looked at your steps modifications, thanks you, I learned a lot.

Is there a reason why the mirror must be on X axis for all model, is it a standard or it can create bugs?

Now, i’m trying to animate the character. Do you know what should i do to improve relatationS between leg and Torso, and Arm and torso? Should I change the 3d mesh to keep the torso more stable?

I try by moving the bone a little and i’m playing with weight paint mode

Now, the torso gets a lot of deformation. I join here picture of Suzanne making the Jean Claude Van Damme Split.




It seems that the arm squeeze his fat torso.

Thanks you for your help,

Have a good afternoon.

Rémi
:slight_smile:

Is there a reason why the mirror must be on X axis for all model, is it a standard or it can create bugs?

Yes… there are several mirroring operations in Blender … not just one… and they all default to the X-axis…
thus if you don’t use the x-axis you stand a good chance of causing some issues later down the line…

not that you have to use the x-axis…

but avoiding as many problems later… well really… that is what you want…

Suzanne is a good name for the character

I suppose…
but I also suspect that Cyaoeu
was referring to Blenders monkey head model…
it’s name is Suzanne… (i’m not sure the origin of the name)
see here…

First off, Suzanne is actually the name of the blender monkey which you can add with shift+a, but if you want to use that name it’s fine. :stuck_out_tongue:

Anyway, for the mirror, you usually use mirroring on the x axis since most of the mirroring tools also use that, for example the bone mirroring. As far as I know there is no y symmetry or z symmetry.

Also some tools like Select Mirror only work on the x axis, however you will be able to do that on several axes in the next blender version. Most blender models will face that direction (in the y negative direction) so it’s probably good to get used to that.

For the weights, that’s because your model is pretty big and the bones are pretty small so the automatic weight painting doesn’t really work since it’s based on bone size. You don’t have any shoulder bones which is probably the main problem.

You could add those (clavicle bones) or, another way you could solve this is to select the vertices for the arms, then the torso vertex group in the vertex group panel and click Remove. Then you can manually paint some weight back if you need it.

Another way that I’m using with my models is to add bones that help with the automatic weight painting, so you could add bones next to the arms painting upwards, then parent them to the torso bone. They will move with the torso and just help with the automatic weight painting itself, so you can add those bones, then redo the parent with automatic weights and it should look better.

They will reduce the influence the arms have on the torso (stealing their weights there) and you can then move those bones to a separate bone group if they are in the way. You can also do the same thing for the legs (basically next to the hips above the legs) to make that deformation nicer as well. Then just parent those to the hips.

A final thing you could try is enabling Preserve Volume in the armature modifier, that may help a bit too.

Hello, thanks for your advices, Ok So Suzanne is the Monkey :yes:.

I’m trying to apply this advice to see how it’s working:
Another way that I’m using with my models is to add bones that help with the automatic weight painting, so you could add bones next to the arms painting upwards, then parent them to the torso bone. They will move with the torso and just help with the automatic weight painting itself, so you can add those bones, then redo the parent with automatic weights and it should look better.

I’m trying to get arm/torso connection like this character. It’s working perfectly: https://www.youtube.com/watch?v=cGvalWG8HBU

Have a good night, Rémi

Hello,

[QUOTE][QUOTE]testaddbones.blend (584 KB)
[/QUOTE][/QUOTE]
I playED with the character to improve movements, I join you the result.
What do you think about it?

I try to apply this advice for the torso:
“Another way that I’m using with my models is to add bones that help with the automatic weight painting,
so you could add bones next to the arms painting upwards, then parent them to the torso bone.
They will move with the torso and just help with the automatic weight painting itself,
so you can add those bones, then redo the parent with automatic weights and it should look better.”

Did I make it in the good way? The leg seems to change less the torso now.

For the arm, i change a little bit the mesh, i change the weight paint, and i moved the bone to try to make a sort of shoulder.

Do you know some tutorial to learn how to improve the final rigging of a character, i didn’t find much about it on internet. I don’t know much more how to get a better rig

Thank you for your help

Have a good week end

Rémi

I meant something like this: testaddbones a.blend (655 KB)

I copied the upper leg bones and changed the position slightly, then in pose mode selected the leg bones, hips and torso bones, selected the mesh, went into weight paint mode and opened the specials menu (w for me) and chose Assign Automatic from Bones. That is basically parenting the mesh to bones with automatic weights, but you can do it with fewer bones (so you don’t mess up weight painting you’ve done already).

If you move the legs you can see that the hips/torso are moving a lot less. Also when moving the hips from side to side the volume is preserved more. The leg deformation when raising the knee is pretty bad but that can be fixed with corrective shape keys. This took me like one minute to do so it’s much faster than weight painting for me.

For the improved rig, I don’t know. What do you want to improve in your rig? In my opinion the rig is good when you can do all the motions with the character that you want.

Hello,
Your method looks much faster than try to arrange the model in weight paint mode with the main armature. And it’s efficient :slight_smile:

To improove, i saw some bug around elbow when the arm s going to close. I’ll try to limit that with paint mode.
I’ll try to make the model dance. I’ll use that rig, it’s working good. I’ll make test in the next few days.

Thanks you for your help

Have a good week end, Rémi

Here’s some modifications I did to help improve your Rigg…

testaddbones_NorvMod_001.blend (1.42 MB)

I added a Root bone…
I parented the IK hands, IK feet, and Hip bone to the Root…

now when you want to move the whole character you just grab the Root bone and move it… and all other bones follow … this is a pretty standard way to Rigg…

Also I parented your Knee and Elbow Pole targets to their Respective Hands or Feet…

this method cuts down on the amount of corrective animation you have to… your simply rotate your IKfoot for example and the knee will follow along somewhat… (not always perfectly… but better than not moving in at all) plus you can still move the Pole Target from there if you need to make finer adjustments…

I also set your bones such that they display in wire frame…
this works better for not getting confused as to what is an object and what is a bone…

you can adjust this back and forth by selecting your Armature Rigg > Properties Panel > Object(the box icon) > Display > where it says “Textured” use the popup menu to change it to “wire”…

Also I turned on the “Axis” view for your bones…
those come in real handy…
you can get to that option by Selecting your Armature >…
Properties Panel > Object Data(the man Icon) > Display > check the box that says “Axis”

Anyway… hope that helps…

Hello Norvman, thank you for your tips, it’s help a lot.

It’s very good to use that method :
“I parented your Knee and Elbow Pole targets to their Respective Hands or Feet…”

Animation is much easier with it

Thank you, have a good week end:cool:

Rémi

Do you know some tutorial to learn how to improve the final rigging of a character, i didn’t find much about it on internet. I don’t know much more how to get a better rig

Yes absolutely…
I highly recomend this Rigging series… from Nathan Vegdahl

https://www.youtube.com/playlist?list=PL58E9A0927AB357EF