Terrain resolution for a MMO

Which values would you recommend for these parameters when making a MMO?

**Terrain Width

Terrain Lenght

Heightmap Resolution

Control Texture Resolution**

My first thought was to use the following values, but I'm worried about the engine performance:

Terrain Width 1024

Terrain Lenght 1024

Heightmap Resolution 513

Control Texture Resolution 1024

I was also wondering which ratio is the best one between the terrain dimensions and the heightmap resolution. Do you always go for a 1:1 or make the terrain larger than the heightmap?

Unity won't struggle at all with those settings that you suggested. While these settings can affect performance, what is usually a much more important factor is the density of trees, grass and detail meshes that you fill it with.

Also, if it really is going to be an MMO, you'll probably want to use multiple terrains chained together using Terrain.SetNeighbors.

The overall terrain size for a given terrain segment would depend a lot on the nature of the terrain. If it's wide open and you need to be able to see a long ways before moving to a new terrain tile, then you need something like a 1km x 1km space (or even larger -- in WolfQuestion our single terrain is 2000x2000 world units). But if it's got a lot of hills or buildings where you can't see that far, you can make each terrain segment much smaller -- maybe 500 m on a side.

Then the resolution of the heightmap depends on what level of sharp detail you want the terrain to have. A 512 heightmap on a 1km terrain means only 2m / pixel of heightmap resolution. For very gentle terrain without a lot of sharp cliffs, rocks, or steep river banks, etc., that's probably fine. But 1 pixel of heightmap per meter of world space is better for more detail on the ground. And some environments like a really rocky canyon might need even finer detail.

Similarly, the Control Texture (splat map) resolution depends on the sharpness of detail you want on the ground. 1 pixel / meter is fine for general natural features like grass, rocks, etc. But it may not be sharp enough to clearly define roads, paths, water puddles, or other small features.

So overall you will trade expansiveness of the single terrain block for overall level of detail. Intimate terrains can have more detail. Bigger ones will be less detailed.

As an aside, one new thing in Unity 3 to use to help with terrain performance is an overall detail density setting that can be modulated for quality levels. This lets you paint on grass and flowers as thickly as you want for high-end cards, but then reduce the density overall for lower end systems.

There's no definitive way to answer this...use what works best for your environment and your goals. The values you specified are low-end, but there are many other factors involved in performance, such as amount and draw distance of various vegetation, number of textures, pixel error setting, etc. Also, you aren't limited to a single terrain.

Instead of having one big terrain, you may want to make multiple terrains, one for each area in your MMO, and then use LoadLevelAdditive() to load them in when your player gets near them.

Another way to do this is to have a nine terrains, arranged in a square pattern, and when your player ventures out of the current center terrain, make the terrain the player is on the center terrain.