HW instancing for skeletal meshes?

I have a large multiplayer shooter, and the biggest bottleneck for now is a large number of animated meshes. They are very simple, though even 10 animated meshes on the screen at once cause FPS drops. Is it possible to use instancing to optimize it considering that the meshes are the same but they have different materials?

It is not, but it’s like not the rendering of them that is expensive, but animating them. See more here: Extend dynamic batching to support skinned meshes · Issue #3543 · playcanvas/engine · GitHub

1 Like

understood, so there is nothing that can be done about this expensiveness of animating many characters. I saw somewhere you mentioned using float textures (like three js does) for newer devices for animating on the GPU. Is it doable within the current engine implementation?

We do not have a VAT (vertex texture animation) support in the engine.

got, ok, will write one then

I would profile first to ensure that you are targeting the right part to fix :sweat_smile:

If it is the animation, you should see a large amount of time spent in matrix operations

One thing we did in our games is override the animation component and reduce playback based on distance from the camera. Essentially create some kind of animation LOD, the further away from camera the lower the FPS of the animation (players can’t really tell or don’t care on our games).

Another thing that can improve performance a lot is removing unnecessary bones from your animations e.g. if you don’t really need a bone per finger remove them.

2 Likes

thank you, that’s definitely interesting, will look into it.

1 Like

I did a similar thing to leonidas, where by each animation gets a lower update rate by its lod (which is also our own system). Makes a big difference.

3 Likes