Simplex noise for reasonable maps

I was stuck with procedurally generated maps and luckily came across this old post:

http://www.java-gaming.org/index.php?topic=31637.0

However, I don’t understand the “underlying rules” to set parameters in a way that gives macroscopic results. If it doesn’t make sense, let me rephrase: I can’t tell the algorithm to produce a set of islands, or a big continent surrounded by ocean, or many (or few) mountains, etc, because the effect I get from changing slighly the parameters is seemlingly “random” to me.

The code I’m using is pretty much the one kindly provided by longshorts:


public static float[][] generateOctavedSimplexNoise(final int width,
                                                        final int height,
                                                        final int octaves,
                                                        final float roughness,
                                                        final float scale)
    {
        final float[][] totalNoise = new float[width][height];
        float layerFrequency = scale;
        float layerWeight = 1f;
        float weightSum = 0f;

        for (int octave = 0; octave < octaves; octave++)
        {
            // Calculate single layer/octave of simplex noise, then add it to total noise
            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    totalNoise[x][y] += (float) noise(x * layerFrequency, y * layerFrequency) * layerWeight;
                }
            }

            // Increase variables with each incrementing octave
            layerFrequency *= 2f;
            weightSum += layerWeight;
            layerWeight *= roughness;
        }

        for (int x = 0; x < width; x++)
        {
            for (int y = 0; y < height; y++)
            {
                totalNoise[x][y] /= weightSum;
            }
        }

        return totalNoise;
    }

I do however correct the final noise by dividing it by weightSum (the final loop), as otherwise it wouldn’t always be within -1 and 1 as it should.

The parameters I can manipulate are three: number of “octaves”, roughness and scale.

Right now I have the following thresholds (should be clear what the names are):


if (heightMap[x][y] < -0.1)
                {
                    map[x][y] = Cell.DEEP_WATER;
                }
                else if (heightMap[x][y] < 0f)
                {
                    map[x][y] = Cell.WATER;
                }
                else if (heightMap[x][y] < 0.3f)
                {
                    map[x][y] = Cell.GRASS;
                }
                else if (heightMap[x][y] < 0.4f)
                {
                    map[x][y] = Cell.HILL;
                }
                else
                {
                    map[x][y] = Cell.MOUNT;
                }

There are some many “free parameters” that is quite overwhelming.

Could you give an explanation of how to interpret the noise parameters, and possibly some advice on the above thresholds? I’m quite at a loss here.