High performance and high volume processing and rendering of low-poly 3D ants in Unity3D

As an experiment to play around with multi-mesh-instancing and compute shaders in Unity, I created a small project to render as many moving 3D low-poly ants as possible at the same time. Each ant was vertically offset by a few units and each was just pseudo randomly walking until hitting the virtual boundaries of the square. This was all done in a compute shader, and the result then rendered by the mesh-instancing unity provides.

This way, it was possible to render ~900k ants moving around all visible at the same time with stable 13 FPS. (This was achieved with a AMD Ryzen 9 5900X and a NVIDIA Geforce RTX 2080 Ti) To force them to be rendered at all times, an orthographic camera from above was used, which always sees all the ants.

Here is the link to the GitHub repository.

Here is a short video clip of them in motion, but of course with that many small moving objects, the bitrate suffers very much.