   C++ Terrains for a Nooblet
  Hello there,I've been playing with DX for a while now and I want to begin playing with terrains, it doesn't have to be fancy but I'm just looking for a place to start so that when the camera moves in my application, it actually looks like it is moving and not just the objects are moving.So I'm just wondering what prerequisites you think I should know and other than that any resources you have found useful.Thanks a millionJemburula   
  Take a look at the clipmap implementation that Hughes Hoppe et al put up here for something fairly recent.Quite a lot of the other stuff you see on terrain rendering on the web is not really appropriate anymore for newer hardware.   ;  Oh... not really appropriate? How come? Thanks for the link though, I'll have a look. Anyone else have any beginners material? [smile]Edit: Could a moderator move this to the For Beginners section.   ;  You could always develop your own terrain mapping system.  For instance...class Map {public:   Map();   void loadMapFromFile(char *filename);   void createBuffer(); // creates a index buffer or w/e to speed up rendering times   void draw();   void setHeight(int x, int z, int h);   int getHeight(int x, int z);private:   int width, length;   int *heights; // array to be allocated in constructor OR in the loadMapFromFile};void Map::loadMapFromFile(char *filename) {   ifstream s(filename);   int w, l;   s >> w >> l;   width = w; length = l;   heights = (int*)malloc(sizeof(int) * w * l);   s.close();}Or something to that effect.  Not too sure if the file i/o is correct lol.. prolly not.  Hmm, class structure could def be better.But think about it.  All a terrain is is a bunch of ordered triangles that make up a big bumpy sqare on the screen.   ;  I have a simple heightmap terrain demo on my site that might be helpful:clicky.   ;  tendifo: Yeah I know, that's the part I was getting stuck on like it just got confusing in my head when I thought about triangles and then going on to the next 'strip' of triangles above it etc.chadmv: Thanks mate that looks great, just what I need I think. [smile]   ;Quote:Original post by JemburulaOh... not really appropriate? How come?Well, in the old days, it made a lot of sense to try to spend a lot of effort minimizing the number of triangles that you rendered, because rendering individual triangles was slow - especially back when we were doing triangle rasterization in software.As time went by, triangle processing/rendering speed increased faster than CPU speed increased.So, these days, it's more important to efficiently feed triangles to the GPU than it is to worry about exactly how many triangles you're really drawing. Which is not to say that you want to pointlessly feed the GPU millions of triangles you aren't going to end up seeing.Anyways, a lot of the material/advice on terrain rendering that's out there is focused on solving problems that aren't relevant anymore. The clip mapping stuff I pointed at before represents a much more "modern" approach to terrain rendering than most of the other stuff out there.   