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

Author Topic: DX11 and Maximum Bone Count  (Read 4620 times)

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
DX11 and Maximum Bone Count
« on: Feb 01, 15, 10:06:50 PM »

We're still working on our basic universal rig for all human and humanoid characters, and we're wondering if there are any plans to increase the maximum bone count beyond 75 when the engine is updated to use DX11?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #1 on: Jan 06, 16, 09:31:52 PM »

This old question wasn't answered so I thought I'd bump it back up here. I too am curious if the bone count limit will be increased. UE4 has a cap of 255 bones per character currently.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #2 on: Jan 07, 16, 10:25:32 AM »

This from a skype convo about the same subject a while back:


Quote
[11/19/2015 4:57:24 AM] Sarrene  Grant: Unreal has a much higher limit due to it being used for not just mmo's or multi player, but single player as well as movie rendering.
[11/19/2015 4:58:12 AM] Sarrene  Grant: the 75 limit is not really just an HE thing, it is a standard, though it is increasing now, for any game that is planed to be a multi player or mmo


Quote
it is not an HE only thing, it is an multi player/mmo limit on what the gpu can handle

Quote
[11/19/2015 5:02:44 AM] Sarrene  Grant: even unreal for stnard games recomends the following:
[11/19/2015 5:02:49 AM] Sarrene  Grant: Compat.MAX_GPUSKIN_BONES=75
[11/19/2015 5:03:12 AM] Sarrene  Grant: so it is more gpu limiting than anything
[11/19/2015 5:03:31 AM] Sarrene  Grant: now you CAN put more bones in a single skel and exceed 75 in HE
[11/19/2015 5:03:45 AM] Sarrene  Grant: but you will have the same issues and see the spam for it


Basically, its not just HE that has the limit, they may just be the only ones really pointing out what will happen if you use more than 75 bones with current graphic card limitations.  You are NOT limited to using on ly 75 bones, you can use more, they simply let you know that you WILL see performance issues due to the nature of an MMO environment where there is much more animation from players/npcs than you would have in a single player game where what is seen at one time is much more controlable.  There is near zero control over that in an mmo without alot of client side work to provide filters to limit what can be seen or how many running animations are allowed at once and at what distance etc....  if you REALLY need those extra bones then add them, and have your coding team work out ways of making it work.... IF it becomes a problem..

I think that was the gist of the discussion on Skype.  Its not so much a "limit" as a point, above which, graphics performance drastically begins to degrade.


Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #3 on: Jan 07, 16, 05:49:13 PM »

It just occurred to me also that the bone limit has to do with skinned bones, and bones that are used as hardpoints for things like weapon attachments and particle effects don't count towards the 75 bone limit. The question is, when is that limit going to go up? Are there GPUs on the market now that have a higher limit? And if so, how long until the average GPU has that higher limit? Since UE4 has a 255 limit, does that mean it runs poorly when a character with 250 bones is used?
Logged

Warded

  • General Accounts
  • *
  • Posts: 34
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #4 on: Jan 07, 16, 06:19:47 PM »

It depends on the game really. If your not going to have a lot of character on the screen at once you can probably get away with it. If I'm not mistaken I believe going over the 75 starts to use the CPU as well.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #5 on: Jan 08, 16, 08:34:47 AM »

This still doesn't answer my actual question: When will GPUs support a higher bone limit without it lowering FPS. I've been trying to find this information for a year but haven't really been able to. :)
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: DX11 and Maximum Bone Count
« Reply #6 on: Jan 08, 16, 05:44:45 PM »

It's more of a combination aspect with bones as well though. Here is a bit / snippet that might help you understand things better.  Here is source but snippet: http://tech-artists.org/wiki/Skeletal_animation
Quote
Transforming on the CPU

By the time the CPU gets the animation data, it is a list of bone ID's and their keys.
Key Interpolation

In 3d programs, the goal is key efficiency- using the minimum keys possible to allow ease of animation and adjustment. The animator has tools, such as numerous interpolation techniques, to achieve this. However, when using real time, it is much more expensive to calculate this interpolation than it is to store multiple keys to achieve the same motion. For this reason, most game engines use linear interpolation of key data. We can think of an interpolated range of keys as a new function curve.

For each frame, the CPU must sample the curve, and take the transform. It then transforms the bone (in parent space!). Because all transforms are in parent space, all bones down the hierarchy are also transformed. It does this all the way down the chain, to the end.

There is no true limit to how many bones can be in a skeleton, the CPU can transform as many as needed. There are, however, practical (soft) limits which your programmers must decide. Also, if the engine is going to use Hardware Skinning (as all modern engines do), only 4 influences per vertex can be stored.
Skinning

For detailed info, see Skinning.

Skinning is the relationship of vertices to bones. A vertex weighted .5 to a bone will get 50% of its transform- however, that does NOT mean it will go on an arc for half of the degrees of rotation. It will essentially end up halfway along a line drawn from the original vertex position to its 100% weighted spot. Which means, if a bone is rotated 90 degrees, a vert 50% weighted to it will end up along the hypotenuse of the right triangle formed from its original position and its rotated position. An image will better demonstrate:

Skinning is handled either on the CPU or GPU.

After skinning, the Skeletal animation pipeline is complete- all that is left is the rasterized scene to render.
On the CPU (Software Skinning)

CPU skinning was common in the early days of 3D and before Shaders. Software skinning is just performing the Skinning process on the CPU. The downside is that CPU's work in a linear fashion, which takes time- they must do one vert, then move on to the next, etc. If skinning is done on the CPU, the resulting vertex position is passed to the Shader.
On the GPU (Hardware Skinning)

The GPU is a parallel processor, which makes it great for handling skinning. Each vertex doesn't care about the other vert, so it can handle many verts at the same time (unlike the CPU which must go one at a time).

Most, if not all, modern games use Hardware Skinning. It is extremely fast and the Vertex Shaders in most games are almost never the bottleneck.

So while you can see that the cpu is needed in combination of the GPU. The main limiting aspect is always the cpu, and while they are able to handle a lot of bones, the challenge becomes making all of the transforms hammer out correctly. So while GPU's have become super effective at updating the skinning so things look good and your high resolution textures don't strectch, the skeletal frame itself and the transpose needs to still happen on the cpu.

The challenge is if you start going with too many bones the gpu becomes too fast for the cpu. So basically the transforms are in a state where the cpu is telling the gpu to start making the skin transform to happen before it's finished the chain the gpu has come back, so it becomes a race condition based on cpu loads. Which keep in mind is dealing with a ton of other things as well. So as the article points out it's not so much a hard limit ever.

The challenge is can the cpu process all the transforms fast as needed, and this counts for everything / everyone else on the screen. So the more transforms that needs to happen the harder the bone count becomes. 75 has become more of the industries recommended limits because of two reasons.

1.) it's what is most efficient for the CPU to manage, keeping in mind it has to move the whole chain on any transform.
2.) if you are using more than that bone count it's becoming harder for that transform to happen, remember it has to move potentially all the bones in space and it has to complete this transaction before moving on. The more continuous bones the larger of a process / step this is. That is stuck in a single process. By using techniques that break up the skeletal aspects into smaller chunks or uses less bones the faster each individual process can happen, and thus the performance impact is cut down.

So it's never been a real hardset, beyond the aspects of it's super ultra highly mega advised not to do it. And while cpu's have improved and can handle more it's not advised to roll that dice unless you are in a controlled environment. Which MMO's aren't by nature.

Also 75 bones should easily cover 99.9% of all your rigging needs. If not you need a better rigger. Not being mean to anyone just saying.

Also keep in mind if you take out miscelaneous bones in the human body, but leave the core bones including the whole face structure there is only about 110 required bones, and if you account for things like who really needs 20 toe bones, then you get that number down to 90 bones, and that's leaving you 15 facial bones, half of which are inside the skull and have no affect on our ability to animate our face.

So by most accounts you can animate the entire body with right around 75-85 bones. which happens to be that magical recommended number range. For things like attachments etc, you are talking about 3-4 max needed. one for each hand, a back and a possible front. For capes and robes etc you need to think things out. For example skeletal variances for representing what is happening by using weights properly.

So no it's not a real hard cap even in HE, HE warns and spits warnings cause it's just bad practice and it's trying to prevent you from causing you a nightmare of a headache, later on. But you can do whatever you want, however you have to really think about how anatomy works.

I know most people who are running into bone issues are 1 using way to many facial bones, keep in mind / think about he bones you have in your own body and how that plays into your facial range of motion, it's almost all muscle driven, and that means skin weights. aka you don't need bones to do a blink, good skin weighting can accomplish it, but it's going to take a lot of work.

The other aspects are bones for added appendages aka tails, or wings / capes. You can have these but you have to remember that for example animals with these appendages have less bones in other areas. There is a reason for this, in nature. Meaning having a tail means less spinal bones cause the tail acts as the counter weight needed. Wings typically replace a set of shoulder bones and upper arm aspects.

Also most of the not true appendages aka a cloak / cape can be well animated it's own set of animations that are completely seperate and are activated by input. aka a cape is just an object attached to the back that has x,y,z animations that get played when the character is doing something, but are completely separeate objects. While this can cause a few bleed through problems if not well managed / done, making it go away is all about the rigger and skinner, doing what needs to be done. Which requires a highly skilled rigger.


Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #7 on: Jan 08, 16, 06:41:23 PM »

Keeper and everyone else,  thanks for the great discussion. Just so you know, my character has 69 bones for the base mesh, and that includes 11 for facial animation (including the jaw bone and eyes). Now, as you say 75-85 is good, then I have no problems with 85. 75 is a bit shy of my goals, since I want to add a few bones for hair, skirts, etc. I can see needing 10 more for those so my total would be 79, plus non-skinned bones which don't count towards that limit.

Yes, I could cut down the number of finger bones; just by making the ring finger and pinky use the same bones I could reduce the total by 6. I have the toes use 2 bones per foot, which is very slimmed down from what I would prefer. I also don't NEED skirt bones, I could rig them like Everquest 2 which just uses the leg bones and really stretches the textures, but I am going for a prettier game.

On the bright side, I actually have a much lower poly count than I had originally planned, 3602 faces (around 7200 tris) so that should help. I was planning on 6k or more polygons but I have worked for the past 3 months on making a very streamlined mesh that has all the right curves and angles.

I won't know how well it works until I can get the testing in with 200+ characters on screen. I am just finishing up the rigging now so it won't be long!

The question still remains, when will the GPU average quality be such that 120 bones is the norm for an MMO?
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: DX11 and Maximum Bone Count
« Reply #8 on: Jan 12, 16, 07:00:24 PM »

well that is something that will be a hard answer, they can technically now. The question to ask is how many total bones can a cpu handle not per character but render smoothly at any one time, and well cpu's tend to not benchmark on that lol.

Bottom line is you could run 150 bones no problem is your mmo limits people to 5 person instances, and never more than that. But if you need to load in a ton of players, say 60 at a market place well then that 150 bone count becomes a challenge potentially depending on how much animation there is. So that is the main equation.

Grand total of players I will ever have on my screen, times bone count = total bones to render / transform at any 1 instance. That is just something you have to decide on, which brings the other aspects lowest client denominator.

What is the lowest specs you want to go for. MMO's live and die by being massive in scale. aka 10k-1million players. especially in todays world of free to play where money comes only from people who pay for items.

This means that you want to try and remain as efficient as possible so the lowest player client has a chance. That is why the bone recommendations haven't really budged over the years and with mobile starting to be a problem. There been no rush to figure new ways to make it more efficient. Mobile has been great but it's pushed the PC evolution back about 5 years.

So really to answer your own question, it depends almost solely on your target audienance and game design.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: DX11 and Maximum Bone Count
« Reply #9 on: Jan 13, 16, 08:44:37 AM »

Well, since I am aiming for 80 bones I don't think it will be an issue, especially since it will be 2-3 years before I get to beta phase. Testing is the only way to know for sure! If the limit goes up drastically between now and then I will make good use of it, trust me. :)
Logged