I myself am creating a terrain generation algorithm and would be interested in knowing why others have chosen midpoint displacement over perlin noise. Minecraft is an example where midpoint displacement was preferred. If anyone knows why I would be glad to hear it.
-
2No one knows except Notch and/or other developers of Mojang. – thedaian Feb 29 '12 at 20:52
-
1If the decision wasn't completely random, and I doubt it was, then there must be a logical reason. I believe that the reason will be obvious to at least some people here. – jcora Feb 29 '12 at 20:54
-
2The reason may just be to meet some internal design goal - it doesn't necessarily have to be for some technical reason that outsiders can deduce. – Kylotan Feb 29 '12 at 21:10
-
Also, I feel the editing of this question has changed the meaning significantly - the reasons for choosing X over Y can be quite different from the reasons for changing to X having used Y. – Kylotan Feb 29 '12 at 21:11
-
2@Kylotan The way the question was worded before was unanswerable and off-topic for this website. See the FAQ, and see also: http://meta.gamedev.stackexchange.com/questions/626/is-how-was-entire-game-x-made-off-topic If you have a better edit for question, the link is above. – John McDonald Feb 29 '12 at 21:19
-
Is this one of those "Vi or EMACS?" questions? :) – Tim Holt Feb 29 '12 at 22:37
-
2Currious where you read that Minecraft was using midpoint. Notch spoke differently: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1 Granted that was ages ago and may have changed. – Leniency Feb 29 '12 at 23:22
-
@JohnMcDonald I'd just rather close a question entirely than change it to something that doesn't answer what the original asker wanted - it is their question after all. Better to open a new one if there is a closely-related alternative that is a better fit for the site. – Kylotan Feb 29 '12 at 23:45
-
@Kylotan The OP is making his own terrain generation algorithm. I was under the impression that the question wasn't for curiosity's sake, but rather to figure out which direction he should take his own project in. – John McDonald Mar 01 '12 at 00:15
-
IMO, midpoint displacement looks better for craggy terrain, while perlin noise works better for caves and such (blob-like shapes.) It's probably what Minecraft uses. – kaoD Mar 01 '12 at 04:36
-
Having modded for Minecraft I can assure you that Minecraft does, in fact, use Perlin. I don't understand the code involved, but it is a perlin noise function and is named as such. I believe it's a 2D implementation (the output value being used for height). – Draco18s no longer trusts SE Jan 25 '17 at 03:53
3 Answers
Notch posted about this on his blog:
I used a 2D Perlin noise heightmap to set the shape of the world. Or, rather, I used quite a few of them. One for overall elevation, one for terrain roughness, and one for local detail. [..] But [it had] the disadvantage of being rather dull. Specifically, there’s no way for this method to generate any overhangs.
So I switched the system over into a similar system based off 3D Perlin noise. Instead of sampling the “ground height”, I treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground.

- 7,985
- 2
- 35
- 41
Different methods of fractal generation tend to produce terrain with different characteristics. The reason for their use could be stylistic rather than for any technical performance reason. Different algorithms also allow you to change different parameters to give the final result. I have no direct answer re: MD vs Perlin though, sorry..

- 81
- 3
Here's some reasons to prefer midpoint displacement:
Midpoint displacement noise is meaningfully faster to calculate (in my experience).
And, Perlin noise has some biases; it only approximates full spectrum white noise but is closer to Gaussian; midpoint displacement may be generated with a uniform (or any) distribution.
But, as another answer said, it's my understanding that Minecraft does use Perlin noise; I don't see how you could efficiently implement midpoint displacement noise for Minecraft, where the map goes on forever. The advantage of Perlin noise here is that you can calculate it at any point without calculating any other points around it. For midpoint displacement, you have to generate it all at once, since you need the boundaries of each chunk to match.
(EDIT: Removed mention that midpoint displacement can produce wrapping heightmaps - Perlin can do this just as easily.)

- 101
- 3
-
-
@Sopel True, but isn't necessarily straightforward to do so e.g. with Perlin noise. – Grumdrig Jan 23 '17 at 22:08
-
1it involves just modulo operation when calculating coordinates to use for gradient function. It can't get much easier than that. – Sopel Jan 23 '17 at 22:33
-
"Seamless" is a strong word for that, because that literally means it doesn't have seams. Midpoint displacement's edges are clearly visible, they are the same height, while you can't tell where perlin noise's are. – Bálint Jan 23 '17 at 22:39
-
@Sopel You are quite right. I hadn't done that before. I'll edit that point out of my answer. – Grumdrig Jan 25 '17 at 03:23
-
@Bálint Not so - it is entirely seamless. Just generate the noise modulo a power of 2; the edge is generated along with the rest of it and does not need to be the same height. I'll demonstrate with an example if you'd like. But in any case, I'm editing that out of my answer since Perlin noise can be done this way too, as Sopel mentioned. – Grumdrig Jan 25 '17 at 03:27