Best wishes for a speedy and comfortable recovery! I know it can’t be a great experience - right? - but I hope for you it can be mostly on the better side.
No need to apologize, very sorry to hear that! Wish you a fast and good recovery as well!
Amazing thread, Best wishes for comfortable recovery!
Here’s mine. They are animated as well. The main character has 6k polygons and was downloaded from mixamo. As you can see there are 37000 animated characters and fps is at 700. Ive actally gotten over a million with super lowpoly characters under 500 poly. All animated. Working out some more stuff but plan to share soon!
great!!!
But what happend if you mix different animations?
Curious to see the final results… and if you want to share the project or the system it will be super useful.
Ohh they absolutely work the only downside is for each animation you will get an additional draw call per animation but in the grand scheme it really isnt an issue. So instead of 6 calls for 37k, if you have 10 animations there would be 16 draw calls for 37k. Not a big deal, though I do believe i can fix that, just need time… and a bigger brain XD
Is the source downloadable somewhere? I would like to learn and see how it would integrate with ECS and also the job system,
Thanks
maybe this repo might be interesting for you @FrenzooInfo GitHub - joeante/Unity.GPUAnimation: Simple but very fast GPU vertex shader based animation system for Unity.Entities
Thanks for that.
Thank you for the informative post! Correct me if I am wrong, but would using baked meshes result in a separate draw call for every mesh? Because if you are using a different mesh for each animation frame, then that’s a draw call?
Depends on how you call it. Using DrawMesh is likely to result in a drawcall per mesh if I remember correctly, so instead you might want to try DrawMeshInstnced. That way as long as you are using shaders and materials that support instancing Unity will render multiple instances of the same baked mesh at once. This is also why generally when rendering so many entities you try to have a system where by many of them are sharing the same frame of animation.
It should be noted that drawcalls in themselves are not always bad, and modern gpu’s can easily copy with 10’000s of them a frame, even mobile gpu’s can support a good number likely in the several hundreds or more these days ( not really tested that though ).
What you do have to watch out for are setpass calls ( in Unity ) thats when you change the state of gpu, such as using a new material or shader. So if you have a single setpass call and then 10,000 drawcalls you should be fine, but if you have a setpass call every other drawcall then performance is likely to suffer greatly.
Further more as mentioned in my initial posts, replacing gameObjects with drawcalls will always be a win as Unity no llonger has to create and manage all those gameobjects, more so if each gameObject had a MonoBehaviour on it etc.
Very interesting, thank you. In your opinion, which option would allow me to animate more characters, baking animations into meshes or into textures? I am just starting learning about animation, so I do not have any reference point. For context, I suspect if I used the baked mesh approach I would have up to around 4000 drawcalls and maybe a hundred set/pass calls.
Not enough information to make an informed decision. However neither option is going to work better with high setpass calls, that is a limit that can only be negated through other means and is likely what i’d focus on more.
Depending upon your experience/knowledge baking animation frames into meshes is probably easier from a getting started/coding point of view. So i’d start with that, then focus on reducing setpass calls as that level of knowledge will be transferable between systems.
To reduce setpass calls you need to reduce material counts and minimize per material changes. You should find plenty of ideas on the forums for this. However the approach you go with will be quite project and asset specific so not sure I can give any more specifics. If you do have to change material settings look into MaterialPropertyBlocks which can be used with DrawMeshInstanced. On the whole reducing setpass calls is more of an asset rather the code issue, at least at first. Then you can look at creative ways to supply different material properties or state changes via shaders and code.

