Jump to content

Preserving volume when handling joint rotations


Fizz Savira
 Share

You are about to reply to a thread that has been inactive for 4235 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Title says it all really - I've been slowly working on a mesh avatar, and most of the animations I test with it work great, but a few are terrible, and the common theme is loss of volume during a rotation of a joint (these animations look bad on Ruth too).

A simple example is the elbow joint - simple bends about the elbow axis work fine, but if you twist the forearm instead, bad things happen.

For example, a before and after shot (I use blender):

forearm before twist.jpg

forearm after twist.jpg

Is this a limitation of second life, or do I need to "level up" in my rigging skills? If so, teach me how Oh Great Ones! :)

I did do some experiments with similar posing in Daz Studio, and noticed that they seem to have axis specific weights, and I saw essentially no loss of mesh volume during the twist of the forearm. Lucky them...

 

Link to comment
Share on other sites

The SL avatar doesn't have the option to preserve volume (unless it's a hidden feature somewhere in the code). So although you can switch this on in Blender you won't get the same in-world. All you can play with simple skin weights, but you can have up to 4 on each vertex. It might help to blur the transition more across the joint. Another tactic if you are creating your own mesh, is to rig the character in a natural pose you are likely to be most often, that way that pose will have the least distortion. Just experiment with different weightings and look at the result when you pose the limb. If you texture the model in Blender it will give you a better sense of how it will look.

On the other hand if you were to do that particular move with your arm I doubt your skin would look any prettier ;) 

Link to comment
Share on other sites

Thanks for the reply :) I do blur the transition across the joint, though I'm sure that could be improved. It's difficult, of course, when trying to limit the amount of detail in the mesh to keep triangle counts low.

I'll try your idea of changing the pose when I'm applying the weights and see what happens - the problem there is that the (quite old now) Ruth doesn't use a natural T-Pose, and I don't really know how that will work out when translated back to SL.

Also, that pose is a natural motion (just a simple forearm rotation) -- try it :) I bet your skin doesn't get as ugly as that picture I posted :)

 

Link to comment
Share on other sites


Fizz Savira wrote:

Also, that pose is a natural motion (just a simple forearm rotation) -- try it
:)
I bet your skin doesn't get as ugly as that picture I posted
:)

 

Actually, that motion is not at all natural.  In RL, you don't rotate your forearm like that at the elbow.  That would be mechanically impossible.  The elbow is a hinge joint, fixed to only bend in one direction.  It cannot and does not twist at all.

Where that rotation does happen is at the wrist.  Rotate your own forearm right now, and take a really good look at what happens.  Your wrist flips over, as the ulnar and radial heads change sides, caysing the forearm itself to twist, but your elbow stays put.  If you want the elbow to turn over, you have to rotate the entire arm, at the shoulder.  There's no other way to do it. 

The shoulder can both bend and rotate, because it's a ball in socket, and the wrist can both bend and rotate, because it's a complex combination of several different types of joints.  The elbow, however, cannot rotate, but can only bend, because it's just a simple hinge.

 

In any case, aside from just not putting the avatar in physically impossible poses, the question of how to maintain the appearance of volume at the joints is a good one. Solving these kinds of distortion problems always comes down to properly tweaking the skin weights, until they're right. Assuming the toplogy of the model is suitable for animation, if a body joint becomes too small when the joint is bent, it's because the skin is not weighted properly.

When you discover a problematic pose, park the model in that pose, and adjust the weights until the model looks how it should.  If it's well and truly unfixable, then you know the existing topology isn't good, and you need to alter the model itself.  More often then not, though, it will be fixable, assuming you did even a half way decent job with the modeling (and again assuming you're using poses that the RL body is actually capable of).

In most cases, you'll find that the weighting process works best when you start from the extremities, and work your way inward.  For example, you know the whole hand needs to be 100% weighted to the wrist joint.   The wrist area itself should be partially weighted to the wrist joint, and partially weighted to the elbow joint.  Most of the forearm should be  weighted to the elbow, but parts of it should be slightly weighted to the wrist, and other parts slightly weighted to the shoulder.

So how do you most easily achieve that?   Well, there's an order to it.  Start by painting the hand, 100% to the wrist joint.  You'll inevitably bleed a little onto the wrist skin area of the forearm. Just let that happen.  It's a good thing.  Now, paint over the whole forearm, additively, to weight it to the elbow joint.  You'll add elbow weight to the parts of the forearm that were already weighted to the wrist, and a little bit of that bleeding from the hand will remain.  That's exactly what you want.  If you did it right, you'll now have a perfectly functioning wrist.  If the wrist area distorts badly as the wrist bends, that's a sign that you haven't yet weighted the area strongly enough to the elbow, so just add a bit more paint.

Repeat the process, working up the chain, from wrist to elbow, from elbow to shoulder, from shoulder to spine, and you'll have a well rigged arm.  Do the same for the leg, starting at the toe, then working to the ankle, to the knee, to the hip, to the pelvis.  Finally, do the head, then the neck, then each spine joint, all the way to the pelvis.

You'll find that by working this way, from the outside in, you'll get much better results much more quickly, then by trying to start in the middle, and work outward.  If you do try to go inside out, you'll end up having to subtract weight instead of adding it, and then you lose a lot of control.  You can end up spending all day playing whack-a-mole with stray vertices that won't cooperate.  As soon as you squash one subtractively, another pops up somewhere else.  By working entirely additively, you'll never encounter that kind of trouble.  A rig that might have taken you a whole day or more to do subtractively can be done additively in an hour or two, or in many cases, just a few minutes.

To put it in terms of hierarchy, it's always more effective add your way up from the bottom of the chain, than to try to subtract your way down from the top of the chain.  I hope that makes sense.

  • Like 1
Link to comment
Share on other sites

Great advice Chosen, thanks.

I guess I need to be extra careful when typing :) When I was saying forearm rotation, of course I was meaning what we do when we rotate our wrist. When we rotate our wrist, our forearm twists, the wrist doesn't actually spin in place leaving the forearm unmoved...

Regarding SL - if an animation rotates the elbow joint (not bend, but twist) then the wrist moves with it since it's a child of that bone. I think that the intention is that elbow rotation represents what we consider a wrist rotation, but I'm not certain. Your thoughts?

I think I see how to fix wrist rotation so that the forearm goes with it, but not really well because a wrist bend will then do terrible things (what I've called in prior posts the "noodly arms" problem), but I'll have to give it a try using what you say and post my results.

Mind you, all of these rotations (wrist/elbow/thigh) look awful on ruth, and better but certainly not good on my mesh avatar... So I'm wondering if the rigging system in SL just isn't up to the problem. I'd love to be wrong about that!

Again, thanks!

Link to comment
Share on other sites


Fizz Savira wrote:

When we rotate our wrist, our forearm twists, the wrist doesn't actually spin in place leaving the forearm unmoved...


Defintely true.

 


Fizz Savira wrote:

Regarding SL - if an animation rotates the elbow joint (not bend, but twist) then the wrist moves with it since it's a child of that bone. I think that the intention is that elbow rotation represents what we consider a wrist rotation, but I'm not certain. Your thoughts?

It's really a 'leser of two evils' kind of thing.  With a more sophisticated rig, it can be done beautifully, but with one as simplistic as what we have to use in SL, there's no way to fully win.  With that in mind, it's true that rotating the elbow can often look better than just rotating the wrist, even though neither one is really going to look correct.  A lttile rotation on both can also look better than a lot of rotation on one or the other.

My earlier point was simply in response to what you said about it being a natural motion. :)

 


Fizz Savira wrote:

 

I think I see how to fix wrist rotation so that the forearm goes with it, but not really well because a wrist bend will then do terrible things (what I've called in prior posts the "noodly arms" problem), but I'll have to give it a try using what you say and post my results.

It can be a tough balancing act.  I'll bet you can probably get better results than what you're probably getting now, but as you've already suspected, you'll never get really great results with the rigging limitations we have to work with in SL.

 

 


Fizz Savira wrote:

Mind you, all of these rotations (wrist/elbow/thigh) look awful on ruth, and better but certainly not good on my mesh avatar... So I'm wondering if the rigging system in SL just isn't up to the problem. I'd love to be wrong about that!

Unfortunately, you're not wrong.  However, this issue is not solely an SL problem.  It's pretty common in games.

 

 

Link to comment
Share on other sites

Ok, I had a few minutes to work on this today, and tried your suggestion on the wrist joint - the result is a huge improvement in wrist twisting *YAY*

So here's a follow question - when I twist the wrist one way (say clockwise), I went and converted a bunch of ugly quads to triangles and flipped edges until I saw a smoother result. Rotate the opposite way, and oops, those triangles want to be flipped the other way *SIGH*

Is there an alternate way to build a mesh to resolve that issue?

Here are some images to help explain. First image is the wrist relaxed, second is rotated one way, third the opposite way:

wrist relaxed.jpg

wrist rotated a.jpg

wrist rotated b.jpg

It is VERY nice to make some progress on this, though I'm pondering how to improve hip rolls and wondering if I'm doomed, LOL.

Thanks again!

 

Link to comment
Share on other sites

I think Chosen Few's workflow is really nice, just a couple of thoughts:

Don't get too hung up on the armature being a skeleton. As far as the 'game' is concerned the bones are really just a handle to manipulate the mesh. The analogy with a human skeleton only gets you so far then you have to start compromising like making a wrist rotation a combination of mWrist and mElbow rotations. This means you need to be thinking about how you are going to animate your character as you are weighting it.

In Blender the weights can sum to more than 1, they are renormalised virtually when you move a limb. So with Chosen's workflow, as a first cut just select every vertex that you think should be influenced by the hand bones and assign them weight 1 to mWrist, then select every vertex that should be influenced by the forearm and give them weight 1 to mElbow and so on.. The weights at the transition region will blend into each other with the on-the-fly normalisation. I find doing this is much more accurate than weightpainting as you can easy respect any symmetries in the mesh. 

You're creating your own mesh so you can control the vertex density. Just add more structure to the joint areas to give yourself more freedom to transition the weights. This shouldn't increase the overall poly count too badly. 

With setting a natural default pose you have to jump through a few hoops. For animation the rest pose has to be the SL T pose, but often for mesh you want something else. In Avastar I've created a button for this that recalculates the mesh back up to the T pose. By hand you can do something like: pose the avatar in a natural pose and set it as a rest pose. Do your weighting. Pose the model back up to T pose by hand and set it as the rest pose (getting this accurately can be tricky). Alternatively you can hit "Use modifier while in edit mode" in the armature modifier and also "Apply modifier to editing cage" to see the mesh posed while in edit mode and adjust things as Chosen has suggested.

Link to comment
Share on other sites

Just thought I would post an update - I've been working on various troublesome joints (all of them? lol), and am finally making some progress :)

Thanks again for all your help, between giving me some approaches to tackling the issues, as well as some hope that it is possible to do better!

So far the ankle, knee and elbow are much improved. Turns out that better weighting does wonders, and some of the loops I had added to "improve" things were doing nothing to help animation (these were loops I had put in to improve animation, and had very little bearing on the shape of the mesh). So far my mesh is using less triangles :) I'm hoping to apply some of those to the forearm and wrist to improve that.

Still concerned about the thigh, but what else is new? :)

 

Link to comment
Share on other sites

Getting the topology of joints right can help immensely when it comes to creating realistic character animation, and can make a lot of difference to how much work is involved in painting skin weights too.  There are quite a few resources on character/body topology but I would definitely recommend looking at the information provided here.  The sections on Body Topology, Limb Topology, Shoulder Topology, etc. have some excellent diagrams and animated examples explaining why certain topologies are better at mimicking realistic body deformation during movement than others.

After spending some time studying the diagrams and following a few of the links to related articles, I found myself totally rethinking my approach to modeling certain areas of characters & clothing, and since doing so I've noticed a definite improvement in the realism of movement when rigged meshes are worn and animated, as well as a significant reduction in the time it takes to paint the skin weights for meshes with "correct" topology.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4235 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...