A few days ago I decided to look into terrain generation. My goal was to create enormous heightmaps to apply to spheres so I could create a randomly generated world. Well, I Googled left and right, I searched these forums, and I thought about it a lot. I couldn't find any pages that would really help me! Until I found this page:http://www.gameprogrammer.com/fractal.htmlIt was the most useful link ever. A few days later, I had a program that could randomly generate a heightmap, then load it into my renderer and actually display it! I'm very excited, and proud to show off my creation. Here's a video showing it off:http://www.youtube.com/v/8zgZNuprqzU?version=3&hl=en_US&start=(on a side note, I have no idea how to embed youtube! Figured it out!)

On the more technical side of things, I use display lists that are called once when the heightmap is loaded in, and then they are never rebuilt. I use shaders to position and actually texture the triangles. I don't just color them. I use triangle strips because otherwise I would be using a ton more vertices, and that's about it!

Here's the donwload:goo.gl/g5Cols(Sorry, I forgot to change the angle in which the player is created. Just turn around and look up and you should see the map)Press 'R' to generate a random map Press 'H' to reload the original heightmap

Currently, this is Windows only, sorry!

The terrain generator is pretty fast; it can generate ~12 million triangles in less than 5 seconds! Feel free to use any of my code, just open it up using JD-GUI!

I like this alot, good job. I remember reading an article on how the mountains for the Lord of the Rings movie were generated using that triangle breakdown method. That article you supplied reminded me of it .

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?

I know have some (bad) voxel rendering! You can tell that there aren't any voxels generated to fill in the gaps, but it works nonetheless Its not optimized as I'm still using display lists to render, I intended to switch to VBOs, but I was too lazy !

Haha I like the gaps It makes it look funny somehow...If you get into voxels, even if you don't optimise the code, I think you should check out some other generation algorithms because you can produce some pretty cool looking stuff. I also suggest you look at Marching Cubes generation for non voxel stuff, that way you can make things look more... connected? I dunno how to explain it, but if you use that and per pixel shader lighting combined with other generation methods you have some pretty nice looking stuff just from that!

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?

I've already gotten myself into voxels a little, I just took a break to work on little stuff like this, and I'm working on networking now! Honestly, terrain generation would not be high on my to do list, as this algorithm I have right now produces some pretty nice results!

The marching cubes generation idea sounds fun, I might look into that someday! But I'm just proud of myself for learning the Diamond Square algorithm, I'm not going to ruin that feeling with messing around with other algorithms yet

I want to eventually get back into voxels, and maybe someday create a free roam type of game with this kind of terrain where you complete small missions and kill things. But who knows!

I do want to make use of this program later on, its just I don't need it right now. I eventually want to simulate planets with procedural terrain and lighting... but that's far off in the future after a few more years of OpenGL!

I do want to make use of this program later on, its just I don't need it right now. I eventually want to simulate planets with procedural terrain and lighting... but that's far off in the future after a few more years of OpenGL!

This is less hard as you might think.1. Create a sphere2. For each point, multiply by a noise value (just use the x,y,z as input).

Thats it!.After less then a hour work you could achieve this:

*However you will need to make some kind of LOD sytem if you want to be able to zoom.

The last couple of replies that were talking about making a procedural planet out of this are really interesting!! I can't wait to see how that is coming if you plan on going in that direction.

Thanks! I't actually not working on it right now (I have a voxel engine series that I'm still doing on YouTube! Link in my signature , but I do someday want to come back to this with a little more knowledge on lighting and shadows so I can make the worlds look really good.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org