Simple mesh load on demand for terrain

I have a massive model of Seattle I’m working with.

I need to drastically increase “resolution” on the terrain chunks and because of this I need to figure out some sort of load on demand system

I’ve searched and all I seem to be able to come up with is more people having issues with terrain and no real answers.

I think the easiest way would be to detect the chunk the player is in and load the 8 around it (square chunks).


if playor location is between x1,y1 and x2,y2, instantiate items 1-9 and so on… and set objects to switch to billboard at such and such distance… but is there maybe a way to just cause everything (including terrain chunks) to switch billboard mode off and on with any of it actually being unity terrain chunks…

anyway… hell… i’d be happy if someone can even tell me what the proper name for doing this is called so I can maybe look it up myself

What is the format of the city model you’re working with? Mesh or Unity terrain? How detailed is the model, and how fast and at what altitude are you moving through the terrain?

Built-in Unity terrain has several limitations, which may or may not apply to your specific scenario.

  • Basemap distance limit of 2000, which is not very useful for terrain of realistic proportions: textures are shown at the lowest quality when camera is farther than 2000m from the terrain tile.

  • No flexibility in choosing which shader is applied above basemap distance.

  • Clipping artifacts are visible when terrain of realistic proportions cuts into the built-in Unity skybox.

If you’re working with built-in Unity terrain, I would suggest looking at TerrainComposer which would help you capture terrain data and create terrain detail objects (billboards, rocks, etc) shown at certain distances. Built-in Unity terrain does its own LOD which is visible if you switch to wireframe in Scene View. How large is your model? Depending on the size of your model, you may or may not need a dynamic terrain loader to limit the amount of data being thrown at the engine.

If you’re working with mesh terrain, I would suggest looking at UniLOD, but it might be too manual for large data sets.

I’ve developed a dynamic terrain loader in the past that used meshes instead of built-in Unity terrain, which I found to be a bit limiting for large scale and infinite terrains. I also developed a semi-automated pipeline for getting terrain tiles of desired format and resolution, and created a dynamic terrain LOD and loading system since my terrains were really large. I didn’t have support for terrain detail objects though, so this may not be what you’re looking for.