XNA Creating a terrain

I am quite new to XNA, and am a bit confused with...well most concepts. Any pointers in a good direction would be helpful!

I have a data structure in a row/column format. Essentially they represent the height values of the terrain. How do I go about drawing the terrain? (note that I am not reading this data from a file)

Here is a sample representation of the data. The actual data can be as much as 100 rows x 1mil columns.

3 4 5 6 7 1
2 2 1 4 1 6 
4 5 7 9 0 0
5 3 3 4 5 6
1 2 1 4 1 1

edit: Can I create a 3D texture object and fill it with height data and render it? I think that would be easier than creating and meshing together triangles right?


I suggest Riemer's tutorials - they deal with terrain rendering basing on a heightmap. Check http://riemers.net/. They offer a good start, once you will pass through them search for quad-tree terrain rendering - that is done to optimize rendering.

Need Your Help

work with array passed by jquery to actioncontroller asp.net mvc 3

c# jquery asp.net-mvc arrays asp.net-mvc-3

I would like to know ho to iterate in asp.net mvc3 controller array passed by a jquery ajax call

Comparing Castle Windsor, Unity and StructureMap

dependency-injection castle-windsor structuremap unity-container ioc-container

In a follow up to Krzysztof’s statement that Windsor does a lot more than other IoC’s, I wanted to understand how these IoC’s stack up against each other and the benefits/additional facilities that