Currently I have a procedurally generated planet using multiple octaves of perlin noise. The thing is, that I don't generate heightmap, but rather get the values of perlin function and apply them directly to vertices.

I'd like to add more surface features. Right now terrain is very rough, there are no flat areas, or rivers.

How can I add those features? Normally there would be some sort of heightmap-filtering, for example voronoi + perlin = good-looking terrain with flat surfaces.

Is it possibile to somehow mix fractal algorithms? If so how, which ones and where can I find more info about it?

  • 4
    \$\begingroup\$ Think of each noise generator as a layer in photoshop. Add layers of noise on top of each other with some sort of combining function like Add or Multiply, or Flatten. That's the way that mixing noises usually works. Want to flatten some areas? Make a noise pattern that you like and layer it on with a Flatten combiner. Mountain chains? Make a stringy noise field and multiply. Etc... As for which ones, you'll have to experiment. Libnoise has many examples, as a starter. \$\endgroup\$ Jul 2, 2014 at 2:07
  • \$\begingroup\$ @PatrickHughes: that sure looks like an answer! \$\endgroup\$
    – user16989
    Jul 2, 2014 at 4:03
  • \$\begingroup\$ Do you know any libraries similar to libnoise but faster? I can't even use their perlin noise for realtime, with multiple noises it will have ~1minute delay \$\endgroup\$
    – Neomex
    Jul 2, 2014 at 9:30
  • 2
    \$\begingroup\$ I'm afraid that generating any kind of noise field is costly, there's a ton of math going on behind the scenes. Best I can do to get near realtime is only generate a little at a time or on a worker thread while other things are going on. The usual solution is to generate it all up front and cache it for retrieval. \$\endgroup\$ Jul 2, 2014 at 15:36

1 Answer 1


Diverse terrain can be created using various arithmetic adjustments of randomly generated numbers. As I'm sure you realize, adjusting your generated values (for example, multiplying by two) would change the result you have.

If you are familiar with programs such as Photoshop or Paint.net you've probably heard of the concept behind multiplying colors, or burning, adding, etc. These are pretty simple concepts which wouldn't take much googling at all to find code for. If you had a variety of heightmaps, using these effects you could start creating pretty diverse terrain.

So where am I heading with this? Expand your skills with random generation. Change your code so that it merely generates a single canyon throughout a flat terrain (or 'flat' around your planet). Try using diamond square algorithms and mucking around with the variations to create extremely mountainous terrain.

By creating all sorts of effects, you're essentially creating a library of algorithms which you can now mix and mash to get your final product.

'But these are still all the same effect around the entire planet!' Well this is where those image effect concepts come back in. Say for example, I am making a terrain out of two perlin noise maps and a diamond square generation. For a single vertex, I generate the height as usual for each map. This may give me the values p1, p2 and ds1. In your current implementation, you are straight off using p1 as the height.

What I am suggesting, is you use something like (p1 * p2) + (ds1 * (1 - p2)) as the height. Just to clarify, the 'lower' the second perlin noise point is, the more the vertex is based off the first perlin noise map. the 'higher' the second perlin noise point is, the more the vertex is based off the mountains diamond square calculation.

Given the nation of perlin noise (especially when scaled up a lot), this will create effects where some patches are mountainous, and then that dies out to be the hilly nature of perlin noise in other areas.

Of course this is an extremely basic example for the potential behind the idea.

TLDR; mash multiple terrain generations together, not necessarily simply with averages or additions. Multiply some generations by others, then add them to a third and then multiply by a fourth! Think photoshop layer effects


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .