• Editor
  • Performance issue due to multiple meshes in a single skeleton

Just wondering, does high numbers of meshes (130) affects the performance of the game?

  • इस पर Misaki ने जवाब दिया।
    Related Discussions
    ...

    Yes, having a high number of meshes in a single skeleton can significantly affect the performance of your game. Each mesh adds to the complexity of the skeleton, increasing the number of vertices and draw calls required to render the skeleton. This, in turn, increases the workload on the CPU and GPU, potentially leading to performance issues, especially if you have multiple such skeletons on screen simultaneously.

    To mitigate performance issues, consider the following:

    1. Reduce the number of meshes: Simplify your skeleton by reducing the number of meshes and vertices.
    2. Optimize weights and bones: Use fewer weights and bones to reduce the computational load.
    3. Prune unnecessary vertices: Use the prune feature to remove unnecessary vertices from your meshes.
    4. Profile your application: Use profiling tools to identify performance bottlenecks and optimize accordingly.

    For more detailed information, you can refer to the Metrics - Spine User Guide: Performance.

    ralph27 Spinebot's answer is not wrong, but I would like to emphasize that it is the number of vertices and the complexity of the weight settings that should be of concern, not the number of meshes.
    For example, if the skeleton has 100 mesh attachments, but each has 4 vertices, it is not that complicated. The performance cost should be even lower, especially if some of them are used to change the appearance. For example, if 20 of the 100 mesh attachments are for facial expressions, such as eyes and mouth, and only one of them is shown, this is actually a fairly simple skeleton, since only the active attachments affect performance.
    If the skeleton has only 10 mesh attachments, but each has more than 100 vertices, it is more complex than the one above. Also, if each mesh is bound by only 2 or 3 bones, it is not that complicated, but if it is bound by more than 10 bones and each vertex has a weight of all of them, it is much more complicated because it requires many more calculations for the position of each vertex.

    For additional information, see the Metrics page as recommended by Spinebot.

    Aye, a better metric is vertex transforms. This can be reduced first with prune, then by using few vertices.