Question about Peformance of thousands of gameobjects

Hi,

I working currently on a protoype of a game and I come along the question how efficently handling thoursands of gameobjects. For example I did some experiments with grass.

I used this Tutorial for this:

And I recognized if I have 5-10k of gameobjects in my scene, the performance will be reduced dramatically.
I already activated occlusion culling, but the grass is moving so there is not much culling.

I’m using the URP and for sure all of the grass casts shadows etc. The material has also enabled GPU instancing.

Now about my question:

  1. Should I try to do such things linke grass with DOTS? But it is planned to also chop the single grass batches. Not sure if this is workings with DOTS

  2. Is there any other “out of the box” improvement option in Unity I can use for this?

  3. Or do I have to do my own improvements by using my own BVH and just have a pool of maybe 100 Gameobjects and place the to the position the player sees?

  4. Any other recommentions.

Best
L_tD

You need to use a vegetation system. There are several popular on the store

Thanks for reply, but how they do this? I’m not sure if there are systems with my needs, especially if I want to chop grass and bushes and not only render them and the assets will not fit with the look to the rest of my game.

If they are using a BVH then its ok, then I have to do the same, if they use some Unity-Mechanic it would nice to know which one, so that I can use it too.

But if you can prefer a system from the asset store I will take a look into.

Thanks and best
L_tD

They are doing it close to the metal bypassing gameobjects all together.

I use Vegetation studio pro (at this point deprecated) with shaders from vegetation engine. Really good performance out of that.

Great thanks for the answer, interessting that bypassing Game Objekts is possible, have to investigate is ir is an Option for me. Also will Take a look at Vegetation Studio pro and Vegetation engine.

Big thanks for the answers.

Best

L_tD

You will need to use DrawMeshInstanced or DrawMeshInstancedIndirect.

GPU Instancer can auto-convert for you.