Series: Procedural Generation
- Terrain Generation part 1: Voronoi noise - September 30, 2023
Terrain Generation part 2: layering noise functions - October 03, 2023
- Terrain Generation part 3: random continents - October 04, 2023
- Terrain Generation part 4: deriving temperature - October 06, 2023
Terrain Generation part 2: layering noise functions
Where the last blog post left off was the idea of a cylinder world map having encirciling seas at both the north and south pole.
Stage 4: Softing the encircling sea falloff.
The falloff scale of the encircling sea was on the scale of [0.0,1.0]. I’ve rescaled that to [0.5,1.0]. Further, the abrupt cliff where a scale can go from [0.5,1.0] next is very harsh. A naive blurring effect tones it down a little.
Stage 5: Billowy Perlin noise for terrain
Because Rust noise has such a convenient package, using that to create some terrain ridges seems easy to try next.
ScalePoint::new(Billow::<Perlin>::new(20).set_lacunarity(3.0)).set_scale(3.0);
That’s interesting height map, so if I then convert anything lower than 160 on the grey scale to water, that looks like this.
let pixel = (noise * 255.0).clamp(0.0, 255.0) as u8;
if pixel < 160 {
img.put_pixel(w, h, image::Rgb([0, 0, 255 - pixel]));
} else {
img.put_pixel(w, h, image::Rgb([30, pixel, 30]));
}
That’s really not bad at all, but it’s not paying attention to my intention for encircling seas.
Multiplying my encircling seas heightmap by the terrain heightmap brings it around to this on greyscale and then also the same terrain function.
That’s a really harsh falloff and looks very jagged. Very apparent on a southern island.
Going back to the top, combining with blurred regions brings out this.
Picking out the same island again, that jagged pixelated coastline looks much better.
Where next time?
If there’s another blog post, going to do a better job of continent creation.
Series: Procedural Generation
- Terrain Generation part 1: Voronoi noise - September 30, 2023
Terrain Generation part 2: layering noise functions - October 03, 2023
- Terrain Generation part 3: random continents - October 04, 2023
- Terrain Generation part 4: deriving temperature - October 06, 2023