Home Technical Talk

Questions about rigging "maximum of 64 bones"

polycounter lvl 9
Offline / Send Message
PixelKD polycounter lvl 9
I have read a few places that you should keep rigs between 30 and 64 bones for a mesh. To be honest I am not sure how to do this on a character with fully articulating hands and a face rig.
My face rig is fairly minimal: four bones in the lips, four in the brows and two for the tongue (the eyes are sort of fixed orbs).
But hands? For fully articulating hands I use three bones per finger, that’s thirty bones on both hands alone. Anyone have answers to this conundrum? :poly122:

Replies

  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    If you want full hands (don't forget that the hand itself can also bend as the metacarpals move, though usually 1 bone in the hands is ok) it looks as though you are going to be riding that limit.

    Is this a limit for an engine you are working with or just a random guideline? These things are very engine specific, usually.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Did you look up for Blending Morphs? Faces rarely have direct bones in them in the engine, and those that do separate the head from the rest of the body.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    It depends on the game engine you are using, and the type of game you are working on. 30-64 is the advice from several years ago. These days I would say between 60-128.

    For Age of Empires Online we used between 16-28 bones per unit, because they were so small.

    For Orcs Must Die because there were so many enemies on the screen we used < 24 on small units and < 48 on large units. The main character had about 86 bones.

    One method to save bone count on hands is to only use 2 bones per finger and to use a "big finger" for the pinky and ring finger. (Lots of people gasp when I say this, but I don't know why.) In this image notice how the pinky and ring finger are separate in the mesh, but are weighted to the same big bone.

    bones.png

    Back in the day we used to model hands in a fist and only use a hand bone with no fingers.
  • Mark Dygert
    Options
    Offline / Send Message
    monster wrote: »
    One method to save bone count on hands is to only use 2 bones per finger and to use a "big finger" for the pinky and ring finger. (Lots of people gasp when I say this, but I don't know why.)
    I totally support this and was about to mention it if someone didn't already. Depending on the model I might do this just so I can have twist bones in the forearms. Some people think twists should be the first to be culled but I strongly disagree. Again, depending on the model.

    Brow animation is kind of pointless if the eyes aren't going to play along.
    Depending on the complexity of the facial animation you might want to go with 3 bones total for the eyebrows. One for each brow and one in the center to arch the brows up (surprised) or down (angry). But that really depends on the characters and the range of emotion. I strongly urge you to use eye bones and if possible eyelids of some kind. The soul of the character is in the eyes and so much emotion can be inferred with a simple squint.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Some people think twists should be the first to be culled but I strongly disagree.

    Those people are wrong.

    If your engine supports bone translation you can dispense with clavicles and other connective bones to reduce the overall count - you just derive the shoulder position from an animation rig which does have clavicles. i do this quite a lot now im working with mobile stuff.
  • PixelKD
    Options
    Offline / Send Message
    PixelKD polycounter lvl 9
    Ace-Angel wrote: »
    Did you look up for Blending Morphs? Faces rarely have direct bones in them in the engine, and those that do separate the head from the rest of the body.

    I have only looked into morphs for in engine use a little. Most of the information I came across seemed to be discouraging it. On your say so, I will be sure to look into it more. I was surprised that I could get my scaling bones to work (simulating squash and stretch) in the face.
  • Mark Dygert
    Options
    Offline / Send Message
    I really hope morphs replace bones for facial animation during the next hardware cycle. They are so much easier to work with and such a wide range of expression can be pulled from a handful of morph targets.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Unfortunately, you still have to work them in this day and age still, bones indeed would be better.

    Which reminds me, Prey and most Doom3 engine games had a node/root bone in the neck of a character, to which you attached the 'head root bone', since all the faces where boned. Pretty cool work around, since you could bypass the limit, but naturally, depends on what kind of performance you need.
  • PixelKD
    Options
    Offline / Send Message
    PixelKD polycounter lvl 9
    Ace-Angel wrote: »
    Unfortunately, you still have to work them in this day and age still, bones indeed would be better.

    Which reminds me, Prey and most Doom3 engine games had a node/root bone in the neck of a character, to which you attached the 'head root bone', since all the faces where boned. Pretty cool work around, since you could bypass the limit, but naturally, depends on what kind of performance you need.

    So I cut off his head. I also wound up skinning his ring finger and pinky together, as demonstrated by Monster up there.
    Wound up with 47 bones in the body and 24 in the head (my calculator says that's 71 total :).
    Her are some faces...
    goblin_face_sheet_by_pixelkid-d4re5nq.jpg
    What do you guys think about secondary animation for gear? I am really just trying to get a general idea for whatever platform (assuming secondary animation is out for mobile platforms).
  • Lamoot
    Options
    Offline / Send Message
    Lamoot polycounter lvl 7
    Hello, I'm currently learning rigging and animation and it's interesting to hear about this guideline. Does this limit/guideline includes all the bones in an armature or only the ones deforming the mesh?

    In addition, are there any similar "rules" to pay atention to with rigging and animation? Modelling has polycount budget, texturing has prefered texture size, any such guidelines with animation? Amount of keyframes, number of constraints etc?

    Sorry to hijack your thread but it was most convenient :poly121:
  • Denny
    Options
    Offline / Send Message
    Denny polycounter lvl 14
    In, for example, UDK (UE3) the limits are 75 mesh-influencing bones and 256 bones in total. If you surpass 75 mesh-influencing bones a second rendering pass is applied to the mesh.

    This trick can be used to add additional non-skinned bones for gameplay purposes but it doesn't mean you should overdo it. ;)

    Most engines imports baked animations without the controllers which means you can have as many constraints as you like in your authoring software, most of the time the game engine won't even know of their existence. On import game engines are capable of key frame optimization/reduction so you shouldn't worry too much about amount of key frames. You have more to gain from optimizing the rig than worrying about keyframes. Someone correct me if I'm wrong.
  • Mark Dygert
    Options
    Offline / Send Message
    I think some engines work better if you export your animations as Key Per Frame and turn off interpolation. It also reduces the headache that your keys will be interpreted different than how they where in your 3D app. But it all depends on the engine and how easy it is to sync the interpolation. Which is why its important to test things early and often instead of trying to clean it all up and make something work at the end.

    Another important thing to remember, and it might be more important than how many keys you have, is that the less bones that influence a vert the better things will run. I think UDK and most engines top out at 3-4 bone weights per vertex, for a lot of meshes you can get away with just two or one bone weights per vert.

    You want to be careful because in 3D apps that default is normally set pretty high (in max its 20 bones per vert) and if you don't turn it down you can easily end up with a lot of useless bone weights that either error out or just cause things to slow down. Setting the cap to 3-4 and clicking "remove zero weights" with the threshold set to .2 will go a long way in cleaning that up if you forget.
  • PixelKD
    Options
    Offline / Send Message
    PixelKD polycounter lvl 9
    Hey, thanks to everyone who commented. This is hugely informative.
    Good to know about UDK specs. Here are some other bits I found:
    Unity (according to some users) will run with 70 bones with relative ease, but they recommend keeping it under sixty per mesh.
    tech-artists.org has this to say, "Shader Model 2.0 and 3.0 support 256 vertex constant registers, and a bone is a 3x4 matrix, which is equivalent to 4 float3's. Therefore, 256/4 = 64, which is the max number of bones in a system. The lower the better, though." and they reiterate that there are only four bone weights available per vertex.
    I have yet to find recommendations on how many rigged meshes you should limit yourself to per character (body, face, weapons and interchangeable gear, for example).
    Mark, thanks for the tip on limiting the 3D apps defaults.
    And good on for the highjack, Lamoot. It's hard to pen all this stuff down in a few searches and impossible to find in one local (So far). This stuff is gold.
  • Ashaman73
    Options
    Offline / Send Message
    Ashaman73 polycounter lvl 6
    PixelKD wrote: »
    tech-artists.org has this to say, "Shader Model 2.0 and 3.0 support 256 vertex constant registers, and a bone is a 3x4 matrix, which is equivalent to 4 float3's. Therefore, 256/4 = 64, which is the max number of bones in a system. The lower the better, though." and they reiterate that there are only four bone weights available per vertex.
    It really depends on your engine. You can encode the necessary bone matrix as quaternions which reduce it to just 2 registers for each bone (=128 bones max for SM2/3). The number of bone weights is independent of the number of constant registers. But it is a common assumption, that 4 influencing bones per vertex are enough to get proper mesh deforming in game.
  • Lamoot
    Options
    Offline / Send Message
    Lamoot polycounter lvl 7
    Thank you all for the answers, this is some really useful information. As far as the guidelines and limits go, the only problem I noticed I have is more than 3-4 bones per vertex, simply because I paid no attention to it before. Practice time it is then to clean the test rig and polish my skills.
Sign In or Register to comment.