HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Maximum Bone Count  (Read 2652 times)

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
[Resolved] Maximum Bone Count
« on: Mar 04, 13, 01:19:04 AM »

We have a couple of questions about maximum bone counts:

1 - Static characters can have  max 75 bones - is this also the max limit for dynamic charatcers?

2 - We've been told that we should make wings and tails as part of the main skeleton rig, and not separate pieces - does this also apply to other moving parts on a charatcer like hair, capes, skirts, robes and so on?
« Last Edit: Mar 25, 13, 02:00:40 PM by HE-Cooper »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Maximum Bone Count
« Reply #1 on: Mar 04, 13, 01:04:14 PM »

1.  Yes, with a caveat.  For dynamic characters, the suggested limit only applies to bones IN USE.  So if you have a skeleton that includes bones for hair, capes, a tail, etc.  it only counts towards the limit if there is currently a character part loaded that is skinned to those bones. 

  If you're having trouble staying under the limit, think about places where the skeleton could be simplified.  In a third-person game, you very rarely need to have bones for all the individual fingers, for example.

2. Yes, and for the same reasons.  The suggested limit of 75 bones is a performance consideration.  Any other system you could write to get around the limit would be equally taxing on performance, if not even more so.
Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #2 on: Mar 04, 13, 01:22:21 PM »

Thanks for the answer.

We already had some ideas in place for helping to limit the use of cvostume parts with bones - for exmaple, wings and capes use the same back slot, and tails, long robes and trench coats use the same wasit slot.

Do you have any suggestions for how many bones we should use in things like wings, capes, robes, hair and so on? Searching the net for examples of rigs using extra bones like this doesn't turn up many helpful results.

« Last Edit: Apr 25, 13, 11:25:25 PM by Amanda_Brooks »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Maximum Bone Count
« Reply #3 on: Mar 04, 13, 03:39:10 PM »

Sounds like you're on the right track by limiting how many "extra" bones will be used at once via sharing slots. :)

In terms of guidelines for specifics, I would start by minimizing the bone count in the base level skeleton that everything uses (legs, feet, spine, arms, hands, neck, head); Then count the bones in the base skeleton.  Obviously, subtract that from 75 and you have your "extremity budget".  Divide that number by the total number of concurrently equipable "extremities" and that gives you a rough guide of your UPPER limit.

By my estimate, assuming "mitten" style hands with only a thumb and a finger per hand, you need about 46 bones to make a basic biped character.  That leaves you with 29 bones to play with.  Lets say we want to have hair, a tail, and wings all visible at the same time.  I might apportion the bones like this:

Hair: 4
wings: 12
tail: 6

Totalling 22 bones, leaving a few to spare.  Then, if capes and wings are in the same slot, you could use up to 19 bones for capes (though that would be major overkill).  You just need to design the system such that it is impossible to equip parts such that it pushes the character over the bone limit, as you already seem to be doing :)
Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #4 on: Mar 04, 13, 04:51:51 PM »

Thanks again for the answer.

If we use 4 bones for hair, would a seninsible division be one behind each ear, down to the shouldes, and then 2 connected down the back for longer hair or ponytails?

For skirts and long robes/dresses, would it be practical to "cheat" and use the thigh and shin bones of the actual skeleton for the sides of the robe/dress, and then have 2 connected at the front, and 2 more connected at the back to help the animations for these kinds of costume parts look smoother, rather than having the robe/dress come across as just very baggy pants, which I think is what would happen if we only used the actual thing and shin bones for them.

And if there's a single bone for the fingers, does that still make it possible for us to have hands in a relaxed position, with the fingers slightly apart, and then still have them closed into a fist for holding weapons or unarmed combat?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Maximum Bone Count
« Reply #5 on: Mar 05, 13, 09:44:06 AM »

That could work for hair, sure.  There is no real way to say what is sensible there except, "does it create the effect you want within the constraints?".  Sounds like a solid approach.  I probably would first try and create the desired effect with all 4 bones in a ponytail arrangement at the back of the head.  This would probably allow for more complex motion of the longer hair in back and good enough motion for hair along the sides.

I wouldn't really call that approach cheating :P  Simply put, yes it can be a very good idea to have extra bones to improve deformation when animating.

If you only have one "finger" in bones to which all four fingers are skinned, no you can't move them independently.  Having two "fingers" in bones, say index finger and another for the other three fingers, you can get a lot of expression. 

Even so, the difference between a hand wrapped around a weapon and a hand hanging straight is quite noticeable already.  Having the fingers move independently isn't as important as you may think.  Consider how small the hands are likely to be on the screen!  You just need to decide what is most important to your game.  Five fingers per hand or the ability to have hair, tails, robes, and wings all at once ;)  and work out a compromise somewhere in between.
Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #6 on: Mar 07, 13, 12:53:19 AM »

Our one remaining concern is about facial animations - as a game with a big emphasis on both social interaction and story driven content, things like emotes and in-game cutscenes pretty much require some form of facial animations - what would be the fewest number of face bones that we could get away with using and still get acceptable results?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Maximum Bone Count
« Reply #7 on: Mar 07, 13, 02:23:27 PM »

It's not really possible for me to answer that question for you.  Whenever the question is "enough to be acceptable" I'd have to know exactly what you hope to create and what you want it to look like, among other things. 

Personally, I'd investigate the use of Facegen and morphing for doing facial animation with maybe a single bone for jaw movement. 

It's also worth noting that if you intend to have in-game cinematics instead of pre-rendered ones, you'll probably want to have a different rig setup just for the cutscenes.  In general gameplay, it doesn't make sense to have the complex level of rig that you might want for a cutscene.

Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #8 on: Mar 11, 13, 09:41:41 PM »

I've been adding up the basic bones we'd need for a normal biped rig, but I can only get 28, not the 46 or so that you said would be needed or a basic rig:

2 toes
2 feet
2 shins
2 thighs
1 Pelvis
1 lower spine
1 middle spine
1 upper spine
2 shoulders
2 upper arms
2 forearms
2 hands
2 mitten fingers
2 index fingers
2 thumbs
1 neck
1 head

So obviously, we're still missing quite a few from this list - which ones would they be?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Maximum Bone Count
« Reply #9 on: Mar 12, 13, 01:31:38 AM »

When you click select, the 3rd button on top row of heroblade, and select the character, you can see all the bones they have in it. On the base female character they have in game I have seen 14 in each hand, 5 in the head (2 ears, 2 eyes, nose) 4 in the hip area, 4 in the chest/back area, and about 9-10 in the tail. No actual toes.
Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #10 on: Mar 12, 13, 01:56:44 AM »

Some of those counts seem excessive, especially the number in the hands.
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Maximum Bone Count
« Reply #11 on: Mar 12, 13, 04:16:33 PM »

This is a revised list, with more bones for the hands and head, which brings the total to 43, which is much closer to the recommended 46 minimum:

2 toes
2 feet
2 shins
2 thighs
1 Pelvis
1 lower spine
1 middle spine
1 upper spine
2 shoulders
2 upper arms
2 forearms
2 hands
6 mitten fingers
6 index fingers
6 thumbs
1 neck
1 head
2 eyes
1 jaw

Then the suggested counts for the extra bones:

4 Hair
12 wings/cape
6 tail

Which brings the total to 65

Add 2 extra "thigh" and "shin" bones at the back and front of the pelvis to help animate robes and long dresses, and the total is 69.

That leaves 6 over, so maybe 1 more for the hair, at the front of the head for longer fringes, 1 for eyelids to let the models blink, 1 for the nose, 1 for the mouth to work with the jaw, 1 for the brows to raise and lower them, and 1 to be added someplace else to complete the maxium 75.
« Last Edit: Mar 12, 13, 04:34:53 PM by Amanda_Brooks »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios