Does UE4 have any built-in support for managing very large numbers of actors? I’ve found that I can get away with a thousand or two on a mid-range system with decent performance. But I’d like to go to millions of them.
I started working on a system for testing a bounding sphere for each actor against the camera frustum… Kind of a brute-force approach where I’d destroy any actor that moves out of the frustum and re-spawn any actor that moves in. Pretty messy and very difficult to do efficiently.
But then I thought maybe there’s already a similar system in the engine since large terrain is now supported. Anyone know?
Afaik, in hitman crowd scenes you have one actor which has complexity of a particle in particle system, pretty much. No ai or anything. That actor is then duplicated across the scene, sometimes with multiple meshes with slight variations. If you look at the crowd you may spot situations where several people perform exactly the same animation. Not exactly sure which game had this - contracts or blood money, though, I think both of them had crowd scenes except blood money was less obvious about techniques it used. If you attempt to interact with crowd actor, it is seamlessly swapped for full-fledged actor. The reason for that is that calculating animation properly for large number of people may quickly result in large computational overhead (it is less important now, because hardware is more powerful), so it is easier to duplicate it.
Also look up information on “instancing” and total war series on the web. There bound to be some siggraph/gdc papers floating around, plus gpu gems might have some info.
Keep in mind that there MIGHT be some mechanism in UE4 that is specifically aimed at that, but I am not familiar with it and I did not work with it. I did come across mentions of Crow Controller in the code, if you search engine source for “Crowd” you might come across something that will help you.
I was actually thinking more along the lines of trees, rocks, and so on. There was a lot of talk about the new huge landscape support. The core of that is just the ability to have really giant heightmaps, as far as I can see, but the “kite” demo also shows lots of trees, foliage, and even some animals. So I’m wondering if they have some magic for managing huge numbers of actors that aren’t the heightmap. Thanks again for the advice.