How to push the limits of Unity3D and run mass terrains?

Rust, a game made by Unity3D working on a MASSIVE terrain. For around 1 year I have been working on terrains constantly but never seem to be able to generate grass on a mass terrain.

The lag is UNBEARABLE. I have an extremely powerful computer yet it is the engine that lags. Once I build the scene, I can play it without lag (in the standalone, not the editor). I’m guessing because I can make a 64 BIT standalone, yet the editor will always allocate a certain amount of ram.

Even so I am currently trying to work with 9 Terrains (2000x2000 units each).

The layout is in a square, so it over all is a 3x3 Terrain. This is about 1/3 the size of Rusts terrain. And even with a tiny bit of grass (about 1 piece per meter of terrain) the lag is UNBEARABLE. I cannot even use the editor. +It has frequent crashes. Rust has grass ALL OVER the terrain, and there are about (my estimate) 25-30 pieces of Billboard grass per square meter.

I am using billboard grass. 1024x1024 Textures.

Overall, do not tell me to wait for a 64 BIT version of U3D. Because, Rust seems to be able to achieve this. And yes, I’ve contacted facepunch, but it does not matter, because of course they didn’t respond to this type of question.

I thought of 3 possibilities to this mass generation -

  • Mesh made out of U3D
  • Generated on start when user joins the server
  • Some random sorcery that I can’t figure out.

The Mesh is possible, but it seems to still be following U3D’s basic physics of grass. (Natural waviness, etc. Something that would be extremely hard and out of their way to achieve).

Generation on start is a possibility while loading in. But still, it seems to be a perfect framerate in this game most of the time (for me). And if I generate a quarter of the grass they have, on a standalone copy of the game I make, I still run about 60-70 FPS. Yet, in their game, I’m in the hundreds.

Is there any special optimization tricks I’m missing? Anything. Because I am tired of this.

How about unloading grass in terrain regions that the player isn’t in? The Elder Scrolls games break the world into square “cells” so that they don’t need to load the whole world at once and can unload distant areas. In your case, nobody cares exactly where the grass objects are, so when the player leaves zone (0,0) north for (0,1), throw away all the grass objects in (0,0). Now they’re out of memory and your grass object count is cut by 89%. Bothered by the idea that the player might turn around at the border and see missing grass? Then break the world into more than 3x3 terrains (a good idea anyway) and keep a ring of 3x3 small terrains around the player in memory at any one time. How about letting the player see the distant Ruins of Yore while standing atop the mountains three terrains away? Then have reduced-quality meshes for the major sights they could plausibly see. That’s how the Elder Scrolls games do it, anyway.