use of org.terasology.utilities.procedural.BrownianNoise in project Terasology by MovingBlocks.
the class PerlinHillsAndMountainsProvider method setSeed.
@Override
public void setSeed(long seed) {
// TODO: reduce the number of octaves in BrownianNoise
mountainNoise = new SubSampledNoise(new BrownianNoise(new PerlinNoise(seed + 3)), new Vector2f(0.0002f, 0.0002f), 4);
hillNoise = new SubSampledNoise(new BrownianNoise(new PerlinNoise(seed + 4)), new Vector2f(0.0008f, 0.0008f), 4);
}
use of org.terasology.utilities.procedural.BrownianNoise in project Terasology by MovingBlocks.
the class PerlinHumidityProvider method reload.
private void reload() {
float realScale = config.scale * 0.01f;
Vector2f scale = new Vector2f(realScale, realScale);
BrownianNoise brown = new BrownianNoise(new PerlinNoise(seed + 6), config.octaves);
humidityNoise = new SubSampledNoise(brown, scale, SAMPLE_RATE);
}
use of org.terasology.utilities.procedural.BrownianNoise in project Terasology by MovingBlocks.
the class PerlinBaseSurfaceProvider method setSeed.
@Override
public void setSeed(long seed) {
BrownianNoise source = new BrownianNoise(new PerlinNoise(seed), 8);
surfaceNoise = new SubSampledNoise(source, new Vector2f(0.004f, 0.004f), SAMPLE_RATE);
}
Aggregations