x


Dynamic Terrain Loading

I have to admit that I'm not really good in coding, and now I have a scene a heavy one and i need to make it faster on runtime using Dynamic terrain loading. I have no idea what is the algorithm. Am I guessing correct? where am i going wrong?

1.Creating a matrix of terrains. 2.Apply SetNeighbors to connect them. 3.Apply a heightmap to this matrix of terrains so each terrain gets its own share of the heightmap. 4.Tell the camera which terrain to load according to the cameras FOV.

The two last steps I really don't have any idea how it works it terms of coding. Can anyone please help me with that. thanks,

more ▼

asked Oct 06 '10 at 11:27 AM

Kourosh gravatar image

Kourosh
1.5k 47 53 65

Check out some already existing answers to your questions. Unity Answers helpfully lists them right next to your question under "Related". Try this one for a sample project: http://answers.unity3d.com/questions/9988/dynamic-terrain-loading

Oct 06 '10 at 12:00 PM jonas echterhoff ♦♦

This works great! it is so fast indeed. But now my question is, how to apply one heightmap over a matrix of terrains? in this project it's the same terrain being recreated as the camera moves. thanks,

Oct 07 '10 at 07:16 AM Kourosh

You can't easily spread a single heightmap into a matrix of terrains, as terrains have their own terrainData. Each terrain is able to hold a terrainData, which also contains your heightmap information. I suggest you split your heightmap in several chunks in the size of your terrain matrix. Otherwise you need to parse the heightmap and create several terrainData to associate with each terrain.

Jan 17 '11 at 12:28 AM zharramadar
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1478
x233
x77

asked: Oct 06 '10 at 11:27 AM

Seen: 3078 times

Last Updated: Oct 06 '10 at 11:27 AM