Hi there,
I am trying to figure whether the AnimToTexture is a valid alternative for crowd simulation. The fact it is used in the City Sample, suggests it is, but my findings are showing a different story.
After following the community tutorial Baking out vertex animation in editor with AnimToTexture | Epic Developer Community (epicgames.com) by @Stephen.Phillips I was able to create a very simple scene to start experimenting with it.
Unfortunately, to my surprise, it seems that the performance gains are not that high. I can clearly see that both the game and the render threads are under less pressure when using the plugin, but the GPU overhead is so high that after a couple of hundreds of spawned characters (static instanced meshes) I already hit a GPU bottleneck.
The major impact seems to be on the BasePass and the ShadowDepths pass, and I am wondering whether these numbers are to be expected, or it is possible they are coming from a misuse I am doing of it.
My initial guess is, because vertex positions are now computed on vertex shaders, rather than compute shaders, they need to be done both on the shadow pass and base pass. The hit is rather high due to the complexity of the shaders (although it shows green on the shader complexity view) and the multiple texture sampling operations.
Despite this, I am still not convinced the high cost I am seeing is all due to shader complexity, they are not that complex after all. My GPU is not capable of sustaining 60FPS with ~200 characters on an empty scene. I am testing on a laptop with a RTX 3060 mobile, but similar numbers were observed on a desktop with an RTX 2060Super. It doesn’t sound right.
Can anyone suggest to me if there is something I should start looking at?
These red characters are skeletal meshes animated with from a Animation BP.
The green characters are instanced static meshes animated with the AnimTotexture plugin