Home Technical Talk

performance and bone count

polycounter
Offline / Send Message
rollin polycounter
Hi there

I'm wondering how big the bone count can influence performance

In my case I have to choose if I want to give the 4 main characters 10 fingers or only 4 (connecting the 4 fingers together + the thumb)

Simply for the look I would love to have separate fingers but I have to admit that they would only be necessary for some occasions like casting spells and maybe cutscenes.

Of course this question is based on a case with limited resources like the iphone or something where you actually don't have that much headroom performance wise

Replies

  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    As with all performance questions, it really depends on how much else is going on. What is the "relative change": How many other bones you already use in a typical scene? would adding those 24 (4*6) extra ones really have a major percentage? Are you already limited in the scene... Are you using the GPU for skinning (if so are you limited by uniforms already...)

    in the end it always comes down to optimizing along you go. But typically removing stuff is easier than adding, I'd think (on the other hand it's wasting money if you remove). Also keep in mind do you actually see those fingers? Are the characters that big on screen. Do they move that slow/detailed that one could realize the individual fingers?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    The main thing to consider with increasing number of bones is how much will your animation data increase. Bones by themselves aren't really that expensive, but with large animation sets your animation data can really increase quite a lot.

    Basically if you have a character with 80 bones and 100 animations each with an average of 3 animated components per bone (I'm making these numbers up, may not be realistic, but think of an animated component as any "translate" or "rotate" value on XYZ, this is the data you will have store for animations), then your character anim set will take up some amount of memory equivalent 80*100*3 = 24000.

    Now if you have 100 bones (that's 25% more bones than before), and the same 100 animations, with the same average of 3 animated components per bone, you may now have a memory equivalent of 100*100*3 = 30000, which is 25% more animation data to store, not insignificant.

    Obviously if the extra bones you're adding don't get animated often, then it's not as much of an issue, but at that point it might be worth questioning why you're adding them at all if they're not really needed :)

    In terms of skinning and performance I don't think it's really that much of an issue on most hardware, but I'm not sure about iPhone or something. I imagine it might have more impact there.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    yea I know it's always based on everything else, but I'm just wondering how big the impact is compared to other things like textures, shader or polys.

    the difference would be (if 4 main characters are on screen)
    4(player) * 2(hands) * 3(additional finger) * 2 (bones per finger) = 48 bones more in a worst case (maybe there are less main chars)

    Seems I will need to test it anyway but would be great to have an idea of the performance needed to calculate one-bone-more

    And just to mention it, I'm using unity as engine
  • Buzzy
    Options
    Offline / Send Message
    The memory required for animation is the biggest concern. An average character with simple "mitten" hands has about 30 bones. Adding fully articulate fingers adds an additional 30 bones, doubling your bone count. But it doesn't end there. Another big concern is animation accuracy/sampling rate. Once you add fingers, you need much more accurate and closely-spaced keyframes or you will have fingers clipping all over the place. So, you've already doubled the memory with twice as many bones, but you may increase it even more because you need more keyframes to handle the more intricate animations you will now be making.
  • Mark Dygert
    Options
    Offline / Send Message
    From what I understand you can often pick up a lot more bones if you downgrade the number of bones that influence verts. If you take a step down from 4 to 3 or even 2 you MIGHT probably make up for the difference but it depends on so much... You're better off gathering a few methods and running some tests.

    As for the number of keys chunking up the size of the animation there are advantages to going key per frame. I think it allows you to remove any kind of key/curve interpolation your engine might have to do, which might not be that much of a performance boost but it can take away a lot of the headaches of "why don't my curves match?". Also if you budget key perframe and are able to interpret curves accurately and for cheaper you come in under budget, win for you!

    Some animation systems (like Granny3D) allow you to adjust the bone influence on the fly making it really easy to see what the advantages are and how it looks at the different levels.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    Ok I have at least a workflow now.

    I'm working now with separate fingers but be able to export only 1 finger + thumb if needed. I don't need any complex finger animations so animating them shouldn't cost that much extra time.

    Unity seems to have some strange animation handling anyway. I can apply a animations with additional and missing bones (!!) to my current character version.
    Not that I'm going to use that but might be, that unity is doing some optimization in the background already?!

    I'm now able to jump between both finger versions with a few minutes of reexporting .. I think thats fine.
Sign In or Register to comment.