More Terrain (in case you aren’t sick of it yet)

April 20th, 2009


It’s a video this time though. So that’s better.

You can see the program layering the octaves of Simplex Noise here, going from large, gradual slopes to finer surface noise. Colours are now blended as well instead of just popping in at certain points, and at the end the whole terrain is smoothed. As the water and terrain are constantly in motion, normals have to be calculated each frame which is fairly processor intensive. However, since this video was captured I’ve switched over to using vertex buffer objects which has made a noticeable difference to the frame rate, and almost all the remaining changes I have to make relate to the graphics card, so hopefully the demo will remain at about 30fps on the target platform.

Even more Simplex Noise

April 4th, 2009


Just thought I’d upload some further screenshots from the terrain generation program I have in development.

Last time I wrote a post about Simplex and Perlin noise it ranked highly in google for searches about Simplex noise almost immediately, which really demostrates how under valued it is and how few resources are already available. For this reason, I definitely intend to share any source code I write and hopefully offer as simple an explanation as possible of my understanding of how it works after this project is complete.

 First, I started colouring my terrain according to changes in its height. Soon I’ll improve this further by texturing the terrain and also varying colours on areas with certain gradients, for example to create the appearance of cliffs.
blendedcoloursloadsofpolys

 
 Getting the river to a realistic value wasn’t easy (and I’m still constantly fiddling with the values I feed it).
rivercolourriveroflava

 
 I added a water plane to the scene and sloped the terrain downwards to form a coastline.
slopesideviewwaterplanesmoothed

 
 Obviously, the next step was to simulate some waves to make the water more realistic. Here, you can see points along an edge of the plane are being displaced to create ripples across the water.
generatorsterrainwithgenerators

 
 In the actual simulation, these “generators” are on a part of the water plane not being drawn to make the water look more natural. I also drew edges of a box around the terrain so that it isn’t simply a plane floating in space: not more realistic, but it looks kind of interesting.
waves2box