Best way to rig support bones for two intersections(knee, elbow)

A well known problem that almost allways occurs in any kind of limb rig. There are several solutions for it but non of them work really well in blender.

There are muscle support systems and there are solutions based on cloth simulation and delta mush but blender doesnt supports none of it.

The simplest way for knees and elbows would be a corrective shape. They rotate just in one axis so one shape keys would be enough to compensate for mesh intersections and volume loss also works good if you exceed the normal lengteh of the bones by overstretching it. On the backside, if you twist your ankle or wrist, the shape keys would be influenced by the twist bones as well wich could lead to odd looking deformations.

Another simple way would be a support bone that shares the orientation of upper and lower bone of the intersection. This way is quick and easy to setup and works very well in Max and Maya. In Blender, not so much. I tried copy rotation constraints and damped track constraints but they all lead to a rotation shift when i change from edit to pose and vise versa. The offset toggle doesnt work at al it seemsl and not to forget the flipping issue you get on the support bone if you overstretch the bone chain.

Of course i know Danpro’s videos on that subject but he didnt get into detail how he set up the chain to avoid these problems. What is your take on this? Maybe you have a different aproach you like to share.

3 Likes

Welcome to one of the reasons why Blender is probably having a hard time in “the” industry - the middleground between modelling and rendering, all the advanced rigging and skinning stuff beyond armatures and bones, ignored or neglected for years now.

The strategy I’m using for knee rigs nowadays is to first use a disconnected shin bone which is shifted away from the thigh by use of a transform constraint when rotated to mimic reality a bit closer (in fact I wonder why most Blender rigs I’ve come across don’t do that, as it improves deformation a lot and allows for much more realistic leg mechanics like deep squats more or less out of the box).
Additionally I add helper bones both for the tigh and shin, one single deformer bone close to the joint area for each of them where most of the tissue compression will happen. Those bones will be moved to push inward as self-collision starts to happen, and also scaled to mimic volume preservation. In principle just the kind of mesh manipulation a shapekey would achieve but done via armature deformation instead.
There are a couple of other, more advanced strategies to simulate skin collision I found useful. Here’s one of them: the Cast modifier can be really handy to push stuff out of the way. Parent empties to shin and thigh bones and add a pair of Cast modifiers to your mesh, where shin’s empty influences the thigh area and thigh bone’s empty the shin area.

6 Likes

That might be just what i need. So basically to extra bones positioned on the back side of the thigh and shin driven by the angle of the intersection bones.

I have to test this out. Never found any use for the cast modifier. So you get kind of volume preservation for free. This might also help with cloth intersection problems. Great idea!

That might be just what i need. So basically to extra bones positioned on the back side of the thigh and shin driven by the angle of the intersection bones.

Exactly:

Once you’ve started using it to solve that kind of problem you’ll fall in love with it I’m sure. :slight_smile: It is one of the most frequently used modifiers in my personal toolbox. You can build entire muscle systems (the quick and simple/dirty sort of at least) around it: drop in a bone at the proper location, say, a bicep, add a StretchTo constraint and parent another empty to it. Have the empty drive a cast modifier on your mesh, and voila, you have a (simple, elipsoid) muscle sliding below the skin. Super efficient, while admittedly giving away some of the advantages nevertheless avoiding a lot of the trouble that tends to come with shrinkwrap-based muscle and tissue simulation in Blender. On top of it, your bicep “muscle” will implement the type of skin collision I described above for free.

“This might also help with cloth intersection problems. Great idea!”

It does. Also using it to prevent mesh hair/skull intersection. :slight_smile:

5 Likes

Finally, my male char could’ve little cast modifier spheres on his fingertips while honking my female char’s fun bags, yeah! Just kidding. But seriously, you opened the door to a whole new world of possibilities with this, hehe.

Thanks Helmut.

Good set up. But for me real pain isn’t elbow\knee - i’m using preserve volume and just one helper bone to get nice joint deformations. Real pain is shoulder joint - it’s really hard to make shoulder to deform mesh right way in different poses - especcially in poses where shoulder bends like this:


Any tips on shoulder rig?

I use additional bones for that to hold the volume of the surrounding muscles. Not intersection free of course, its just skinning, but good enough for me. But thinking of it, even in this case a cast modifier might be come in handy.


muscles

3 Likes

Wow. This is really good deformations. I wish i could make such rig for my character. I always end up with really ugly deformations in this particular pose - in area where shoulder and chest colliding i always get real mess no matter how many additional bones i add - chest, biceps, triceps. I wish someone made good tutorial shoulder rig. :roll_eyes:

Just a short update. I tested the cast modifiers in my rig. Works like a charme! No extra Bones, just two cast modifiers for biceps and elbow. Even though there are limitations, i think this its a great method to keep volume. I applied them after the subD modifier so its gives me better definition of the muscle and notice any slowdown. And they’re quick to setup cause there is no skinning involved. Love it!

castModifier

There are quite a few good tutorials out there. Mostly for Maya but the concept is applicable in Blender. Good topology and bone placement is key tho. Dont be lazy to edit the bones and see wich positions work best.

4 Likes

Would anybody be willing to share a demo file with the cast trick? I’m playing with it, and it looks promising, but there are a ton of variables and I can’t get it quite right. (Haven’t had a use for cast before, although I’ve done similar things with a warp modifier.)

Here’s a comparison of a variety of simple tricks to rig muscle deformation I did a while ago, shrinkwrap based vs cast modifier vs plain armature deformation:

muscles-comparison.blend (1.7 MB)

In the case of a simulated muscle, the cast modifier works from “within” the mesh, pushing the skin outwards. To mimic self collision at, say, the elbow joint, just set it up “the other way round” to push the skin inwards. Best have a look in the sample file, it wasn’t made to test this aspect, however you onle need to increase the second configuration’s Cast Modifier radius and observe what happens while the “arm” bends.

It’s a really straight forward matter actually.
Hope that helps! :slight_smile:

2 Likes

Thanks for sharing. I like the skinwrap approach but couldnt get rid of that mesh flickering. Increasing the mesh resolution helps a bit but it’s still noticeable. How do you get rid of it?

Thanks so much, that helps a lot! I like how you can be lazy-ish with your weight painting doing this, just quickly blocking out limits for the modifiers.

Can’t say I really have, it is a matter of time consuming finetuning work to have mesh and shrinkwrap targets work together as nicely as possible.
In general you need to avoid situations where character mesh vertices may be pulled into awkward directions by the target, which usually tends to happen where angles between skin mesh and target surfaces are large (resulting to skin vertices being pulled sideways instead of up/down), or close to joint areas where parts of the skin mesh may end up upside down when seen from the target’s perspective. Another source of trouble is the “backside” of targets when seen from the skin mesh’s point of view: in some situations skin vertices will be pulled towards those backsides rather than - as desired - front faces.
There’s a couple of options available to tackle these issues:

  • rig your targets in a way that mesh intersections are as suitable as possible for shrinkwrap to work: not too much interpenetration, angles between skin and targets as small as possible, be cautious around joints
  • apply extra-careful weights for shrinkwrap, in particular around joint areas
  • no overlapping meshes in shrinkwrap targets
  • clip target backsides wherever you can to avoid the skin mesh being pulled towards them
  • play with shrinkwrap modifier options to find which method works best in the respective situation; that said I never used “nearest vertex”, it is either “nearest surface” or “project” in all situations I ever occurred so far; “project” is what seems to be particularly useful when modelling bones pushing the skin at joints or, say, the thorax or hip bones, while “nearest surface” works ok for muscles
  • use smooth or corrective smooth (aka delta mush) modifier to “repair” bad deformations afterwards
  • play with mesh resolutions; I found that in some times using two shrinkwrap modifiers for one and the same target can help, one on the low res base mesh kind of “preparing” the mesh for the subsequent “final” shrinkwrap (i.e. push skin vertices to a place where they will play well later on …), one to achieve final high(er) res deformation which is placed after a subsurf modifier
  • don’t use targets representing single muscles; instead model larger parts of anatomy as one mesh (like, say, an arm) and use that as a shrinkwrap target instead; this will not allow for super-naturalistic super-high detail muscle systems achievable by state-of-the-art FEM sims, but it helps avoiding some of the overhead created by stacking gazillions of shrinkwrap modifiers on top of each other, avoids a lot of overlapping shrinkwrap targets and even allows for some kind of mutual displacement of muscles.

There are some more tricks, but it is getting more complex down the line. Don’t want to make the list too long for now.

In general I feel Blender is not too well prepared for these kinds of rigs at the moment, also because deformers still use that stack based approach instead of a nodal one, and because some deformers are implemented sloppily at best, like that surface deform modifier … a deformer which could be really really beneficial when it comes to “outsourcing” some of the complex deformations into a separate mesh and transferring the result back to the skin. Unfortunately that modifier bails out on every other mesh due to obscure topology problems and does not provide any way to control its influence.

All of that said, you are aware there’s at least two paid plugins around shrinkwrap-based muscle systems available? Never tried them as I don’t expect any of them to hex away those shrinkwrap issues, but it is worth mentioning I think.

Btw: really great shoulder deformations in your above example! Also, the bicep setup works like a charm, happy to see you put that little Cast modifier trick to such great use :slight_smile:

NIce, that might come in handy. Looks like you put a lot of research into it. Again, thanks for sharing!
So, lets say in case of an arm, it might be best to duplicate the mesh and scale it sligthly down so its sits inside the orignal mesh. From there i cut the duplicated arm into single muscles areas (for example biceps, triceps and deltoid) and use it as starting point to model the muscles (or even, like you said, leave the backsides open?) to make sure they match the orginal topology as best they can, i.e. resulting in a flickerfree Deformation. I’m gonna test this out if i have time.

That would be my next question, how much sw modifiers can a rig handle without slowing down. I know how frustrating it is as Animator handling heavy featured rigs in production. There is the option to give them just a skinned version (without the muscle system) to animate with, but when it comes to cloth simulation you need to have a true representation of the end result.

Well, i never used it in this regard, but i actually like the speed of that thing and i find it extremely useful in combination with cloth sims to drive a poly hair mesh for example.
https://vimeo.com/326067493
https://vimeo.com/325733082

In my experience it is not so much a problem of matching topology but more about avoiding steep angles and situations where vertices might be pulled towards the wrong place. Model whatever topology fits your muscles best, but try to model it such that it stays as closely as possible to the skin while still creating the effect you’re after.
I did a lot of research into it in fact, but what I lack entirely so far is any idea about it compares to other solutions, both Blender-based ones like “X-Muscle System” and the tools other DCC packages feature. So please take my hints for what they are: a summary of solutions which worked for me on the level I am now. Nothing “official”, there’s not much information around in the Blender community concerning these topics unfortunately, it seems to be uncharted ground mostly.

Building a full, subsurf-based muscle simulation in Blender is a lot of work, I have used the approach with one character only so far, the effort so far kept me from starting work on another one … in fact I still wonder whether it is worth all the hassle.

That would be my next question, how much sw modifiers can a rig handle without slowing down. I know how frustrating it is as Animator handling heavy featured rigs in production. There is the option to give them just a skinned version (without the muscle system) to animate with

Depends on the number and type of modifiers of course, but better expect your rig to drop out of realtime behaviour quickly (biggest performance killer being Subsurf somewhere down the line to increase mesh density). As you said, there’s the option to use a more lightweight configuration to animate. If you work with linked libraries and proxies (soon to be replaced by overlays in 2.8x) there’s the elegant solution to use a dedicated animation proxy group and switch to the real thing for rendering/exporting/whatever.
My preferred way to deal with it is adding dedicated controls to my rigs, allowing me to switch those advanced features on or off.

True.
But you will run cloth sim when you’re done with all the manual animation parts, won’t you?

My current workflow is to export the final mesh (apart that final subsurf) as alembic and use the alembic cache to set up all the dynamics. That gives you real time playback on the collision mesh and at the same time all the precision you need in order to get nice cloth collisions. That’s an additional step of course, and the export may take a while (however I can’t avoid it as I use Houdini to run those sims).

Very cool stuff!

the xmuscle system i think working with the same way
here is the addon

1 Like

Back in the days, i used to use proxy meshes, but that was before Alembic. The company i work for uses Alembic caches as well with an autogenerated low res cage to fix penetrations. My point is, its a hidious Job. Therefor you try to avoid penetration whenever possible while animating and constantly switch to hiRes anyway.

Yes, its the same and even the promo videos come with the same SkinWrap issue. But put a T in front of issue and what do you get?

I want that in Blender :wink:

1 Like

Me too, but better don’t expect it to happen any time soon. The current set of modifiers hasn’t changed much for a decade now … we’ll have to wait for the switch to “everything nodes” first, and even then everything depends on having proper deformers around. :slight_smile:

I take it you come from Maya/MAX and somehow want to get rid of them?
If yes, did you consider to take a look on Houdini yet?

It comes with built-in muscle tools and FEM simulation, not as “accessible” as some of the competitor solutions I suppose (have not tried them yet), but the whole character animation & character FX toolchain has become a priority for them, I guess we can expect them to be better and more accessible every year now.
H’s learning curve is said to be nasty, but not nearly as hard as I guessed … and you can pull off some seriously cool stuff with it. :slight_smile:

1 Like

I’ve always used Fan Bones + Corrective Shape Keys. Not sure if fan bones were mentioned here before, I skimmed the thread. :stuck_out_tongue: