Search Unity

Performance of blendshapes

Discussion in 'Editor & General Support' started by Buretto, Jun 18, 2019.

  1. Buretto

    Buretto

    Joined:
    Mar 23, 2015
    Posts:
    49
    I noticed this has been asked many times before, but there doesn't seem to be a clear answer.
    What are the performance impacts of blend shapes? And are there any specific things to avoid while using them?

    In particular, this post caught my attention: https://answers.unity.com/questions/1578678/performance-impact-of-blend-shapes.html

    It would be nice to know before creating any model's and bench-marking them only to find blend shapes are unusable for a certain purpose.

    I'm curious so I guess I'll create a poll too, although I expect this post won't get much attention judging by all the other posts already made about this topic.
     
  2. As almost everything, it depends. That's why this piece what I quoted from you isn't true. The only proper way to go ahead is to measure with stuff you rely on. So make one actor and measure for yourself on your target platform.

    In general blend shapes slower than bone-based changes. But blend shapes can be more detailed and sometimes more realistic. (Sometimes)
    If you have a couple of characters on screen at one time and you're targeting mid-level PCs, go crazy with blend shapes. If you will have a ton of characters on screen at once, probably you will either seriously cut back the number of blend shapes or switch to bone-based morphs and cut back even those or even choose design time morphs so you can bake them.

    It depends.
     
    Buretto likes this.
  3. khalvr

    khalvr

    Joined:
    Sep 12, 2017
    Posts:
    53
    In theory, bone-based animations use more GPU and CPU performance, while blend shapes use more memory.

    Creating simple animations for low-poly meshes using a handful of blendshapes is often used as a way of making high-performance animations for things like birds and other ambient objects. Memory requirement scales with vertex count though, so it quickly becomes non-viable for high-poly objects, though it is often used to create detailed face experssions in AAA games. I think blend shapes can also theoretically benefit from better batching, but i'm not sure if this is true for Unity.
     
    Campos and Buretto like this.
  4. ICE-jdeacutis

    ICE-jdeacutis

    Joined:
    Mar 10, 2021
    Posts:
    9
    Perhaps the most noticeable difference is blendshapes use a lot more memory. Unity's Soldier sample asset head uses 25MB, making it the single largest mesh in the project by 2-3x, and that's not even the whole soldier model.