   terrain with direct3d
  Hi, im looking about how to set up terrain with direct3d, can i create a terrain as a .x and load it same as if it is an object, is this the best way to create terrain with direct3d? which is the best way to do it with d3d?Thanks Kev 
  Usually people use heightmaps for terrain.A heightmap is for example a 256x256 array of bytes, each byte is a height. This produces a 65536 byte file. The nice thing is that in eg. paint shop pro you can edit these files as 8-bit grayscale images. You can spraypaint, draw, smooth and blur them to create realistic terrain.In your game you read in the file, access it as terrain[x][y]and build a vertex buffer by generating triangles in between the corner points. Just look up height map terrain directx on google for example.[edited by - Fidelio66 on January 29, 2004 11:18:09 AM];  Thank you, and height maps are the standard method to render, for example, either big terrain? Can i load a lot terrain 256x256 quad one near the other to have a big terrain? is this the method? ;  You can also have bigger heightmaps, and multiple heightmaps in the same place (for two different levels), but yes that''s generally the idea.You can also create terrain procedurally, and there was a link on the Nvidia site IIRC about elevation maps, which you might find interesting. Google > me, I don''t have the link on me. ;  is it possible for example to have bigger terrain, load a 1024X1024 quad terrain from a 1024X1024 bitmap? ;  That would be too big. I have written a program that can create terrain from a heightmap and various inputs that you might be interested in. It will output in .x or 3ds format, you can get it here:http://www.petra.demon.co.uk/Games/texgen.html ;  I have installed it but when i open T2.exe it gives me D3DERR_NOTAVAILABLE ;  You need to slice your terrain in pieces, and simplify/merge the pieces, to get good performance. Look at http://www.vterrain.org/ for a wealth of information on terrain representation, generation, and rendering. ;quote:Original post by kevlur  is it possible for example to have bigger terrain, load a 1024X1024 quad terrain from a 1024X1024 bitmap?   You will probably be using indexes, and the problem is that a 128x128 terrain is 16384x2 triangles. It would be better to split it up into 128x128 pieces, that would be 8x8=64 heightmaps. Then you can load in only those you need. ;  Actually, what I would do is make the 1024x1024 and shrink it down to 256x256 and then once its loaded...tesselate it a lot (maybe this is already common practice...who knows? well obviously not me...) 