help for creating a 3D landscape like this one

Hi,

I’m an average Java coder, and now I want to learn OpenGL (in Java) to make a landscape like the one shown in the picture below (it’s a Linux screensaver).

Actually, the color stuff is not what I’m interested in: what I would like to achieve is just the wireframe view of such a landscape (pretty basic thing in OpenGL, I imagine…)

So Big, Big, Big Thank You for providing me any piece of advice (or code) you have about what I should do in order to create a wireframe landscape!!!

PS: if your tips, lines of code or weblinks deal with C/C++/C#, no problem, I’ll figure out how to make it work in Java, so feel free to post any piece of help (because I’m really starting from scratch on this one, and I really want to code it!). Thank you very much!


http://img819.imageshack.us/img819/3917/landscape.gif

I don’t know how much you know about OpenGL, but if you are familiar with the basics try this:

  1. create a grid which is build with as many quads as you like
  2. change the height value either on the cpu side or in a shader(then u can use the height also to set a color)
  3. render the mesh first as a solid plane then as a wireframe without colors

When you don’t know were to get interesting height values to use, there are several possibilities:

  • draw a “heightmap” with a drawing programm. just a grey-scaled image, which you read out in your app
  • use some interesting functions(sin, cos …)
  • or use some sort of noise function(you should find a lot on this forum)

Thank you very much for your pieces of advice!

As a matter of fact, I don’t OpenGL yet, and I would like to learn coding a wireframe landscape (interesting case, I think).
I’m interested in coding a random/procedural terrain.

Thank you for your help! :slight_smile:

If you don’t know anything about OpenGL, I’d start with the bare minimum before jumping into 3D. Write yourself a texture loader, dabble with sending custom vertices to a shader, etc. See here.