Published Apr 1st, 2017, 4/1/17 12:22 pm
- 4,016 views, 5 today
- 2
- 0
- 1
5
Recently, I've been experimenting with procedural generation in JavaScript. After some toiling and idiotic mistakes, I've managed to create a basic terrain generator, which works via Simplex noise.
How does simplex noise work?
Simplex Noise is a type of gradient noise. A set of values is spread out along an X/Y coordinate plane. Then, when the elevation for a certain X/Z on the map is needed, the point on the coordinate plane is located. Then, the dot product of the nearby values is found. This means that instead of ugly spikes, you get a rather smooth hilly terrain.
The terrain generator outputs in a height map; this is basically a black-and-white (monochrome) image, where black is higher elevation and white is low elevation. Using tools such as WorldPainter, you can convert heightmaps to Minecraft worlds. The height map generator is available online here.
The picture above was after exporting with WorldPainter.
How does simplex noise work?
Simplex Noise is a type of gradient noise. A set of values is spread out along an X/Y coordinate plane. Then, when the elevation for a certain X/Z on the map is needed, the point on the coordinate plane is located. Then, the dot product of the nearby values is found. This means that instead of ugly spikes, you get a rather smooth hilly terrain.
The terrain generator outputs in a height map; this is basically a black-and-white (monochrome) image, where black is higher elevation and white is low elevation. Using tools such as WorldPainter, you can convert heightmaps to Minecraft worlds. The height map generator is available online here.
The picture above was after exporting with WorldPainter.
Progress | 100% complete |
Tags |
3927183
2
Create an account or sign in to comment.