Minecraft terrain generation in a nutshell

147,326
0
Published 2022-02-06
In the Caves & Cliffs update we radically changed Minecraft terrain generation, rewriting large parts of it from the ground up. This video summarizes how this actually works, how simple math and code can be used to generate interesting, beautiful, and dramatic terrain.

00:00 Intro
1:14 Size
3:11 Procedural terrain generation
8:47 Perlin noise
13:04 Terrain shaping
17:37 3d noise
20:10 Cave generation
21:27 Biomes
25:13 Wrapup

Intro and outtro music: Some homemade music I had lying around. If you enjoy you can find more here: open.spotify.com/album/0jr9Z7FQP5kpRZWoLDD9ZD

All Comments (21)
  • @cubfan
    Great video Henrik! Really cool to see a bit about how things work behind the scenes of the terrain generation.
  • @MysteryOre
    This is so fascinating! A comprehensive yet straightforward explanation of how terrain generation works. Thank you for making this video, Henrik! :)
  • @earomc
    so cool having passionate developers at this game. So passionate that they make videos talking about what they do in their free time. I really appreciate your work. I watched the video from start to finish!
  • @oglothenerd
    POV: Me learning the secrets of Minecraft so I can make my game better.
  • @henryash413
    When I first found Minecraft, I was too young to even begin to imagine how a Minecraft world worked. I think half of the magic for me at that age was the inability to understand how every world was different, stretched millions of blocks wide (enough to be labelled "infinite", another bewildering concept) and on top of that how a computer could put me inside of it and allow me to make it my own. As I have become more knowledgeable of the general possibilities of computer science and programming, this aspect of the game has gradually charmed me less and less, however the nostalgia will forever remain with me. I hope that Minecraft continues to mystify new players with world generation, I also hope that I can keep hold of some of that magic that once baffled my 8 year old self.
  • @Vextrove
    If I'm not mistaken, Mr Henrik uploaded this video in his free time, pretty close to midnight. This is not part of his job/him getting paid to do it. He did it because he wanted to. I really appreciate this video!!
  • @stardustlabs
    Henrik you are an absolute math & worldgen genius. This video is a really excellent explanation of worldgen, definitely watch all the way through!!!
  • @Mysda_
    About 1 or 2 years ago I made my first game for a gamejam, it was a 2d digging game. So I started playing with perlin noise and well the obvious thing is to find out that you can do cheese cave. Some weeks after I had an Epiphany when I came up with the spaghetti cave idea, it was so much more possibilities with the same concept! I trully understand how fascinating terrain generation can be, and I love seeing a clean explaination like this.
  • @money_hyde
    Thanks for the amazing video! I tried replicating this myself to some extent for fun in Unity, it’s surprisingly easy to stuff some meshes into a grid and use Perlin noise like he mentioned to specify if they’re solid blocks or air blocks. It starts to get seriously confusing after that though, especially accounting for multiple sets of noise, the 3d noise as well, not to mention how quickly performance gets really bad. I just couldn’t wrap my brain around all of it. Makes me appreciate it all the more!
  • @Vextrove
    I am curious about how noodle caves are properly created in 3D. In 2D, it makes sense. But in 3D, it would cause floating blobs of stone to generate. So what did you do differently when implementing it into the game?
  • The new biome algorithm works so well. Recently in my survival world I needed to find a badlands, so I just followed a savannah until I reached one. On the contrary I needed ice, so I followed a mountain range and found an ice spikes and icebergs biome. Didn’t have to use any external tools at all!
  • @Ponteiiro
    Thanks for the video Henrik, after watching some videos of people trying to replicate the minecraft generation, it's interesting to see what actually happens, good job improving it 😎
  • I want a series of this, is so interesting, even though I don't understand anything.
  • @justaguy9671
    ok what we've learned: The whole generation is perlin noise throwed together 😂 but for real this was so helpful to understand at least the general generation, i always wondered how this is possible, and i'm really impressed, one part is the theory, the other part is actually coding it and you explained it already so simplified, wow. I still wonder how each seed number creates the same seed on every computer, even though you said the generation is random, so how is the randomness saved in the seed number?
  • @wyll_
    PLEASE believe I’m gonna watch this entire 30 min video. Please more dev commentary 🙏
  • @Stealth
    Very informative! Thankyou!
  • @Goldrobin
    Thank you for the video! I love the new update, the new terrain generation looks so good!! It's so much fun building in a world where every part of it looks beautiful! (Btw, would love to see more dev commentary in the future, great video!) :)
  • @IbanPlay
    Despite already grasping the principles of using combined gradient noises for world generation this was still super entertaining and taught me a lot of neat stuff, like how 3D noise is used in combination with the squishing factor! I'd love to see more videos like this where aspects of minecraft's code are explained in this format
  • @Kjotleik
    While there are still a few things I don't like about world generation, there is no doubt that the 1.18 version is by far the best there has ever been. You've done a great job with it. Both the caves and the cliffs have met my expectations so far. And I do appreciate you taking your time to explain how things work. That is an extra bonus I enjoy.
  • haven't finished watching the video, but I've really enjoyed the visual demonstrations of what terrain would look like with each version of the pseudo-code - when y'all first introduced continentalness, erosion, temperature & peaks-&-valleys as parameters, I found it hard to keep track of how the parameters interacted, and I couldn't quite get why y'all were bothering with the parameters in the first place - this video has helped me understand that quite a bit better and btw I was moved to write a comment because I loved the comparison you made between the terrain generation y'all have been working on, and Slartibartfast's award-winning fjords-of-Norway! a beauty of a throwback :D