Big issue with rigging and weight paint

Hi there, I’m new here!
I hope this is the right forum to ask for help :slight_smile:
I’ve been trying to solve this problem for a week or so on my own because I wanted to be able to do it on my own, but I guess I’m way too inexperienced to fix it.
So, I’ve been working on my first character, it’s Sailor Moon, because I wanted to try and make a little game just to see if making games was something that would interest me, but I got stuck ar animating because my character’s (I created the head and attached it to a downloaded body that I edited) rig and weight paint won’t work the way I thought it would have.
I followed a tutorial on youtube on how to rig a character and how to weight paint it and I thought it was okay until I started moving the body parts. the biggest and main problem is between the clavicle bone and the upper arm. how can I describe it? when I rise her clavicle and arm, the arm looks competely dislocated while between the neck and the arm the mesh goes crazy.
I’ve tried to move the bones, edit the weight paint, erase the weight paint and did it all over again, but nothing, it’s completely wrong, and I can’t animate it if the body looks broken (because it’s creepy).
I’m uploading the blend so that you can see where the problem is and help me solve it, because right now I can’t understand which part/parts is creating this issue.
I had to move the body and head mesh in a different layer to work on the animation because it gets extremely slow with the dress, so you’ll see that the body is in a layer (upper right) and the rig is in another (upper left).
thanks to whoever is going to waste a little bit of time to help a beginner like me!
Blend file: https://drive.google.com/open?id=1pmvMChTUL_eYul3Yxj3PeEOzq9CaTFSO

Shoulders can be tricky.

The good news is, you’ve got good topology. Good job there.

First, think about bone placement. I notice your clavicles aren’t symmetrical, which is probably because you’ve been playing with bone placement on one side, but of course eventually they should be symmetrical.

Looking at Clavicle.L, I think the head of the bone is too far down, too much toward the center of the model, and too forward in the model. I just found a lot of good pics by googling “rigging bone placement clavicle” so I’d recommend doing that.

Now, on to the weights themselves. These weights are really, really sharp. That is, you have barely any transition between different bones. Your weights are also unnormalized, which is probably going to end up giving you trouble-- try running a normalize all in weight paint (don’t forget to uncheck default “lock active” in operator panel) and see how your colors change.

Shoulders are particularly hard to weight in my experience. It’s a good idea to start with autoweights, which you can get by selecting mesh, selecting armature, ctrl-p->armature deform with automatic weights. These often need some cleanup, but cleanup is way easier than manualy painting-- I usually just do a quick once-over on the bones with a multiply brush, set to weight 0, strength 1, using it as a linear gradient with alt LMB drag.

If you want to break through and keep working on your weight painting manually, you can do that. It’s good to get experience with it, although it can be very frustrating. But in that case, I’d recommend trying to weight paint a model with fewer vertices, because with a small enough vertex count, you’ll be able to weight each vertex individually and get a good grasp of what the numbers should be. Just, don’t try to run a decimate or something to make a lower poly: anything you animate needs good topology. (Once you’ve weight painted a lower poly, you can use that mesh deform a higher poly, or use a data transfer to copy weights from the lower to the higher poly models.)

well, thank you! I basically just used the automatic weights and she looks a lot less broken and way more normal! I also normalized the weights and moved the clavicle bone. I’m trying not to decimate the mesh, but it is really hard to animate a character if it takes ages to run the animation or simply to rotate a part of the body, that’s why I moved just the body without the dress into a separate layer and I also had to remove the hair. I have a pretty powerful laptop but blender runs at 1 fps ifI go over 40000 faces in a layer…
anyway, now that she moves better, I have to understand how to rotate the entire body without her arms moving on their own. she has to rotate 3 times in a row but everytime I rotate the entire rig, the arms are “left behind” and won’t stay in the same position.
thank you again!

It’s worth thinking about how different a decimate modifier is from an applied decimate modifier. Using a decimate modifier, without applying the modifier, doesn’t actually lead to any speed-up-- it actually slows things down, because every single frame, every time you pose a bone, it has to recalculate the decimate! (There can be exceptions, in rendering, but that’s rare.)

What happens when I run the animation on the file you provided? I get like 12 fps. What happens when I remove the decimate modifiers? All of a sudden, the animation is running at full speed (30 fps, could be more if I needed.)

For the most part, your models have good vertex counts. This level of detail should be animatable. The exceptions to that are some of the hair, on layers 2, 3, and 15. These hair meshes have a lot of loops that they don’t need. Combined, these hair meshes have several hundred thousand verts, while your body only has 8k verts. Consider making these much more simple, and if you need detail, learn how to use normal/bump maps (and how to bake them from existing meshes.)

The jewelry bits aren’t too high poly, but they could be optimized a lot as well-- basically, all of the detail you have on them could be emulated with normal maps and texture transparency on planes.

Also: be aware that out of everything, physics will slow down animation playback more than anything else. The rigid body physics you have are the fastest kind of physics, but even so, they’re going to slow down playback significantly. You can improve this speed by reducing properties/scene/rigid body world/solver iterations. Also note that, in 2.79, you’re going to have dependency problems by going bone1->object->bone2. Blender reads this as the armature is dependent on the object, and the object is dependent on the armature, and doesn’t know what to do. (If you upgrade to 2.8, which I’d recommend, it fixes this problem.)

The reason the arms are being “left behind” is because you’ve disabled “inherit rotation” in properties/bone/relations.

ok, so I fixed the arms being left behind (and I had to fix the entire animation afterwards), but now I’m getting a new problem. I finished the animation (it’s still pretty raw, but at least I managed to lay down the main movements) but at some point the hair get stuck.
first of all, I gave up on all the strands of hair since I started the animation, so I have been working with just one strand per side. after the 3rd turn she makes, when I look at the cubes and empties I made for the hair physics, the cubes stop moving and the empties follow the animation. I don’t get it.
moreover, Blender keeps on closing on its own without giving any heads up, without giving any hint at the possibility it could crash. it suddenly closes while I’m using it, no apparent reasons…

Is your rigid body world cache big enough for all frames of your animation? Look in properties/scene/rigid body world.

Regarding the crash, I’d update sooner rather than later to 2.8.

ok, things got even worse in Blender 2.8…
so, I’ve enabled in viewports the hair and now the hair physics was completely gone. the cubes and empties were completely rigid and still. I had to do the entire process again and now the hair cubes and bones follow the head but as if they were a single object and the entire body stopped moving with the animation, only the rig moves. I checked the weight paint and everything is okay. when I switch to weight paint, the body mesh takes the pose of the animation where it stopped, but when I play the animation again, the body stays in that position… before I “fixed” the hair, the body was moving with the animation though…

I erased every single hair bone, hair cube, hair empty and did it all over again. I just have to weight paint the hair and now it… “works”?
I fixed the hair freezing after the 250th frame by extending the cache, but the right strand acts like crazy. it moves on its own, it makes crazy movements as if it were a snake on drugs… the left strand is a snake that took less drugs than the right one, but still kinda crazy…
could you please see what’s wrong and explain it to me so that I won’t make the same mistake again?
Also, despite the body collider (the youtube tutorial said to make it passive, animated rigid body with mesh as shape collision), the hair keeps on phasing through the body…
Thank you and sorry for bothering!

On the file you gave me, the hair-- the long ponytails-- doesn’t work at all. That’s because it doesn’t have the right names. The armature’s bones are names like, “Hair2.L.BIS” or “Hair2.R.001” while the mesh has vertex groups like “Hair2LX4 copy”. The vertex groups are the weights-- they need to have the same names as the bones.

So I can’t see the issue with hair going crazy. However, what I’d suspect is that it’s because your bones don’t follow your mesh at all. On your weighted copy, disabled physics constraints temporarily (just save, then delete the constraints, go to a backup when you’re done) and look at what happens when you rotate those hair bones. Where the hair and the bones are in roughly the same place, the bones work. Where the hair and the bones are in totally different places, the hair is going to go wild. The mesh rotates around the bone its weighted to, and if that bone is far from the mesh, it rotates in a wide circle.

Regarding collision, try checking “deforming” on its physics. Note also that your collider mesh is messed up, doubled verts and such, and this is bad-- it needs proper normals, it needs to have a clear “inside” vs “outside”, which also means, plug holes.

But more, remember, it’s not colliding with the hair mesh, it’s colliding with those tiny cube rigid bodies, that aren’t getting rendered. Because your hair isn’t in the same spot as the rigid bodies, your hair can pass through the body even though the rigid bodies do not.

I actually don’t know why the hair is not working on the file I uploaded, but during the day I actually solved the problem.
once I deleted every cubes, empty and vertex groups and did it again, I noticed that there were some loose parts of the hair that I needed to delete and I forgot to increase the dampening for each cube (well, they are not cubes actually…) to 0.9 and the hair now works. I also changed the duplicate of the body from rigid body to collision, and the hair stopped fazing through it.
the thing is that when I’ve been trying for hours to solve something and I hit the desperation point, I ask for help. the desperation lasts 20 minutes, than, because I’m stubborn as hell, I start working on it again and most of the times I solve it before I get an answer.
Right now the problem I won’t be able to solve is that I can’t find any tutorial on how to make the clothes move, like clothing physics. I saw some videos about the Cloth physics and one that uses Soft Body, but when I use either one or the other, the animation plays at 1fps and Blender starts freezing repeatedly. I wanted to make the front and back bows and the skirt flow as she moves, but I really don’t know if it’s normal that Blender slows down like this.
furthermore, I tried to follow a tutorial on cloth physics where the guy pinned one vertice of the cloth and the rest fell down like actual cloth. when I did it with the knot of the front bow, the rest of the bow started expanding forward like crazy…
I haven’t even tried with the skirt, it would have been stupid…
I really don’t know how feasible it will be for me to finish this character if things go like this everytime I try to do something more.
anyway, it’s almost 2am here, maybe tomorrow it’ll go better, who knows!

So have you solved it?

Cloth physics are slow. That’s a fact of life. To do them well, IMO, means using special (very low poly, amongst other things), non-rendering meshes-- similar to how you have non-rendering, low poly rigid bodies for your hair.

Just because something is cloth doesn’t mean you have to use cloth physics. Your hair isn’t rigid body, but you’re using rigid body physics for it, right? You can use whatever type of physics you want. You should use cloth physics not because of the name, but because it moves like how you want-- and you can only learn how it moves by playing with it, probably with a simpler test bed than you have here.

Yeah, I solved the hair issue, it also collides with the body and doesn’t phase through it anymore. I also remade the hair mesh and went with something simpler and without those curves so that the boxes and the hair are similar in shape (I basically went back to the original sailor moon series kinda hair).
Obviously, a new problem appeared. I really can’t understand why (I’ve been trying to solve this problem all day) but one of the two hair ponytails started moving like crazy like it did with the old mesh. it moves in strange ways even when the character is still. last time I solved it by removing the loose vertices, but this time there are none. It looks again like a snake that’s having a seizure. I really hope I don’t need to erase the bones, boxes and empties and do the entire process again to solve it…
Also, how can I make the hair a little less pulled by gravity? is there a way to accomplish that?
about the clothes, I guess I’ll have to work with more bones and rigid body physics then, but in this case I need to find a way to keep the clothes where they are. I mean, if I use the rigid body on the ribbon, the sides will be pulled down, while I need it to stay where it is and move according to the movements of the body, I don’t know if that makes sense. I guess I’ll find a solution when I’ll try to do it, but still, I need the hair to move right, otherwise it would be useless to move to the next piece of clothing.
I’ll upload the blend file to let you see the hair problem, hoping it’s easy to solve.
I know I’m abusing of this community’s help, but I don’t know where to turn to…
Thank you!

I haven’t looked at the .blend.

When you’re having problems like you’re describing with your hair, you need to isolate exactly where in the chain the problem is happening. Your hair mesh is moving like crazy. Okay, and it’s being driven by bones, right? So are your bones also acting crazy? If they are, your bones are being driven by rigid bodies, right? So are the rigid bodies also acting crazy? You have to find the place where the problem is starting.

The easiest way to change the strength of gravity is properties/scene/gravity-- change the gravity vector (the strength of gravity). Rigid body physics don’t allow independently setting gravity. You can also use rigid body constraints or colliders in non-obvious ways-- it doesn’t all have to be realistic, if you want to connect your hair to a magic spring a mile in the air, you can do that.

I’ve already tried those steps. since the bones copy the rotation of the rigid bodies, they both act like crazy. I tried to increase the distance between the rigid bodies because I thought they didn’t have enough space to move freely, but it didn’t change. I moved everything a little further away from the body thinking they were hitting something, but still nothing. I moved and repositioned the empties, but nothing. I checked and compared the settings with the ponytail that works, but they are the same. I think the problem lies in the first two rigid bodies at the top because they are the first to move like crazy, but then again, the other rigid bodies/bones move in strange ways later. the first one basically rotates up without any reason and the second rotates inwards as if there were hitting something beneath them, but neither the body and the body collider are close to them.
I honestly don’t know what else to think. I already know that in the end I’ll erase everything and do it all over again.
about gravity, I’ll have to try that, once I manage to fix the hair and put the clothes on her

Your rigid bodies don’t look crazy to me, looking at just them, not the hair mesh, during the 600 frames of animation you provided.

You might need to clear your physics cache-- select a rigid body, start a move operation, cancel it to clear your rigid body world cache.

Your collider is still bad, with the potential to cause problems. Enter edit on it, vertex mode, select non manifold. Those are all places you have to fix. You need a volume, not a surface.

Okay, so I managed to solve every hair problem, I’ve added the front bow and ribbon and gave them physics, but now I’m having some problems with the skirt. I gave it physics, it works perfectly, but when she raises her legs, the skirt won’t react to the rigid body of the character and the legs go through the skirt. same thing happens on the back, her bottom goes through the skirt in a specific moment. now, I actually don’t know what the collision physics does, but given the name I tried using it but still the legs go through the skirt. basically the rigid bodies I created for the physics won’t hit against the body… what to do now? it’s basically the last thing I need to do, because the back bow and ribbon will be the same as the front one, so it won’t create problems (I hope).
Thanks!

Not enough info. Look first at your collision bodies. Are they actually intersecting, or are skirt bodies sliding between the legs? Also, last blend I looked, you still hadn’t enabled “deforming” on your body collision mesh or made it manifold.

sorry, I forgot to say that. yes, I checked the rigid bodies of the skirt and they phase through the body, they don’t avoid it. I did the manifold procedure, it selected quite a few vertices and I basically deleted them (maybe I was wrong in doing that?). I did it again right now and it’s selecting pieces that are not connected to each other, so I’ll fix it tomorrow since it’s 2am (I mean, I guess I’ll have to make faces to join those parts, right?), but I don’t think it has something to do with the skirt since it’s selecting the eyes and parts of the head.
about the deform physics, the only “deform” I see in the rigid body section is the source of the collision, and it was already set to deform.
This time I don’t think I’m gonna find a solution on my own. I’ll upload the project in case it could be useful to find the issue.
Also, the hair keeps on phasing through the body and sometimes it gets stuck inside her chest (which is kinda creepy), but I guess it’s the same problem as for the skirt. if the skirt goes through the body, so will the hair, obviously.


Thanks for the help you’re giving me!

Look below that (in properties/physics/rigid body/collisions). There’s a deform drop down, but there’s also a deforming checkbox. Enable the checkbox.

It hadn’t occurred to me, because it was always the first thing I ever did, but if you’re using 2.8, you might need to enable colliders to participate in the sim. Your collider collection is set to disable in viewports, and I’m not sure, that might need to change. Check out 2.8 outliner changes and how to enable more than just that viewport icon to change participation. (Edit: just checked, you don’t need to worry about this.)

Your collider mesh is still not manifold. Enter edit mode and select non-manifold. Fix the non-manifold stuff. Then select non-manifold again to make sure you fixed it. I fixed it by chopping her head off.

Your skirt bodies are set to use sphere primitive collision when they’re nothing like spheres.

Your skirt rigid bodies are so tiny that your legs aren’t going to stop them. They’re going to slide right between your legs. You need skirt bodies that adhere closely to the shape of the mesh, that overlap (with collision disabled between at least adjacent bodies) so that they will get blocked even when the skirt is stretched, and they need cross joints to give it stiffness, so that the hem doesn’t just stretch any which way it wants. It’s not easy.

Or, I suppose, you could build a collider that approximated the legs to fill out the skirt.

ok, so, I didn’t understand. Should I or should I not enable the collider in viewport? I just did it and the fps took a very hard hit since it’s going at 1.76fps. If it needs to be enabled, I guess I’ll have to make a simpler version of the colliders so that it won’t affect the frame rate.
I’ll fix the manifold today (when you first wrote it was 6 am. now it’s 9am and I have a few things to do) so that it’s out of the way. about chopping her head off, if I were making a Sleepy Hollow game, it would have been easier!
I’ll change the rigid bodies for the skirt, I guess I’ll try to make them wider so that they looklike the skirt, but I’ll have to do some research on disabling the collision on adjacent bodies and cross joints because it’s the first time I’ve heard about them.
building a collider for the legs could be better maybe, because I could make it a little bigger, so that the skirt won’t get too close for the actual legs…
also, I chose spheres because I was messing with the rigid body settings when I was trying to fix the hair, and when the bodies were set to box, the hair would go crazy. as soon as I tried sphere, the hair stopped moving on it’s own, so I thought it would have been a better choice for all the rigid bodies. I guess I was wrong.
I’ll let you know if I manage to solve these problems. I mean, I really hope I solve them…