Reducing draw calls during runtime

Hey!

I am making a VR application and need to keep draw calls to a minimum. The problem is that the player is able to spawn X amount of objects during run time. Are there any ways I can somehow batch these objects once they have been placed to keep draw calls down?

Thank you.

Is there an upper limit to how many can be spawned?

Not a physics guy, but my first thought would be GPU instancing and DF collisions to keep math on the GPU, but it would depend on your end result.

If you could afford it, you could always use nanite, for whom draw calls of rigid, opaque geo are essentially flat.

Thanks for the suggestion. I just did some quick testing with GPU instancing and it looks very promising!

So would the smartest approach be instance/un-instance these objects whilst the game is running and update the transform co-ordinates individually?

I suppose that would depend on what exactly you need these objects to be doing. What properties to these spawned objects need to have? Is it just T/R/S, or are there more complex properties that they need to carry?

They will take damage from bullets / explosions. If the health reaches 0 they will be removed from the map.

I see, so you need the objects to hold their own T/R/S, and a health counter of some kind, with logic to delete them. Doesn’t sound too challenging to handle with instancing, but as I’m not a physics expert, I wonder if there’s a thread you could comment in to get more specialized help?

1 Like

I will have to try and experiment in the near future. Thank you for your help.

1 Like