How I learned to stop saying I'm bad at art and love the code
Invented by Ken Perlin
3. Higher Dimensions!
Is anyone familiar with a random number generator?
NOISE USED BY PERLIN
A pseudo-random number generator was used, but it was
important that each seed would always produce the same
This was done so that wide landscapes, like in DUST, could be
moved in and out of memory depending on where you were, but
would look the same if you revisited a place you had left. The
computer would regenerate that section of the map, but it would
look how you remember it looking.
This also happens to be the reason seeds are identical on different computers in Minecraft. However,
Minecraft uses a tweaked 3D perlin noise to generate the landscape now. If there is interest and time I'll draw
how they accomplish this.
This can also be used, and is common in generating heightmaps. A
2D image is given white through black values, which can be
interpreted as higher vs lower ground.
Note: This uses blue instead of white, but the same idea still applies
EVEN HIGHER DIMENSIONS?
Think of a cube with varying densities. This is often used to
This is used to show moving/morphing clouds. The fourth
dimention is time. In the same way that slicing through a 3D
Perlin field will look in 2D like morphing 2D "clouds", slicing
through a 4D Perlin field will look like morphing 3D clouds.
Yes. It has been used. I don't have any good examples of it though.
Even 6D has applications, but I'm too scared to think about
anything above 4D.
If you add up Perlin fields of different frequencies (granularities),
you will end up with a fractal image that has both large hills of
noise, as well as small bumps.
Each level should be weighed less than previous levels so it will converge to zero. We don't want pixel sized
bumps contributing as much elevation as a mountain!
Assign random points to 4 corners of a 2n+1 square. Find the
average of two points on a side, make the middle point that
plus/minus a small random value to give the terrain variety. Do
this for each side of the square. Then average the 4 corners, set
middle of the square to that value, plus/minus a random value
again. Then do the same procedure to each of the 4 subsquares
you just created. Keep doing this until you give every vertex a
Notice the corners are low. If the water was high enough, this could be an island.
This approach is pretty good when you are trying to make a
procedural island. Perlin noise would not allow you to ensure
that the edges are all under water, but if the 4 initial corners are
set underwater, you'll generally end up with an island. For noninfinite worlds that still want procedural terrain, this is a good
method. However, the downfall is that if you want to add more
terrain on, you have to start from scratch.
This is actually the technique Dwarf Fortress uses, before it erodes, rains on, floods, and all the other stuff it
does before it says your world is finished.