Applying a Heightmap at Runtime.

Let’s say I already have the needed heightmaps for a planet’s surface. The player will not be flying seemlessly down to the planet. Basically, they enter orbit, then select the region they want, and that terrain segment should be loaded. How difficult would it be to tell the game to take the selected region’s heightmap and apply it to the terrain object at runtime? How would I do it (the actual application of the heightmap and the generation of the terrain).

Assuming the HM is 2048x2048, is this a calulation intensive process that would be prohibitively long? I know, in the editor, when you import a heightmap, it takes roughly 5-10 secs for the terrain the be created.

Would it be better to just already have the terrains created and load them in when needed? If I go that route, would the be ridiculously crazy considering each planet might have 8 different terrains, and there are going to be roughly 250 planets that you can land on?

For heightmaps, see Terrain and TerrainData in the scripting docs.

There is a noticeable hiccup when switching out large terrain datas (not just heightmap, but trees, etc). They are also a bit hard to work with in code; you might be better off pregenerating them.