B3.5 How to simplify a rig?

Hi all :smiley:

Some time ago, i found the perfect cat rig !!!
I don’t rmember where it came from but i manages to target this rig to my lowpoly cat model.

This rig is very detailed and perfect for animating my low-poly cat and giving it some poses, apply the pose and only get the posed mesh for importing in unity3D.

See the cat face rig:

Now i want to animate this cat and remove 75% of the bones that i don’t use ( face bones, finger bones, etc… for targetting the anim to unity3D.

Could please someone tell me how i could remove for example all head bones without f*cking-up the mesh animation ? and without weight repainting ?

Thanks in advance and happy blending ! :smiley:

Not sure what you mean by this

So in your screenshot you show a lot of facial bones, and you’re wanting to remove all those bones without it affecting facial animation? And you want to do this without re-weighting the mesh?

Randy

1 Like

yes this is what i’d want to do.

Note that there’s no facial animation at all :slight_smile:

So you’re not going to get away with not editing the weights at all while removing the associated bones, but to avoid completely redoing things you can use the Vertex Weight Mix modifier to add one group to another. It’s significantly slower than just selecting vertices and assigning weights, so you’ll probably want to grab the areas that you have no doubt will be 100% one bone (like for the Head bone, the eye loops probably have no influence on the neck) and select them in edit mode in the vertex group panel, use the down-arrow menu to “remove from all groups,” then go to the head bone group and assign them with a weight of 1.0. But then the grey area bones with a weight of less than 1 close to the border of the area you’re simplifying (like probably the jaw will have weights softening into the neck and head and maybe even chest) you could individually combine using the modifier.

I’d recommend working on a copy/with a backup of the mesh in case something doesn’t work perfectly so you’ll still have the original weights to compare to.
You’ll want all the weight added to the bone that’s remaining and you’ll have to either clear the weights in the no longer needed groups or go ahead and delete them and the bones to see how it’s working as you go (if you don’t delete them as you go, I’d recommend a checklist so you don’t end up adding twice the weight of some groups if you forget/get called away).

1 Like

hi @cjgladback and thanks for your long answer :slight_smile:

TBH i hoped there were an ‘automatic’ way of bone suppression or a professionnal rigger/animator method of doing this :wink:

As often in blender the ‘help-yourself’ way is the way to go :wink:

therefore i suppressed 100ish bones ( face ones and all fingers ) and the corresponding mesh groups. And things were much lighter :slight_smile:

However i had another problem with the rigify keyframe sampling: It creates bones for everything in the action editor ( about 700+ * 3 entries ) and unity3D seems not able to get rid of those non deforming bones, as they are parents of deforming ones. So running an anim with 700+ loc-rot-scl curves is hell for unity.

as rigify is a ( though fully functionnal and amazing tool ) total mess with everything mixed with everything.
What i did as a massive simplification ( and IMHO, rigify devs should do things that way ) is extracting only the DEF-*** bones from a rigify rig and copied transform for each of those bones from the rigified one ( that i won’t import in U3D ).
This way i only have the interresting and usefull bones beeing animated in unity.

It’s a tedious work to copy all bones transforms but i found no other way of simplifying things :slight_smile:

At last but not least if didn’t know it was possible tu merge verts groups :smiley:
Thanks for the info ! I’ll take a look at this :wink:

Thanks again and happy blending !!! :smiley:

Since you need a simple rig why not make it yourself? Building a simple rig is surely easier than using a tool designed to make complex ones then trying to simplify it. Plus you will have exactly the rig you need.

Additionally, building some rigs from scratch gives you knowledge and ability that can help when using auto rigging tools.

1 Like

I often did this in the past for my toons and many other things but i confess i really like rigify widgets and IK :wink:

The good new is that i found a way to have both rigify and a pretty simple target :stuck_out_tongue:

Happy blending ! :slight_smile:

After removing the facial bones, weight painting those bone’s vertex groups to another bone, like the head bone, would be like a 5 minute job.

For fingers, just selecting all the finger verts and manually assigning a weight of 1 to the hand vertex group is again, a 5 minute job.

I once wrote an add on to do this, but couldn’t find anyone to tell me is such a tool is needed. I think what you need is a tool to create a game rig from the rig you have. There are tools out there for rigify to game rig.

Is this a rigify rig?

Randy

1 Like

i agree for you 5 min job :wink:
The longest part is to try&redo for finding the right way of doing things without messing everything up :stuck_out_tongue:

Yes the rig is a rigify one and i suspect that i use it as a dumb would ( making the pose, select all and hit ‘I’—> loc/rot/scl

i didn’t know there were rigify to game rig addons :slight_smile: i’ll dig in this…

thanks and happy blending :smiley:

i hoped there were an ‘automatic’ way of bone suppression or a professionnal rigger/animator method of doing this

Yeah, I think the actual professional way to do most bulk actions on a rig is writing a tool/script–but I’m not that much of a professional yet. :smile: And yes! Generally for a game actor you’ll want to bake down your deform bones’ animations for each action and delete everything else/export with only deform bones (or depending on your plans any other controller you expect to reference directly in your game engine).

I haven’t personally used rigify to know if it automatically uses bone layers or groups (or if it’s been updated in more recent builds to use bone collections) but keeping things organized there as you build or modify your rig should make it a lot easier to go into a layer and select all or select a full bone group/collection to delete at once in the rig you’re about to export.

Glad you’ve found the solution you needed for now!

1 Like

I was going to suggest this, write a script that would copy a selected vertex group to another one, but I didn’t. In my experience, taking the time to write a script to automate tasks usually takes longer than just doing the work manually. Only useful if you have several characters you want to perform the same action to.

Randy

1 Like

thanks a lot to both of you @cjgladback and @revolt_randy

Yes the script way would be an interresting one and there could be an opportunity as the unity3D importer just launches a background blender and run a small import python script.
However, even if i wrote some few python lines in blender, i’m really not comfortable at all with blender API. I’d prefer sort things on the unity3D side with C#.

Rigify is an enormous tool with enormour possibilities and i’m almost sure i don’t use it the way it should be used. However doing things the brute and dumb way worked like a charm : copy the DEF bones to a new rig without widgets and tie the bones transform to the rigify bones, and voilà: 47 bones instead of 732 :stuck_out_tongue:
My unity3D can breathe again ! :rofl:

Yes writing a script and debug it is longer tahn doing the thing by hand. I already did the same thing with human rig in the past for using mixamo anims and i guess the next time i need amazing anim tools with low-poly and low-bones i’ll write the script Blender —> U3D and maybe make it public so that the community can use and enhance it :stuck_out_tongue:

At last but not least i have to mention i’m far from a 3D pro ! I make 3D models more like an hobbyist for my ( maybe too ambitious :stuck_out_tongue: ) projects :wink: And as i’m all alone for all this i have to deal with rigs, anims, materials, geonodes for blender and on the U3D side it’s almost more dense :stuck_out_tongue:

Thanks again Randy and CjGladBack for your kind answers :smiley:

Now i can go back to my medieval walls and towers :stuck_out_tongue:

Have a great day and happy blending !!! :smiley:

Rigify and rigging in general

Rigify’s rig generation system works on a module system. Each provided metarig from Rigify are in fact a bunch of modules put together as an example. You are free to add, remove, or even make new modules as you like. If you don’t need the facial module, delete it from the metarig and generate the rig as is. Or if you need only parts of it, generate the rig with the facial module, and then delete the unneeded parts in the final rig.
But, that’s the kind of things you should always plan and do before the skinning stage, to avoid cornering yourself into revision hell.

Now that you are in the case of having to modifiy your rig after skinning, it really all depends on what you want to remove from the skin. If you want to remove all facial features, it’s really as simple as removing the facial modules from the metarig, re-generating it, and then bind the whole face to the head bone and delete all legacy facial weights. But if it’s more granular than that, it really depends on what you precisely need to do. But since Rigify’s facial module is somewhat simple and easy to “ignore” if you don’t need it, I would first wonder if it’s worth the trouble if I were you.

I highly recommend you to check Rigify - Blender 4.1 Manual if you want to know more about how to use Rigify at its best.

If you want to know more about bespoke rigging, or simply general tips about rigging and even animation, I highly recommend watching Pierrick Picaut - YouTube. That dude made a lot of very comprehensive guides that explain both how to do things, and more importantly, why.

There can be many ways to answer your needs, but while tools like Rigify are more aimed at giving general answers to most questions and can be somewhat customized to specific needs, at the end of the day it’s hard to tell exactly what to do without the specifics of the situation.
So don’t hesitate to tell us more about your situation, you can even upload your file if you want (just don’t forget to remove unneeded things and use Save As > Enable Compress option so it’s lightweight and nice to share).

Deform rig, channels and exporting

When it comes to exporting to a game engine (GE), you are not supposed to export the whole rig. The GE only cares about the final deform that actually deforms the meshes.
Only the deform bones are needed for export. But all the rest of the rig isn’t useless, it is for you, the animator, who needs visually-appealing and easy-to-use controllers, IK systems, eye targets, space switchers and whatever fancy thing animators like to have in order to do their job more efficiently. You shouldn’t delete the rest of the rig either (unless its limbs you don’t animate at all, but that’s what I mention above).

In addition to exporting only the deformation rig, you should also bake the animation on it. For two reasons: depending on how the rig is made, the animation keyframes are often not on the deformation rig itself, but on controllers or other intermediate bones. Plus the def bones are partially influenced by other bones. Exporting the def rig as is would result in a broken animation.
In addition to that, every frame should be keyed in your animation software. Because every non-keyed frame will be left to the imagination of the GE. Which will already compress the animation data, interpolate, all that using possibly different interpolation methods, different rotation orders on your bones, which leads to interpolated frames looking somewhat different from the animation software, if not broken.

Hence, all you should ever do to export a rig is bake the animation onto the deform bones and export them.

Some exporters like FBX have an option to export only deform bones, with animation baking. Do that. It’s the simplest thing to do.

For the few exporters that don’t offer that as an option, you can always try to save your animation in a different file, from there select only the deform bones (they are in their own layer in Rigify’s rigs), bake the action with clear parents/constraints, and then delete any other bones and export.
It’s the manual and annoying way to do it, you are only baking and deleting thing at the time of exporting, and you should then go back to your full-featured rig. But since you export for Unity: just use the FBX exporter x)


Now on a very different note, I feel the need to go a little bit off-topic and talk about words like these:

Maybe you know things we don’t. Maybe you are just young in your learning process. Maybe it’s just unfortunate words that came out wrong. I don’t know. I like to think it’s the latter, considering your latest message. That’s why I focused my post on answering the problems at hand in priority.

But maybe be a bit more careful and humble in your words. It can lift a few eyebrows when you read someone criticizing tools and telling developers what they should do :wink:

1 Like

Thanks a lot for your long exmplaination and for the links :smiley:

As you probably notice, and thought i’m a quite old designer in many computering domains, i’m a totally noob user in using rigify and also in rigging/animating things.
I guess the links will help me a lot on understanding the ins and outs of rigify ( i didn’t even cought that rigify was a part of blender, nor it was a pack of modules ). However i got so many things to master like i’d like and like i should that i guess i won’t have enough of my life for doing it all :wink:
Finally your answer comfort me in the idea i don’t use rigify properly, wich was my feeling since the beginning.
Anyway, i managed to do what i needed in a ‘brute-force’ way : retarget a simplified rig and copy transforms of the rigify bones. I admit it is the dumb way of doing things but it is a way i understand ( and that works pretty well :slight_smile: )

At last but not least i’m sincerely sad you took my words as aggressive ones. I just give my opinion but, as for lots of other things, i know it won’t change anything.
Be sure there’s absolutely no aggressiveness at all in what i wrote. And be sure blender ( though i often effortlessly criticised it ) is my tool of choice, just as is rigify from my point of view.
Maybe, as you say, and in an absolute humility, i know some few things lots of people don’t but i’m absolutely sure they just dont care about those things and i’d say they don’t stop the world from rotating on itself :stuck_out_tongue:

Thanks again @L0Lock for your answer and have a great day :slight_smile:

And happy blending !!! :smiley: