Now, in the playground I clone meshes and their skeletons and animations. But I keep thinking if there is a way to reuse the original skeleton and not recreate/clone the skeleton? I think with many characters and cloned skeletons, I get some performance problems… So I keep wondering if I could reduce the framerate hit with a single skeleton
Another thing is also the fact that if I start an animation, it seems that it is executed even though the mesh itself is not visible at all…
I guess the real question is how to get better performance when there are a lot of meshes with animations and skeletons on the screen at once? Here is pretty much the worst case scenario:
All the characters can have different animations and clothing that they wear… But I guess I have some options that I listed below, what do you think about these and do you have any other ideas?
Make the skeleton more simple, no each finger for example
Maybe combine the character meshes? For example, in the current character mesh there is separate body, hair and clothing meshes
Find a way to reduce the amount of skeletons?
Also I would like to point out the fact that it seems that when the animation for a mesh is playing, it cannot be view culled? Is this a known fact?
A way to have fast skeleton animations for multiple objects is to use vertex animations baking. See this thread (be sure to read until the end of the thread):
You can try to use refreshBoundingInfo(true, true) on all your animated meshes to take the bones/morph into account to compute the bounding box. If it’s still not enough, you have the option to set alwaysSelectAsActiveMesh = true on all the meshes.