Wednesday, March 5, 2014

Continent Masks

In many cases it is desireable to be able to generate the shape of a continent or island for a game. Many methods for this exist, but few of them produce results that look similar to the quasi-randomness of real life coastlines. In this post I will introduce my favorite algorithm from DungeonLeague.com that produces very nice results.


Saturday, March 1, 2014

Midpoint Displacement Noise Generation

If you have done anything with Fractal Noise, you know that while it produces some of the best quality noise, it is insanely slow compared to its base functions. This is because it has to calculate a base array for every single octave. But then comes Midpoint Displacement Noise. It gives the same general look but at lightning speeds. Here's a benchmarch table from my machine:

  • Fractal Interp Cubic: 670 ms
  • Fractal Interp Linear: 245 ms (unacceptible quality)
  • Fractal Perlin: 125 ms
  • Fractal Lookup Simplex: 100 ms
  • Midpoint Displacement: 24 ms

It is so fast, it is on par with the non-fractal noise functions. This is the holy grail of fractal look-alikes.