So I see there a lot of documentary about lighting, materials animation etc but really little about collisions and how ue4 handles collisions specifically. Personally I am trying to build a game like Space Engineers with handle hundreds of moving collisions on ships, I found out that it’s quite impossible to do because the higher the number of objects the higher the fps drops. The funny part that with static instance meshes the GPU performance is completely stable. My plan is to decrease the number of collisions by fusing the walls floors and ceilings into long box collisions and leave a few more complex collisions here and there, but I don’t know if it will do the job. Does anyone here work with many collisions in their projects? Or have different ideas on how to handle the situation?
Simplifiy collisons, for sure. But also find out about two other things:
- Understanding collision responses:
There’s no point in things looking for objects they’re just not going to collide with, or you aren’t interested in them colliding. So you can fine tune this section. For me, that made the frame rate go from about 60, back up to 120.
- Custom collision channels ( ie, invent your own collsions ):
I found out there no noticeable difference if I change the collision responses or not, its enough that I just turn on the collision to something and when trying to move few hundreds of collisions the fps tanks.
I’m just saying, those are the areas to look into…
Hi, do you really need that many active collisions?
I don’t know how your setup looks like (never played Space Engineers), but maybe you could group your ships into parts (so each part would hold an array of mesh references and/or references to box collisions, not the actual meshes) and enable/disable all the collisions in the part based on the distance to the player. So you could check on a timer the distance of the player to the parts you have created.
And I would do the grouping into parts automatically via an in editor script.
Yeah, I tough on many ways to deal with the issue and had a similar idea, the biggest problem here is that there artificial gravity on the ship and there can be physical actors not only players. So it will be really hard to implement but I have a few ideas on how to handle them. A combination of this and a combining of the collisions of every wall, floor and ceiling tiles should do the job. Thanks for the help @chrudimer you too @ClockworkOcean
I finished what I wanted, long ago actually but didn’t have time to add it into video here it is, I am using grid system so its really easy for me but I am sure there are few ways without one too. Everything that in these video with the blue outline on the ship have collision everything else does not. Video