How to connect broad multi Terrain? ( For flight simulator)
Hello.
I make terrain by "terrain composer(Asset)" for flight simulator. I have some constraints as follows, (1) Target PC's main memory is 16GB only. My application needs to save memory. (2) One terrain data is very huge due to terrain resolution is high.(creare by terrain composer) (3) I hope to connect each terrain based on camera translation. (4) I must make 400km × 400km area. One terrain is 31km × 31km. Thus, All terrain is 13panel × 13panel.
I want to know following things, (I) How to cording c# progran techniqe about this solution. (a) How to load any terrains realtime. etc.... (II) If some assets can fix this situation. I can by that assets. So, I want to know assets. (III) Sample program where is. (IV) Best practis about this sitiation.
Could you teach me above from (I) to (IV).
Answer by fc2012 · Apr 27, 2017 at 07:18 AM
I'm working on Terrain, too. I think there are Assets that meet yout requirement on Asset Store, so you can search the Asset Store like "TerrainManager" or so. But I'd love to do it myself and here's some idea that may help.
First of all, you must import all your Terrain resources to Unity, like heightmap, texture and alphamap, etc. Then you can make terrains in the Editor and make each panel to a prefab, but I don't suggest that way. Because it may be too memory-cost to load a 31km square size terrain at one time. Try to make it smaller, maybe 1km square? I don't know. Thus, the number of prefabs which represents each panel will be too many, so it'll be a lot of work. Instead, you can automatically generate TerrainData assets via Editor Script. See: link text. The code may help and you'll have to look up the Script API Document for Class Terrain&TerrainData.
Secondly, to load and unload your terrain assets at runtime, you'll have to use AssetBundle. If 16GB space is not enough, you can load Asset at runtime via network. See also the Script API and these articles may help too: link text
Hope this will help!
Thank you! I try to search. First, I compress the texture of terrain. After, I try to write script by your advice(Link).fc2012